In an ideal world, everyone could max out their 401(k) and IRA. Unfortunately, most people aren't in a financial position to do so.

For tax year 2023, the maximum contribution to a 401(k) is $22,500 ($30,000 if you're 50 or older). For IRAs -- both Roth and traditional combined -- the maximum is $6,500 ($7,500 if you're 50 or older).

Considering the median income in the U.S. is just over $70,000, it's a lot to ask someone to invest $29,000 to $37,500. That's why I recommend the following strategy that allows you to get the best of both worlds.

Someone sitting in a chair looking at a laptop.

Image source: Getty Images

The difference between retirement accounts

A 401(k) is an employer-sponsored retirement account that lets you save and invest a portion of your paycheck pre-taxes. Investing pre-tax money for retirement has the two-for-one benefit of saving money in the present by lowering your taxable income and setting yourself up for long-term growth.

IRAs are tax-advantaged accounts that work similarly to regular brokerage accounts. Unlike a 401(k), an IRA isn't tied to an employer and must be opened on your own. There are two main types of IRAs: Roth and traditional.

With a Roth IRA, you invest after-tax money and can take tax-free withdrawals in retirement. Contributions to a traditional IRA are also after-tax, but there's a chance you can deduct your contributions, depending on your filing status, income, and whether you or your spouse is covered by a retirement plan at work.

Always aim for the maximum employer match

One of the appeals of a 401(k) is the employer match that's often offered. With an employer match, your company will match up to a specified amount of your contributions, usually set as a percentage.

You almost always want to contribute at least enough to your 401(k) to earn the maximum your employer will match. Whatever they'll match up to, that's the minimum you want to contribute. Contributing anything less is leaving "free" money on the table. 

If you make $100,000 and your employer will match up to 5%, that's an extra $5,000 each year into your 401(k) if you contribute 5%. If you only contribute 3%, that's $2,000 extra that you left on the table. An employer match is essentially a guaranteed (and immediate) 100% return on your contribution.

Turn your attention to maxing out your IRA next

After you're contributing enough to get your maximum employer match, begin putting any amount over that into an IRA. A couple of the drawbacks of a 401(k) are their fees and limited investment options, and that's where an IRA can pick up the slack.

Since they operate similarly to brokerage accounts, you can invest in any individual company or exchange-traded fund (ETF) that you want in an IRA. Having the freedom to choose whatever stocks you want helps ensure your investments match your goals and risk tolerance. That may not always be true with the given 401(k) options.

Since you can choose your own investments, you can often save money on fees associated with a 401(k). The 401(k) fees vary by account, but if you don't have access to high-quality low-fee index funds or if your employer passes on administrative costs to employees, you could end up paying anywhere from 0.5% to 2%. In an IRA, the only fee would be the expense ratio if you invest in an ETF.

If you're able to max out your IRA, you should -- then up your 401(k) contribution percentage if you can.

Always consider your personal situation

This strategy helps you get the best of both worlds. You get to make the most of your employer match, which is guaranteed returns, as well as take advantage of the freedom that comes with an IRA.

There isn't a correct cookie-cutter approach to retirement, so it's always important to consider your personal financial situation first. If you're in a financial position to max out both a 401(k) and IRA simultaneously, by all means do it. If only contributing enough to get your employer match is feasible for you, that's fine, too. 

No matter where you're at in your financial journey, any step toward saving and investing for retirement is a good one.