; and (C) revitalizes distressed neighborhoods. (b) Allowance of credit Subpart D of part IV of subchapter A of chapter 1 of the Internal Revenue Code of 1986, as amended by section 213, is amended by inserting after section 42A the following new section: 42B. Neighborhood homes credit (a) Allowance of credit For purposes of section 38, the neighborhood homes credit determined under this section for the taxable year is, with respect to each qualified residence sold by the taxpayer during such taxable year in an affordable sale, the lesser of— (1) an amount equal to— (A) the excess (if any) of— (i) the reasonable development costs paid or incurred by the taxpayer with respect to such qualified residence, over (ii) the sale price of such qualified residence (reduced by any reasonable expenses paid or incurred by the taxpayer in connection with such sale), or (B) if the neighborhood homes credit agency determines it is necessary to ensure financial feasibility, an amount not to exceed 120 percent of the amount under subparagraph (A), (2) 35 percent of the eligible development costs paid or incurred by the taxpayer with respect to such qualified residence, or (3) 28 percent of the national median sale price for new homes (as determined pursuant to the most recent census data available as of the date on which the neighborhood homes credit agency makes an allocation for the qualified project). (b) Development costs For purposes of this section— (1) Reasonable development costs (A) In general The term reasonable development costs means amounts paid or incurred for the acquisition of buildings and land, construction, substantial rehabilitation, demolition of structures, or environmental remediation, to the extent that the neighborhood homes credit agency determines that such amounts meet the standards specified pursuant to subsection (f)(1)(C) (as of the date on which construction or substantial rehabilitation is substantially complete, as determined by such agency) and are necessary to ensure the financial feasibility