If you're lucky enough to have access to a 401(k) through your job, you have an important choice to make: Do you keep money in your workplace plan, an IRA, or both? Each account has its pros and cons, so there are merits to spreading your money around between several accounts.

Most workers won't run into any problems doing this, but things can get a little complicated for high earners. Here's what you ought to know before contributing money to a 401(k) and IRA in the same year.

Couple looking at documents and using calculator.

Image source: Getty Images.

Can you contribute to a 401(k) and IRA at the same time?

Most workers are able to set aside up to $23,000 in a 401(k) in 2024 or $30,500 if they're 50 or older. They can also save up to $7,000 in an IRA or $8,000 if they're 50 or older. Keep in mind that these limits apply to all of your accounts of each type. For example, $7,000 is the most you can add to all of your IRAs this year. You cannot add $7,000 to each IRA in your name.

Generally, traditional 401(k) and IRA contributions reduce your taxable income for the year. In exchange, you agree to pay taxes on your withdrawals later. This is different from Roth IRAs and 401(k)s, where you pay taxes on your contributions up front and enjoy tax-free withdrawals in retirement.

But high earners aren't always eligible to make tax-deductible traditional IRA contributions. If they or their spouse are covered by a workplace retirement plan and their income is high enough, this could reduce their deductible IRA contribution limit or prohibit them from making deductible contributions at all.

This table breaks this down:

Taxpayer Type

Can Make Deductible IRA Contributions Up to the Annual Limit If Income Is Under:

Can Make a Reduced Deductible IRA Contribution If Income Is Between:

Cannot Make Deductible IRA Contributions If Income Is Over:

Single

$77,000

$77,000 and $87,000

$87,000

Married Couple Filing Jointly if You Are Covered by a Workplace Plan

$123,000

$123,000 and $143,000

$143,000

Married Couple Filing Jointly if Only Your Spouse Is Covered by a Workplace Plan

$230,000

$230,000 to $240,000

$240,000

Married Couple Filing Separately

N/A

$0 and $10,000

$10,000

Data source: IRS. Table by author.

But don't be discouraged if your income prohibits you from deducting your traditional IRA contributions. You can still make nondeductible contributions up to the annual limit. You pay taxes on these up front, just as you would with Roth IRA contributions.

But your earnings aren't tax-free. They grow tax-deferred, so you won't owe the government a cut until you withdraw the funds in retirement.

Are nondeductible IRA contributions worth it?

Nondeductible IRA contributions can make your tax situation a little more complicated, but they can still be valuable. Your contributions will grow tax-free, and you won't have to worry about taxes on earnings until you withdraw the money.

Some people with nondeductible contributions choose to do a backdoor Roth IRA with these funds. This enables you to convert your savings to Roth funds, even if your income exceeds the Roth IRA's income limits for the year. Once you've done this and paid taxes on your converted funds, your earnings grow tax-free.

If this seems too complicated for you, you may prefer to avoid nondeductible contributions altogether. You could choose to save in just your workplace retirement plan to start.

If you'd like to set aside more than your 401(k) allows, you could put some extra cash in a health savings account (HSA). Though not intended for retirement savings, these accounts can be great homes for these funds anyway, especially if you invest them.

Keep in mind that retirement account contribution limits and the income limits for making deductible IRA contributions will likely rise in the coming years. So always check what these are and how they compare to your estimated income each year before you set any money aside for retirement.