Line 5
The deduction for state and local taxes is generally limited to $40,000 ($20,000 if married filing separately). State and local taxes subject to this limit are the taxes that you include on lines 5a, 5b, and 5c.
Safe harbor for certain charitable contributions made in exchange for a state or local tax credit.
If you made a charitable contribution in exchange for a state or local tax credit and your charitable contribution deduction must be reduced as a result of receiving or expecting to receive the tax credit, you may qualify for a safe harbor that allows you to treat some or all of the disallowed charitable contribution as a payment of state and local taxes.
The safe harbor applies if you meet the following conditions.
You made a cash contribution to an entity described in section 170(c).
In return for the cash contribution, you received a state or local tax credit.
You must reduce your charitable contribution amount by the amount of the state or local tax credit you receive.
For more information about this safe harbor and examples, see Treasury Regulation 1.164-3(j).
U.S. territory taxes.
Include taxes imposed by a U.S. territory with your state and local taxes on lines 5a, 5b, and 5c. However, don't include any U.S. territory taxes you paid that are allocable to excluded income.
You may want to take a credit for U.S. territory tax instead of a deduction. See the instructions for Schedule 3 (Form 1040), line 1, for details.