Except as provided in paragraph (2), the amendments made by subsections (a) shall apply to— (A) taxable years beginning after December 31, 2017, and (B) taxable years beginning on or before December 31, 2017, to which net operating losses arising in taxable years beginning after December 31, 2017, are carried. (2) Carrybacks In the case of the amendments made by subsections (b) and (c), and so much of subsection (a) as relates to the carryback of net operating losses, such amendments shall apply to net operating losses arising in taxable years ending after December 31, 2017, and beginning before January 1, 2021. F Employee retention credit 251. Payroll credit for certain employers affected by COVID–19 (a) In general In the case of an eligible employer, there shall be allowed as a credit against the tax imposed by section 3111(a) or 3221(a) of the Internal Revenue Code of 1986 for each calendar quarter an amount equal to 80 percent of the qualified wages allocable to the inoperable trade or business with respect to each employee of such employer for such calendar quarter. (b) Limitations and refundability (1) Wages taken into account The amount of qualified wages with respect to any employee which may be taken into account under subsection (a) by the eligible employer for all calendar quarters shall not exceed $10,000. (2) Credit limited to employment taxes The credit allowed by subsection (a) with respect to any calendar quarter shall not exceed the tax imposed by section 3111(a) or 3221(a) of the Internal Revenue Code of 1986 for such calendar quarter (reduced by any credits allowed under subsections (e) and (f) of section 3111 and sections 7001 and 7003 of the Families First Coronavirus Response Act) on the wages paid with respect to the employment of all the employees of the eligible employer. (3) Refundability of excess credit (A) In general If the amount of the credit under subsection (a) exceeds the limitation of paragraph (2) for any calendar quarter, such excess shall be treated as an overpayment that