gross income of the taxpayer for such taxable year increased by any amount excluded from gross income under section 911, 931, or 933 for such taxable year. (C) Applicable threshold For purposes of subparagraph (A), the applicable threshold is— (i) except as provided in clauses (ii) and (iii), $100,000, (ii) an amount equal to 150 percent of the amount in effect under clause (i), in the case of a head of household (as defined in section 2(b)), and (iii) an amount equal to 200 percent of the amount in effect under clause (i), in the case of a joint return. (4) Additional limitations No credit shall be allowed under subsection (a) with respect to the purchase of any residence for a taxable year— (A) if the taxpayer is a nonresident alien, or (B) if— (i) the taxpayer has not attained age 18 as of the date of such purchase, or (ii) a deduction under section 151 with respect to the taxpayer is allowable to another taxpayer for the taxable year. In the case of a taxpayer who is married, the taxpayer shall be treated as meeting the age requirement of subparagraph (B)(i) if the taxpayer or the taxpayer's spouse meets such age requirement. (5) Multiple purchasers If 2 or more individuals who are not married purchase a principal residence, the amount of the credit under subsection (a) shall be allocated among such individuals in such manner as the Secretary may prescribe by taking into account the requirements of paragraphs (2) and (3), except that the total amount of the credits allowed to all such individuals shall not exceed the limitation under paragraph (1) (as modified by paragraph (7)). (6) Married couples must file joint return If an individual is married at the close of the taxable year, the credit shall be allowed under subsection (a) only if the individual and the individual's spouse file a joint return for the taxable year. (7) Adjustment for inflation In the case of any taxable year beginning after December 31, 2024, each of the dollar amounts in paragraphs (1), (2)(A)(ii), and (3)(C)(i) shall be increased by