1. Short title This Act may be cited as the Stop Corporate Earnings Stripping Act of 2017 . 2. Prevention of earnings stripping of corporations which are related to inverted corporations (a) In general Section 7874 of the Internal Revenue Code of 1986 is amended by redesignating subsection (g) as subsection (h) and by inserting after subsection (f) the following new subsection: (g) Special rules applicable to earnings stripping and related party transactions (1) In general In the case of any corporation which is a related corporation for any taxable year, section 163(j) shall be applied with the following modifications: (A) 5-year limitation on carryforward of disallowed amounts For purposes of determining any amount carried to, or from, such taxable year under subparagraph (B) of section 163(j)(1), such subparagraph shall be applied by substituting in the 1st succeeding taxable and in the 2nd through 5th succeeding taxable years to the extent disallowed under subparagraph (A) in the preceding taxable year (determined on a first-in, first-out basis and by treating the amount carried forward under this subparagraph as allowed under subparagraph (A) before amounts otherwise taken into account under subparagraph (A)) for in the succeeding taxable year . (B) Rules for determining whether interest limitation rules apply In applying section 163(j)(2) to determine whether section 163(j) applies to such related corporation for such taxable year— (i) subparagraph (A)(ii) shall be disregarded, and (ii) subparagraph (B)(i)(II) shall be applied by substituting 25 percent of the adjusted taxable income of the corporation for the sum of 50 percent of the adjusted taxable income of the corporation plus any excess limitation carryforward under clause (ii) for purposes of determining the corporation's excess interest expense for such taxable year. (2) Related corporation For purposes of this subsection— (A) In general The term related corporation means any corporation for any taxable year if, at any time during such taxable