Re-posting in Retirement Topic as recommended.
I retired early in 2019. I had 19,000 in gross pay. I had a HD Health plan all year. I am married. My employer contributed $700 to my HSA and I contributed $300 through payroll deduction. So my W2 wages will be 18,700. I also contributed $1,200 to a Roth 401k. Can I contribute $7000 to my Roth IRA, $7000 to my wife’s Roth IRA and the remaining $7000 to my HSA? Or, am I limited to a total of $17,500 (19,000 gross pay – 1,200 Roth 401k – 300 HSA payroll deduction) for these contributions. Earned Income is required for the IRA’s, but not the HSA. However, if I were to use payroll deductions for all of my HSA contributions, then my W2 wages would be reduced by this amount. Since I am contributing to the HSA on my own, does this no longer apply? (All number are rounded for easier math.)
Bottom Line: Do I need to reduce my wages that I can contribute to a Roth IRA by my Roth 401k and / or HSA contributions?
Table 1-1. in Publication 590 “Compensation for Purposes of an IRA” Doesn’t include …any amounts you exclude from income.
But you do not have to have earned income for an HSA, and Roth 401k contributions are not excluded from income.
It appears that one of you is 55 and the other 50-54 from the HSA limits you posted. Box 1 of your W-2 should be 18,700 unless there are other pre tax deductions (FSA, pre tax health premiums, etc. That leaves room to max out your Roth IRA contributions @ 7000 each including spousal contribution, and add 7000 to your HSA contributions to max out the HSA at 8000.
Since Roth 401k contributions do not reduce your W-2 Box 1 amount, you could have contributed much more to the Roth 401k without affecting your taxable comp eligible for Roth IRA contributions. As such, when making Roth 401k contributions, you can use the same income for making either Roth IRA or TIRA contributions.