SECTION 1. SHORT TITLE.

    This Act may be cited as the ``Beginning Farmers and Ranchers Act 
of 2005''.

SEC. 2. EXCLUSION OF GAIN FROM SALE OF CERTAIN FARMLAND.

    (a) In General.--Part III of subchapter B of chapter 1 of the 
Internal Revenue Code of 1986 (relating to items specifically excluded 
from gross income) is amended by adding after section 121 the following 
new section:

``SEC. 121A. EXCLUSION OF GAIN FROM SALE OF QUALIFIED FARM PROPERTY.

    ``(a) Exclusion.--In the case of a natural person, gross income 
shall not include--
            ``(1) 100 percent of the gain from the sale or exchange of 
        qualified farm property to a first-time farmer who meets the 
        certification requirement of subsection (d),
            ``(2) 50 percent of the gain from the sale or exchange of 
        qualified farm property to any other person who meets the 
        certification requirement of subsection (d), and
            ``(3) 25 percent of the gain from the sale or exchange of 
        qualified farm property to any other person for any other use.
    ``(b) Limitation on Amount of Exclusion.--
            ``(1) In general.--The amount of gain excluded from gross 
        income under subsection (a) with respect to any taxable year 
        shall not exceed $500,000 ($250,000 in the case of a married 
        individual filing a separate return), reduced by the aggregate 
        amount of gain excluded under subsection (a) for all preceding 
        taxable years.
            ``(2) Special rule for joint returns.--The amount of the 
        exclusion under subsection (a) on a joint return for any 
        taxable year shall be allocated equally between the spouses for 
        purposes of applying the limitation under paragraph (1) for any 
        succeeding taxable year.
    ``(c) Definitions.--For purposes of this section--
            ``(1) First-time farmer.--The term `first-time farmer' 
        means a first-time farmer (as defined in section 147(c)(2)(C), 
        determined without regard to clause (i)(II) thereof) who meets 
        the requirements of section 147(c)(2)(B). For purposes of the 
        preceding sentence, in applying clause (ii) of section 
        147(c)(2)(B), the material and substantial participation 
        standard shall be treated as met with respect to a qualified 
        farm if the first-time farmer will--
                    ``(A) perform not less than 1,000 hours of service 
                with respect to such farm, or
                    ``(B) provide half the required management and 
                labor with respect to such farm.
            ``(2) Qualified farm property.--The term `qualified farm 
        property' means real property located in the United States if--
                    ``(A) during periods aggregating 3 years or more of 
                the 5-year period ending on the date of the sale or 
                exchange of such real property, such real property was 
                used as a farm for farming purposes by the taxpayer, 
                the taxpayer's spouse, or other member of the family of 
                the taxpayer, and
                    ``(B) there was material participation by the 
                taxpayer, the taxpayer's spouse, or other member of the 
                family of the taxpayer in the operation of the farm 
                during 3 years or more of the 5-year period ending on 
                the earlier of--
                            ``(i) the sale or exchange of such real 
                        property, or
                            ``(ii) the later of the retirement of the 
                        taxpayer or the taxpayer's spouse who 
                        materially participated.
            ``(3) Other definitions.--The terms `member of the family', 
        `farm', `farming purposes', and `material participation' have 
        the respective meanings given such terms by paragraphs (2), 
        (4), (5), and (6) of section 2032A(e), respectively.
    ``(d) Use Certification as Farm for Farming Purposes.--The 
certification requirement of this subsection is a certification that 
the use of the qualified farm property referred to in subsection (a)(1) 
will be as a farm for farming purposes for not less than the 10-year 
period beginning on the date of the sale or exchange referred to in 
subsection (a)(1).
    ``(e) Special Rules.--For purposes of this section, the following 
rules shall apply:
            ``(1) Rules similar to the rules of subsections (e) and (f) 
        of section 121.
            ``(2) Rules similar to the rules of paragraphs (4) and (5) 
        of section 2032A(b) and paragraph (3) of section 2032A(e).
    ``(f) Treatment of Disposition or Change in Use of Property.--
            ``(1) In general.--If, as of the close of any taxable year, 
        there is a recapture event with respect to any qualified farm 
        property transferred to the taxpayer in a sale or exchange 
        described in paragraph (1) or (2) of subsection (a), then the 
        tax of the taxpayer under this chapter for such taxable year 
        shall be increased by an amount equal to the product of--
                    ``(A) the applicable recapture percentage, and
                    ``(B) 10 percent of the taxpayer's adjusted basis 
                in the property on the date such property was 
                transferred to the taxpayer.
            ``(2) Applicable recapture percentage.--
                    ``(A) In general.--For purposes of this subsection, 
                the applicable recapture percentage shall be determined 
                from the following table:

``If the recapture event occurs in: The applicable recapture percentage 
                                                                    is:
        Years 1 through 5......................................     100
        Year 6.................................................      80
        Year 7.................................................      60
        Year 8.................................................      40
        Year 9.................................................      20
        Years 10 and thereafter................................      0.
                    ``(B) Years.--For purposes of subparagraph (A), 
                year 1 shall begin on the date of the sale or exchange 
                described in paragraph (1) or (2) of subsection (a).
            ``(3) Recapture event defined.--For purposes of this 
        subsection, the term `recapture event' means--
                    ``(A) Cessation of operation.--The cessation of the 
                operation of any property the sale or exchange of which 
                to the taxpayer is described in paragraph (1) or (2) of 
                subsection (a) as a farm for farming purposes.
                    ``(B) Change in ownership.--
                            ``(i) In general.--Except as provided in 
                        clause (ii), the disposition of a taxpayer's 
                        interest in any property the sale or exchange 
                        of which to the taxpayer is described in 
                        paragraph (1) or (2) of subsection (a).
                            ``(ii) Agreement to assume recapture 
                        liability.--Clause (i) shall not apply if the 
                        person acquiring such interest in the property 
                        agrees in writing to assume the recapture 
                        liability of the person disposing of such 
                        interest in effect immediately before such 
                        disposition. In the event of such an 
                        assumption, the person acquiring the interest 
                        in the property shall be treated as the 
                        taxpayer for purposes of assessing any 
                        recapture liability (computed as if there had 
                        been no change in ownership).
            ``(4) Special rules.--
                    ``(A) No credits against tax.--Any increase in tax 
                under this subsection shall not be treated as a tax 
                imposed by this chapter for purposes of determining the 
                amount of any credit under subpart A, B, or D of this 
                part.
                    ``(B) No recapture by reason of hardship.--The 
                increase in tax under this subsection shall not apply 
                to any disposition of property or cessation of the 
                operation of any property as a farm for farming 
                purposes by reason of any hardship as determined by the 
                Secretary.''.
    (b) Conforming Amendment.--The table of sections for part III of 
subchapter B of chapter 1 of the Internal Revenue Code of 1986 is 
amended by adding after the item relating to section 121 the following 
new item:

``Sec. 121A. Exclusion of gain from sale of qualified farm property.''.
    (c) Effective Date.--The amendment made by this section shall apply 
to any sale or exchange on or after the date of the enactment of this 
Act, in taxable years ending after such date.
Beginning Farmers and Ranchers Act of 2005 - Amends the Internal Revenue Code to exclude from gross income 100 percent of the gain, up to $500,000, from the sale of qualified farm property to a first-time farmer who certifies that such property will be used for farming purposes for ten years. Allows: (1) a 50 percent exclusion for the sale of qualified farm property to any other person who certifies that such property will be used for farming purposes for ten years; and (2) a 25 percent exclusion for the sale of qualified farm property to any other person for any other use. Defines "qualified farm property" as real property located in the United States which is used for farming purposes for a specified three-year period and in which there was material participation by the taxpayer or the taxpayer's spouse or family member. Requires the recapture of tax benefits if qualified farm property is sold or ceases operation as a farm before the required ten-year period.
To amend the Internal Revenue Code of 1986 to provide an exclusion for gain from the sale of farmland to encourage the continued use of the property for farming, and for other purposes.