SECTION 1. SHORT TITLE.

    This Act may be cited as the ``Mortgage Cancellation Relief Act of 
2004''.

SEC. 2. EXCLUSION FROM GROSS INCOME FOR CERTAIN FORGIVEN MORTGAGE 
              OBLIGATIONS.

    (a) In General.--Paragraph (1) of section 108(a) of the Internal 
Revenue Code of 1986 (relating to exclusion from gross income) is 
amended by striking ``or'' at the end of subparagraph (C), by striking 
the period at the end of subparagraph (D) and inserting ``, or'', and 
by inserting after subparagraph (D) the following new subparagraph:
                    ``(E) in the case of an individual, the 
                indebtedness discharged is qualified residential 
                indebtedness.''.
    (b) Qualified Residential Indebtedness Shortfall.--Section 108 of 
such Code (relating to discharge of indebtedness) is amended by adding 
at the end the following new subsection:
    ``(h) Special Rules for Qualified Residential Indebtedness.--
            ``(1) Limitations.--
                    ``(A) In general.--The amount excluded under 
                subparagraph (E) of subsection (a)(1) with respect to 
                any qualified residential indebtedness shall not exceed 
                the excess (if any) of--
                            ``(i) the outstanding principal amount of 
                        such indebtedness (immediately before the 
                        discharge), over
                            ``(ii) the sum of--
                                    ``(I) the amount realized from the 
                                sale of the real property securing such 
                                indebtedness reduced by the cost of 
                                such sale, and
                                    ``(II) the outstanding principal 
                                amount of any other indebtedness 
                                secured by such property.
                    ``(B) Overall limitation.--The amount excluded 
                under subparagraph (E) of subsection (a)(1) with 
                respect to any qualified residential indebtedness shall 
                not exceed $50,000.
            ``(2) Qualified residential indebtedness.--
                    ``(A) In general.--The term `qualified residential 
                indebtedness' means indebtedness which--
                            ``(i) was incurred or assumed by the 
                        taxpayer in connection with real property used 
                        by the taxpayer as a principal residence 
                        (within the meaning of section 121) and is 
                        secured by such real property,
                            ``(ii) is incurred or assumed to acquire, 
                        construct, reconstruct, or substantially 
                        improve such real property, and
                            ``(iii) with respect to which such taxpayer 
                        makes an election to have this paragraph apply.
                    ``(B) Refinanced indebtedness.--Such term shall 
                include indebtedness resulting from the refinancing of 
                indebtedness under subparagraph (A)(ii), but only to 
                the extent the refinanced indebtedness does not exceed 
                the amount of the indebtedness being refinanced.
                    ``(C) Exceptions.--Such term shall not include 
                qualified farm indebtedness or qualified real property 
                business indebtedness.
            ``(3) Regulations.--The Secretary may by regulation provide 
        for the disallowance of an exclusion under this section by 
        reason of subparagraph (E) of subsection (a)(1) in cases where 
        the failure to repay the indebtedness is due to the bad faith 
        of the taxpayer.''.
    (c) Conforming Amendments.--
            (1) Paragraph (2) of section 108(a) of such Code is 
        amended--
                    (A) in subparagraph (A) by striking ``and (D)'' and 
                inserting ``(D), and (E)'', and
                    (B) by amending subparagraph (B) to read as 
                follows:
                    ``(B) Insolvency exclusion takes precedence over 
                qualified farm exclusion, qualified real property 
                business exclusion, and qualified residential shortfall 
                exclusion.--Subparagraphs (C), (D), and (E) of 
                paragraph (1) shall not apply to a discharge to the 
                extent the taxpayer is insolvent.''.
            (2) Paragraph (1) of section 108(b) of such Code is amended 
        by striking ``or (C)'' and inserting ``(C), or (E)''.
            (3) Subsection (b) of section 121 of such Code is amended 
        by adding at the end the following new paragraph:
            ``(4) Special rule relating to discharge of indebtedness.--
        The amount of gain which (but for this paragraph) would be 
        excluded from gross income under subsection (a) with respect to 
        a principal residence shall be reduced by any amount excluded 
        from the gross income of the taxpayer under section 
        108(a)(1)(E) with respect to such residence.''.
    (d) Effective Date.--The amendments made by this section shall 
apply to discharges after the date of the enactment of this Act.
Mortgage Cancellation Relief Act of 2004 - Amends the Internal Revenue Code to exclude from gross income amounts up to $50,000 attributable to the discharge of certain residential mortgage obligations.
{"src": "billsum_test", "title": "A bill to amend the Internal Revenue Code of 1986 to exclude from gross income of individual taxpayers discharges of indebtedness attributable to certain forgiven residential mortgage obligations."}