case of any taxable year beginning in a calendar year after 2017, the amount otherwise allowable as a deduction by reason of paragraph (2)(D) shall be the applicable percentage of such amount. (B) Applicable percentage For purposes of subparagraph (A), the applicable percentage shall be determined in accordance with the following table: For taxable years beginning in calendar year: The applicable percentage is: 2017 100% 2018 80% 2019 60% 2020 40% 2021 20% 2022 and thereafter 0%. . (c) Phasedown of mortgage limit Subparagraph (B) of section 163(h)(3) of such Code is amended by adding at the end the following: (iii) Phasedown (I) In general In the case of any taxable year beginning in calendar years 2017 through 2021, clause (ii) shall be applied by substituting the amounts specified in the table in subclause (II) of this clause for $1,000,000 and $500,000 , respectively. (II) Phasedown amounts For purposes of subclause (I), the amounts specified in this subclause for a taxable year shall be the amounts specified in the following table: For taxable years beginning in calendar year: Amount substituted for $1,000,000: Amount substituted for $500,000: 2017 $1,000,000 $500,000 2018 $900,000 $450,000 2019 $800,000 $400,000 2020 $700,000 $350,000 2021 $600,000 $300,000. . (d) Clerical amendment The table of sections for subpart A of part IV of subchapter A of chapter 1 of such Code is amended by inserting after section 25D the following new item: Sec. 25E. Interest on indebtedness secured by qualified residence. . (e) Effective date The amendments made by this section shall apply with respect to interest paid or accrued after December 31, 2016. 4. Deduction allowed for interest and taxes relating to land for dwelling purposes owned or leased by cooperative housing corporations (a) In general Subparagraph (B) of section 216(b)(1) of the Internal Revenue Code of 1986 is amended by inserting or land, after building, . (b) Effective date The amendment made by subsection (a) shall apply to amounts paid or accrued after