To amend the Internal Revenue Code of 1986 to provide that qualified homeowner downpayment assistance is a charitable purpose, and for other purposes.

SECTION 1. SHORT TITLE.

    This Act may be cited as the ``Homeownership Affordability Act of 
2007''.

SEC. 2. QUALIFIED HOMEOWNER DOWNPAYMENT ASSISTANCE.

    (a) In General.--Section 501 of the Internal Revenue Code of 1986 
(relating to exemption of tax on corporations, certain trusts, etc.) is 
amended by redesignating subsection (r) as subsection (s) and by 
inserting after subsection (q) the following new subsection:
    ``(r) Qualified Homeowner Downpayment Assistance.--
            ``(1) In general.--For purposes of subsection (c)(3) and 
        sections 170(c)(2), 2055(a)(2), and 2522(a)(2), the term 
        `charitable purposes' includes the provision of qualified 
        homeowner downpayment assistance.
            ``(2) Qualified homeowner downpayment assistance.--For 
        purposes of this subsection, the term `qualified homeowner 
        downpayment assistance' means a gift of cash for the purpose of 
        providing any downpayment for the acquisition of any property 
        as a principal residence (within the meaning of section 121) 
        for a qualified taxpayer if--
                    ``(A) with respect to such property, such gift does 
                not exceed 20 percent of 110 percent of the maximum 
                principal obligation allowable, and
                    ``(B) the purchase price of such property does not 
                exceed 110 percent of the maximum principal obligation 
                allowable.
            ``(3) Maximum principal obligation allowable.--The maximum 
        principal obligation allowable with respect to any property is 
        the maximum principal obligation allowable for the area in 
        which such property is located, determined under section 
        203(b)(2)(A) of the National Housing Act, for a loan insured 
        pursuant to such section 203.
            ``(4) Qualified taxpayer.--For purposes of paragraph (2), 
        the term `qualified taxpayer' means a taxpayer whose modified 
        adjusted gross income for the taxable year in which the 
        downpayment assistance is received does not exceed $110,000 
        ($220,000 in the case of a joint return). For purposes of the 
        preceding sentence, the term `modified adjusted gross income' 
        means adjusted gross income increased by any amount excluded 
        from gross income under section 911, 931, or 933.''.
    (b) No Charitable Deduction for Contributions for Downpayment 
Assistance.--Subsection (f) of section 170 of the Internal Revenue Code 
of 1986 (relating to disallowance of deduction in certain cases and 
special rules) is amended by adding at the end the following new 
paragraph:
            ``(19) Denial of deduction of contributions for downpayment 
        assistance.--No deduction shall be allowed under this section 
        for a contribution to an organization which provides homeowner 
        downpayment assistance if the contribution is made directly or 
        indirectly in connection with a transaction in which the 
        purchaser of a home received downpayment assistance and the 
        contributor--
                    ``(A) received the downpayment assistance,
                    ``(B) sold the home to the purchaser,
                    ``(C) loaned money to the purchaser, or
                    ``(D) otherwise received a commission or other 
                benefit associated with the transaction.''.
    (c) Exclusion From Taxable Gifts.--
            (1) In general.--Paragraph (2) of section 2503(e) of such 
        Code (relating to exclusion for certain transfers for 
        educational expenses or medical expenses) is amended by 
        striking ``or'' at the end of subparagraph (A), by striking the 
        period at the end of subparagraph (B) and inserting ``, or'', 
        and by inserting after subparagraph (B) the following new 
        subparagraph:
                    ``(C) if such payment is qualified homeowner 
                downpayment assistance (as defined in section 
                501(r)(2)) paid to a lender or the seller of the 
                property on behalf of a donee who is related to the 
                donor.''.
            (2) Relationship test.--Paragraph (2) of section 2503(e) of 
        such Code is amended by adding at the end the following flush 
        sentence:
        ``For purposes of subparagraph (C), a donee is related to a 
        donor if the donee bears a relationship to the donor described 
        in section 529(e)(2) (other than subparagraph (D) thereof).''.
            (3) Conforming amendment.--The heading for section 2503(e) 
        of such Code is amended by striking ``Educational Expenses or 
        Medical Expenses'' and inserting ``Educational Expenses, 
        Medical Expenses, or Downpayment Assistance''.
    (d) Effective Date.--The amendments made by this section shall 
apply to taxable years ending after the date of the enactment of this 
Act.

Summary: Homeownership Affordability Act of 2007 - Amends the Internal Revenue Code to deem qualified homeowner downpayment assistance as a charitable purpose for income, estate, and gift tax purposes. Defines "qualified homeowner downpayment assistance" as a gift of cash for the purpose of providing any downpayment for the purchase of a principal residence for a taxpayer whose modified adjusted gross income does not exceed $110,000 ($220,000 for joint returns), if: (1) such gift does not exceed 20% of 110 percent of the maximum principal obligation allowable; and (2) the purchase price of such property does not exceed 110 percent of such amount.

Denies an income tax deduction to a donor of homeowner downpayment assistance who receives a direct financial benefit in connection with the purchase of a principal residence for which downpayment assistance was provided.

Allows a gift tax exclusion for a homeowner downpayment gift.