26 USC 40A - Biodiesel and renewable diesel used as fuel

(a) General rule 
For purposes of section 38, the biodiesel fuels credit determined under this section for the taxable year is an amount equal to the sum of
(1) the biodiesel mixture credit, plus
(2) the biodiesel credit, plus
(3) in the case of an eligible small agri-biodiesel producer, the small agri-biodiesel producer credit.
(b) Definition of biodiesel mixture credit, biodiesel credit, and small agri-biodiesel producer credit 
For purposes of this section
(1) Biodiesel mixture credit 

(A) In general 
The biodiesel mixture credit of any taxpayer for any taxable year is 50 cents for each gallon of biodiesel used by the taxpayer in the production of a qualified biodiesel mixture.
(B) Qualified biodiesel mixture 
The term qualified biodiesel mixture means a mixture of biodiesel and diesel fuel (as defined in section 4083 (a)(3)), determined without regard to any use of kerosene, which
(i) is sold by the taxpayer producing such mixture to any person for use as a fuel, or
(ii) is used as a fuel by the taxpayer producing such mixture.
(C) Sale or use must be in trade or business, etc. 
Biodiesel used in the production of a qualified biodiesel mixture shall be taken into account
(i) only if the sale or use described in subparagraph (B) is in a trade or business of the taxpayer, and
(ii) for the taxable year in which such sale or use occurs.
(D) Casual off-farm production not eligible 
No credit shall be allowed under this section with respect to any casual off-farm production of a qualified biodiesel mixture.
(2) Biodiesel credit 

(A) In general 
The biodiesel credit of any taxpayer for any taxable year is 50 cents for each gallon of biodiesel which is not in a mixture with diesel fuel and which during the taxable year
(i) is used by the taxpayer as a fuel in a trade or business, or
(ii) is sold by the taxpayer at retail to a person and placed in the fuel tank of such persons vehicle.
(B) User credit not to apply to biodiesel sold at retail 
No credit shall be allowed under subparagraph (A)(i) with respect to any biodiesel which was sold in a retail sale described in subparagraph (A)(ii).
(3) Credit for agri-biodiesel 
In the case of any biodiesel which is agri-biodiesel, paragraphs (1)(A) and (2)(A) shall be applied by substituting $1.00 for 50 cents.
(4) Certification for biodiesel 
No credit shall be allowed under paragraph (1) or (2) of subsection (a) unless the taxpayer obtains a certification (in such form and manner as prescribed by the Secretary) from the producer or importer of the biodiesel which identifies the product produced and the percentage of biodiesel and agri-biodiesel in the product.
(5) Small agri-biodiesel producer credit 

(A) In general 
The small agri-biodiesel producer credit of any eligible small agri-biodiesel producer for any taxable year is 10 cents for each gallon of qualified agri-biodiesel production of such producer.
(B) Qualified agri-biodiesel production 
For purposes of this paragraph, the term qualified agri-biodiesel production means any agri-biodiesel which is produced by an eligible small agri-biodiesel producer, and which during the taxable year
(i) is sold by such producer to another person
(I) for use by such other person in the production of a qualified biodiesel mixture in such other persons trade or business (other than casual off-farm production),
(II) for use by such other person as a fuel in a trade or business, or
(III) who sells such agri-biodiesel at retail to another person and places such agri-biodiesel in the fuel tank of such other person, or
(ii) is used or sold by such producer for any purpose described in clause (i).
(C) Limitation 
The qualified agri-biodiesel production of any producer for any taxable year shall not exceed 15,000,000 gallons.
(c) Coordination with credit against excise tax 
The amount of the credit determined under this section with respect to any biodiesel shall be properly reduced to take into account any benefit provided with respect to such biodiesel solely by reason of the application of section 6426 or 6427 (e).
(d) Definitions and special rules 
For purposes of this section
(1) Biodiesel 
The term biodiesel means the monoalkyl esters of long chain fatty acids derived from plant or animal matter which meet
(A) the registration requirements for fuels and fuel additives established by the Environmental Protection Agency under section 211 of the Clean Air Act (42 U.S.C. 7545), and
(B) the requirements of the American Society of Testing and Materials D6751.
(2) Agri-biodiesel 
The term agri-biodiesel means biodiesel derived solely from virgin oils, including esters derived from virgin vegetable oils from corn, soybeans, sunflower seeds, cottonseeds, canola, crambe, rapeseeds, safflowers, flaxseeds, rice bran, and mustard seeds, and from animal fats.
(3) Mixture or biodiesel not used as a fuel, etc. 

(A) Mixtures 
If
(i) any credit was determined under this section with respect to biodiesel used in the production of any qualified biodiesel mixture, and
(ii) any person
(I) separates the biodiesel from the mixture, or
(II) without separation, uses the mixture other than as a fuel,

then there is hereby imposed on such person a tax equal to the product of the rate applicable under subsection (b)(1)(A) and the number of gallons of such biodiesel in such mixture.

(B) Biodiesel 
If
(i) any credit was determined under this section with respect to the retail sale of any biodiesel, and
(ii) any person mixes such biodiesel or uses such biodiesel other than as a fuel,

then there is hereby imposed on such person a tax equal to the product of the rate applicable under subsection (b)(2)(A) and the number of gallons of such biodiesel.

(C) Producer credit 
If
(i) any credit was determined under subsection (a)(3), and
(ii) any person does not use such fuel for a purpose described in subsection (b)(5)(B),

then there is hereby imposed on such person a tax equal to 10 cents a gallon for each gallon of such agri-biodiesel.

(D) Applicable laws 
All provisions of law, including penalties, shall, insofar as applicable and not inconsistent with this section, apply in respect of any tax imposed under subparagraph (A) or (B) as if such tax were imposed by section 4081 and not by this chapter.
(4) Pass-thru in the case of estates and trusts 
Under regulations prescribed by the Secretary, rules similar to the rules of subsection (d) of section 52 shall apply.
(e) Definitions and special rules for small agri-biodiesel producer credit 
For purposes of this section
(1) Eligible small agri-biodiesel producer 
The term eligible small agri-biodiesel producer means a person who, at all times during the taxable year, has a productive capacity for agri-biodiesel not in excess of 60,000,000 gallons.
(2) Aggregation rule 
For purposes of the 15,000,000 gallon limitation under subsection (b)(5)(C) and the 60,000,000 gallon limitation under paragraph (1), all members of the same controlled group of corporations (within the meaning of section 267 (f)) and all persons under common control (within the meaning of section 52 (b) but determined by treating an interest of more than 50 percent as a controlling interest) shall be treated as 1 person.
(3) Partnership, S corporation, and other pass-thru entities 
In the case of a partnership, trust, S corporation, or other pass-thru entity, the limitations contained in subsection (b)(5)(C) and paragraph (1) shall be applied at the entity level and at the partner or similar level.
(4) Allocation 
For purposes of this subsection, in the case of a facility in which more than 1 person has an interest, productive capacity shall be allocated among such persons in such manner as the Secretary may prescribe.
(5) Regulations 
The Secretary may prescribe such regulations as may be necessary
(A) to prevent the credit provided for in subsection (a)(3) from directly or indirectly benefiting any person with a direct or indirect productive capacity of more than 60,000,000 gallons of agri-biodiesel during the taxable year, or
(B) to prevent any person from directly or indirectly benefiting with respect to more than 15,000,000 gallons during the taxable year.
(6) Allocation of small agri-biodiesel credit to patrons of cooperative 

(A) Election to allocate 

(i) In general In the case of a cooperative organization described in section 1381 (a), any portion of the credit determined under subsection (a)(3) for the taxable year may, at the election of the organization, be apportioned pro rata among patrons of the organization on the basis of the quantity or value of business done with or for such patrons for the taxable year.
(ii) Form and effect of election An election under clause (i) for any taxable year shall be made on a timely filed return for such year. Such election, once made, shall be irrevocable for such taxable year. Such election shall not take effect unless the organization designates the apportionment as such in a written notice mailed to its patrons during the payment period described in section 1382 (d).
(B) Treatment of organizations and patrons 

(i) Organizations The amount of the credit not apportioned to patrons pursuant to subparagraph (A) shall be included in the amount determined under subsection (a)(3) for the taxable year of the organization.
(ii) Patrons The amount of the credit apportioned to patrons pursuant to subparagraph (A) shall be included in the amount determined under such subsection for the first taxable year of each patron ending on or after the last day of the payment period (as defined in section 1382 (d)) for the taxable year of the organization or, if earlier, for the taxable year of each patron ending on or after the date on which the patron receives notice from the cooperative of the apportionment.
(iii) Special rules for decrease in credits for taxable year If the amount of the credit of the organization determined under such subsection for a taxable year is less than the amount of such credit shown on the return of the organization for such year, an amount equal to the excess of
(I) such reduction, over
(II) the amount not apportioned to such patrons under subparagraph (A) for the taxable year,

shall be treated as an increase in tax imposed by this chapter on the organization. Such increase shall not be treated as tax imposed by this chapter for purposes of determining the amount of any credit under this chapter or for purposes of section 55.

(f) Renewable diesel 
For purposes of this title
(1) Treatment in the same manner as biodiesel 
Except as provided in paragraph (2), renewable diesel shall be treated in the same manner as biodiesel.
(2) Exceptions 

(A) Rate of credit 
Subsections (b)(1)(A) and (b)(2)(A) shall be applied with respect to renewable diesel by substituting $1.00 for 50 cents.
(B) Nonapplication of certain credits 
Subsections (b)(3) and (b)(5) shall not apply with respect to renewable diesel.
(3) Renewable diesel defined 
The term renewable diesel means diesel fuel derived from biomass (as defined in section 45K (c)(3)) using a thermal depolymerization process which meets
(A) the registration requirements for fuels and fuel additives established by the Environmental Protection Agency under section 211 of the Clean Air Act (42 U.S.C. 7545), and
(B) the requirements of the American Society of Testing and Materials D975 or D396.
(g) Termination 
This section shall not apply to any sale or use after December 31, 2008.