SECTION 1. HOMEBUYER CREDIT ALLOWED FOR ANY PURCHASE OF PRINCIPAL 
              RESIDENCE.

    (a) In General.--Subsection (a) of section 36 of the Internal 
Revenue Code of 1986 is amended by striking ``who is a first-time 
homebuyer of a principal residence'' and inserting ``who purchases a 
principal residence''.
    (b) Application to Only 1 Sale.--Subsection (b) of section 36 of 
such Code is amended by adding at the end the following new paragraph:
            ``(3) Application to only 1 sale.--
                    ``(A) In general.--Subsection (a) shall not apply 
                to more than 1 sale or exchange of a principal 
                residence by the individual.
                    ``(B) Special rule for joint returns.--In the case 
                of a joint return with respect to the sale or exchange 
                of a principal residence, if a credit was allowable 
                under subsection (a) to a spouse for a prior sale or 
                exchange of a principal residence, paragraph (1) shall 
                be applied by reducing the $8,000 in subparagraph (A) 
                thereof and the $4,000 in subparagraph (B) thereof by 
                the credit so allowable (one-half of such credit in the 
                case of a joint return).''.
    (c) Conforming Amendments.--
            (1) Subsection (c) of section 36 of such Code is amended by 
        striking paragraph (1) (defining first-time homebuyer) and by 
        redesignating paragraphs (2), (3), (4), and (5) as paragraphs 
        (1), (2), (3), and (4), respectively.
            (2) The heading for section 36 of such Code is amended by 
        striking ``First-time''.
            (3) The item in the table of sections for subpart C of part 
        IV of subchapter A of chapter 1 of such Code relating to 
        section 36 is amended to read as follows:

``Sec. Homebuyer credit.''.
    (d) Effective Date.--The amendments made by this section shall 
apply to residences purchased after the date of the enactment of this 
Act.

SEC. 2. 1-YEAR EXTENSION OF HOMEBUYER CREDIT.

    (a) In General.--Subsection (h) of section 36 of the Internal 
Revenue Code is amended by striking ``December 1, 2009'' and inserting 
``December 1, 2010''.
    (b) Extension of Waiver of Recapture.--Subparagraph (D) of section 
36(f)(4) of such Code is amended--
            (1) by striking ``December 1, 2009'' and inserting 
        ``December 1, 2010'', and
            (2) in the heading by striking ``for purchases in 2009'' 
        and inserting ``certain purchases''.
    (c) Election To Treat Purchase in Prior Year.--Subsection (g) of 
such Code is amended to read as follows:
    ``(g) Election To Treat Purchase in Prior Year.--For purposes of 
this section (other than subsections (c) and (f)(4)(D)), a taxpayer may 
elect to treat a purchase of a principal residence--
            ``(1) after December 31, 2008, and before January 1, 2010, 
        as made on December 31, 2008, and
            ``(2) after December 31, 2009, and before December 1, 2010, 
        as made on December 31, 2009.''.
    (d) Effective Date.--The amendments made by this section shall take 
effect on the date of the enactment of this Act.

SEC. 3. DEDUCTION FOR LOSS FROM SALE OF PRINCIPAL RESIDENCE.

    (a) In General.--Part VII of subchapter B of chapter I of the 
Internal Revenue Code of 1986 (relating to additional itemized 
deductions for individuals) is amended by redesignating section 224 as 
section 225 and by inserting after section 223 the following new 
section:

``SEC. 224. LOSS FROM SALE OF PRINCIPAL RESIDENCE.

    ``(a) Allowance of Deduction.--In the case of an individual, there 
shall be allowed as a deduction for the taxable year any loss 
recognized on the sale or exchange of property during the taxable year 
if, during the 5-year period ending on the date of the sale or 
exchange, such property has been owned and used by the taxpayer as the 
taxpayer's principal residence for periods aggregating 2 years or more.
    ``(b) Limitations.--
            ``(1) Aggregate limitation.--The aggregate amount allowed 
        as a deduction under subsection (a) for all taxable years shall 
        not exceed $6,000 ($12,000 in the case of a joint return).
            ``(2) Annual limitation.--
                    ``(A) In general.--The amount allowed to a taxpayer 
                as a deduction under subsection (a) for a taxable year 
                shall not exceed $2,000 ($4,000 in the case of a joint 
                return).
                    ``(B) Carryforward.--If the deduction allowable 
                under subsection (a) for any taxable year exceeds the 
                limitation imposed by subparagraph (A) for the taxable 
                year, the excess shall be carried to each of the 2 
                succeeding taxable years and added to the deduction 
                allowable under subsection (a) for such succeeding 
                year.
            ``(3) Exclusion of loss allocated to nonqualified use.--
                    ``(A) In general.--Subsection (a) shall not apply 
                to so much of the loss from the sale or exchange of 
                property as is allocated to periods of nonqualified 
                use.
                    ``(B) Allocation.--For purposes of subparagraph 
                (A), loss shall be allocated to periods of nonqualified 
                use based on the ratio which--
                            ``(i) the aggregate periods of nonqualified 
                        use during the period such property was owned 
                        by the taxpayer, bears to
                            ``(ii) the period such property was owned 
                        by the taxpayer.
                    ``(C) Period of nonqualified use; coordination with 
                recognition of gain attributable to depreciation.--For 
                purposes of this paragraph, rules similar to the rules 
                of subparagraphs (C) and (D) of section 121(b)(5) shall 
                apply.
            ``(4) Application to only 1 sale.--
                    ``(A) In general.--Subsection (a) shall not apply 
                to more than 1 sale or exchange of a principal 
                residence by the taxpayer.
                    ``(B) Special rule for joint returns.--In the case 
                of a joint return with respect to the sale or exchange 
                of a principal residence, if a deduction was allowable 
                under subsection (a) to a spouse for a prior sale or 
                exchange of a principal residence, paragraphs (1) and 
                (2)(A) shall be applied by reducing the dollar amounts 
                therein by the deduction so allowable (one-half of such 
                deduction in the case of a joint return).
    ``(c) Applicable Rules.--For purposes of this section, rules 
similar to the rules of subsection (d) of section 121 shall apply, 
except that paragraph (6) thereof shall be applied by substituting 
`loss' for `gain'.
    ``(d) Election To Have Section Not Apply.--This section shall not 
apply to any sale or exchange with respect to which the taxpayer elects 
not to have this section apply.
    ``(e) Termination.--The section shall not apply to the sale or 
exchange of a principal residence after December 31, 2010.''.
    (b) Deduction Allowed in Computing Adjusted Gross Income.--
Subsection (a) of section 62 of such Code is amended by inserting 
before the last sentence the following new paragraph:
            ``(22) Loss from sale of principal residence.--The 
        deduction allowed by section 224.''.
    (c) Clerical Amendments.--The table of sections for part VII of 
subchapter B of chapter 1 of such Code is amended by striking the item 
relating to section 224 and inserting the following:

``Sec. 224. Loss from sale of principal residence.
``Sec. 225. Cross reference.''.
    (d) Effective Date.--The amendments made by this section shall 
apply to taxable years beginning after December 31, 2008.
Amends the Internal Revenue Code relating to the first-time homebuyer tax credit to: (1) extend such credit to all purchasers of a principal residence; (2) limit the credit to one sale or exchange of a principal residence; and (3) extend such credit through November 30, 2010.

Allows individual taxpayers a tax deduction through 2010 for losses from the sale or exchange of a principal residence.
{"src": "billsum_test", "title": "To amend the Internal Revenue Code of 1986 to extend and expand the first-time homebuyers credit and to provide a loss deduction on the sale of a principal residence."}