This article has been updated to reflect 2022 contribution and deductibility limits.

The two main types of retirement vehicles in the U.S. are Individual Retirement Accounts (IRAs) and employer-sponsored accounts, such as 401(k)s. These are similar in many respects, and both offer tax advantages. But if you’re eligible to contribute to either type of account, should you choose one over the other? It depends on your situation.

First, we’ll assume that you’re financially ready to invest, meaning you have adequate savings and you’re carrying no debt (other than a mortgage and, possibly, manageable school loans). That done? The next step is to determine how much you need to invest each month to reach your retirement-funding goal.

For a ballpark figure, use a free online resource such as the Fidelity Retirement Score calculator. For more precise projections, we recommend MoneyGuide, the full-featured planning tool available to SMI Premium-level members (for a $50 one-time fee).

For the purposes of illustration, we’ll assume you’ve run the numbers and are going to set aside 10% of your income for retirement. Now you’re ready for the 401(k)-or-IRA decision.

Hey, gotta match?

Here, the first consideration is: Does your employer match a portion of what you would contribute to a 401(k)? If so, terrific! That match is the easiest money you’ll ever make. Typically, an employer will contribute 50 cents (or perhaps a dollar) for every dollar you contribute up to a maximum of 6% of your salary.

Under such an arrangement, you effectively earn a 50% (or a 100%) return on your money, even if you choose the most conservative investment option in your plan (which we wouldn’t recommend). So if a match is available, contribute the full amount eligible for the match. In the above scenario, that would be 6% of your salary.

One thing to watch out for: Some 401(k) plans have vesting rules that restrict access to the employer-contributed money until after the employee has worked for that employer for a certain number of years. (Such rules give employees a disincentive to jump ship.) So find out if your employer has a vesting requirement.

When you’ve met your match

We assumed you made the commitment to set aside 10% of your earnings for retirement. So far, you’ve chosen to contribute 6% to your workplace 401(k) so you can get the highest possible employer match. So, what about the remaining 4%? If your 401(k) offers only a few fund choices, we’d suggest investing that 4% in an Individual Retirement Account. (To learn about the differences between a Traditional IRA a Roth IRA, see Making Sense of Your IRA Options.)

Unfortunately, there’s a hitch for higher-income earners: Congress has limited the tax-deductibility of IRA contributions for higher-earning workers who are covered by a workplace retirement plan. Here are the 2022 rules: For a married couple filing jointly, a fully deductible contribution to a traditional IRA is allowed only if their modified adjusted gross income (MAGI) is $109,000 or less. For singles, MAGI has to be $68,000 or less.

The tax-deductibility of contributions begins to phase out above those levels, until disappearing for a married couple with an income of $129,000 or more and an individual with an income of $78,000 or more. (To be clear, earners with incomes over the thresholds can make IRA contributions but there is no tax benefit.)

Contribution rules for Roth IRAs are different. Whether someone has a workplace plan doesn’t come into play. Instead, Roth restrictions are based solely on income. A married couple (filing jointly) must have a modified adjusted gross income below $204,000 to be eligible to make a full contribution to a Roth IRA. For a single person, the income threshold is $129,000.

At those thresholds, the IRS begins to restrict how much can be invested in a Roth IRA. Contribution eligibility phases out completely for any married couple with an income above $214,000 and for an individual with an income over $144,000.

If these contribution restrictions don’t apply to you, here is why we typically suggest investing via an IRA once you reach the matching limit in your 401(k): flexibility. Individual Retirement Accounts offer virtually unlimited investment choices. In contrast, 401(k) plans typically have a restricted number of choices — some may have only a handful of funds from which to choose.

The best situation is a workplace plan with a “brokerage window” that opens up access to a broad range of choices. But even then, you may want to supplement your 401(k) with an IRA. That’s because workplace plans sometimes charge higher fees than you’d pay in an Individual Retirement Account.

When an IRA should be your first choice

If your employer doesn’t match employee contributions, your 401(k)-or-IRA decision is easy. Start with an IRA for the reasons mentioned above — more investment choices and lower fees.

Unfortunately, IRAs have a significant downside too: You may not be able to contribute as much as you’d like. The IRA contribution limit is only $6,000, with an additional $1,000 “catch-up” amount allowed for anyone age 50 or older. (If you’re married, you can effectively double these amounts by opening IRAs for both you and your spouse.)

If you max out your IRA options and still want to invest more toward your retirement, you can then turn to your workplace 401(k) plan, which has much more generous contribution limits. Under current law (2022), 401(k) participants can contribute $20,500. Those over age 50 are allowed to add another $6,500.

Other considerations

Making an early withdrawal from a retirement account can be costly. So, generally speaking, you shouldn’t invest via such an account unless you expect to leave the money invested until retirement. Still, it’s good to know the early-withdrawal rules just in case.

With a 401(k), “hardship” withdrawals are allowed under certain circumstances but typically incur a 10% IRS penalty if the account holder is under age 59½. (Exception: A worker who is at least 55 and leaves an employer can gain early access to 401(k) funds without incurring a penalty.) With a traditional 401(k) — as opposed to a Roth — income taxes will be due on the withdrawal too.

Some 401(k) plans (it depends on the employer) allow account holders to borrow a portion of their balance and pay it back, with interest, within five years. If the account holder leaves the employer for any reason, however, the loan must be repaid sooner: The deadline becomes the due date for the account holder’s federal tax return. (If the employee left in 2021, for example, the repayment deadline would be April 15, 2022, the due date for 2021 tax returns.)

As for withdrawing money early from an Individual Retirement Account, distributions made before an account holder reaches age 59½ incur a 10% IRS penalty. If the account is a traditional IRA, taxes will be assessed too. Penalties (but not taxes) are waived for withdrawals related to certain hardships, qualified education expenses, and first-time home purchases.

Roth IRAs have a distinct advantage when it comes to early withdrawals: contributions can be withdrawn without incurring any taxes or penalties. (Since Roth contributions are made “after-tax,” taxes have already been paid.) This no-additional-tax feature allows Roth IRA contributions to serve as a backup emergency savings fund — to be used only in the case of a genuine emergency, of course!

Withdrawing Roth earnings (as opposed to contributions) typically will incur taxes unless the account holder is at least 59½ and has had the account for five years or longer. One exception: Earnings can be withdrawn tax-free (up to $10,000) if the money is used for a first-home purchase.

Summary

An employer-sponsored retirement account has certain advantages over an IRA and vice versa. Depending on your income level and employment situation, you may be able to invest in an employer plan and an Individual Retirement Account, thus enjoying the best of both worlds!

For further guidance, we encourage you to use SMI’s 401(k)/IRA Decision Tree, a free resource available as a downloadable PDF file at soundmindinvesting.com/resources#ira-tools.