If you had to repay an amount of Social Security Benefits that you included in your income in an earlier year, you may be able to deduct the amount repaid from your income for the year in which you repaid it. This is explained in IRS Publication 915 Social Security and Equivalent Railroad Retirement Benefits:
Repayment of Benefits. Any repayment of benefits you made during 2019 must be subtracted from the gross benefits you received in 2019. It doesn’t matter whether the repayment was for a benefit you received in 2019 or in an earlier year. If you repaid more than the gross benefits you received in 2019, see Repayments More Than Gross Benefits, later.
Your gross benefits are shown in box 3 of Form SSA-1099 or Form RRB-1099. Your repayments are shown in box 4. The amount in box 5 shows your net benefits for 2019 (box 3 minus box 4). Use the amount in box 5 to figure whether any of your benefits are taxable.
Repayments More Than Gross Benefits
In some situations, your Form SSA-1099 or Form RRB-1099 will show that the total benefits you repaid (box 4) are more than the gross benefits (box 3) you received. If this occurred, your net benefits in box 5 will be a negative figure (a figure in parentheses) and none of your benefits will be taxable. Don’t use Worksheet 1 in this case. If you receive more than one form, a negative figure in box 5 of one form is used to offset a positive figure in box 5 of another form for that same year.
Joint Return. . If you and your spouse file a joint return, and your Form SSA-1099 or RRB-1099 has a negative figure in box 5, but your spouse's does not, subtract the amount in box 5 of your form from the amount in box 5 of your spouse's form. You do this to get your net benefits when figuring if your combined benefits are taxable.
Repayment of benefits received in an earlier year. If the total amount shown in Box 5 of all of your Forms SSA-1099 and RRB-1099 is a negative figure, you may be able to deduct part of this negative figure that represents benefits you included in gross income in an earlier year, if the figure is more than $3,000. If the figure is $3,000 or less, it is a miscellaneous itemized deduction and can no longer be deducted.
Deduction more than $3,000. If this deduction is more than $3,000, you should figure your tax two ways.
Compare the tax figured in methods 1 and 2. Your tax for 2019 is the smaller of the two amounts. If method 1 results in less tax, take the itemized deduction on Schedule A (Form 1040 or 1040-SR), line 16. If method 2 results in less tax, claim a credit for the amount from step 2c above on Schedule 3 (Form 1040 or 1040-SR), line 13. Check box d and enter “I.R.C. 1341” in the space next to that box. If both methods produce the same tax, deduct the repayment on Schedule A (Form 1040 or 1040-SR), line 16.
To enter the credit into the TaxAct program:
The text "IRC 1341" will appear when the return is printed.