Start your developer blog today!
Email me

How do the Various Retirement Accounts Compare? (401k vs IRA vs HSA)

Jan 17, 2020 8 min read

I see you’ve been told that you need to start saving money for retirement in order to enjoy the old life.

But in order to have an enjoyable, comfortable retirement, you have to push through what many call the boring part: this stuff.

I don’t know what you guys are talking about, though. This stuff is thrilling.

Maybe you’ve watched a few Youtube videos or read a few definitions, but it’s not quite yet crystal clear how retirement planning works.

Is it literally just putting money away until later? Is it just investing? Or is it more than that?

When I started my journey saving for retirement, it was easy to understand what a 401k was and what an IRA was, but I found it hard for it to stick. It clicked when these few ideas came together.

The purpose of every retirement account is to save money on taxes.

This is the idea to remember.

The reason why any retirement account exists is to pay fewer taxes on the money we earn.

We call these tax-advantaged accounts.

In each of these accounts, you can invest however you want. Mutual funds, ETFs, stocks, you name it. The only difference is when you’re taxed.

Over a long period of time (e.g. the 20-40 years you may have until retirement), any amount of tax will add up and eat away at your retirement savings. That is why tax-advantaged accounts are quite popular for long-term savings.

The Three Tax Benefits

There are three tax benefits that we can use to compare these three retirement accounts:

1. Tax-Free Contributions

If an account offers tax-free contributions, then your money goes straight to your retirement account before it is taxed (pre-tax). You’ll never see it in your checking account.

If you were to transfer money from your checking account into your retirement account, then that is a post-tax contribution since any income you’ve earned has been taxed.

In order words, you get a tax deduction and lower your taxable income when you put money into an account with pre-tax contributions.

2. Tax-Free Growth

If your investments grow tax-free in a retirement account, then you won’t pay any taxes on any earned money.

You could buy any stock. Let’s say the stock doubles. You’re good to go. No tax.

Taxable accounts (e.g. traditional savings accounts, brokerage accounts, CDs, money markets, etc.) require you to pay a capital gains tax the year your investments gain value.

3. Tax-Free Withdrawals

An account with tax-free withdrawals does not require taxes to be paid on any money you take out of it, given that you follow their withdrawal rules.


The three retirement plans follow this table below.

Tax-Free ContributionsTax-Free GrowthTax-Free Withdrawals
Roth IRA

In the next section, I explain each of these plans in more depth.

1. Traditional 401k Plan

Tax-Free ContributionsTax-Free GrowthTax-Free Withdrawals

The traditional 401k plan is a very popular employer-sponsored savings plan, which simply means that it’s only available if your employer offers it for you.

Many employers offer 401k matching, meaning they will double the pre-trax money that you contribute (with limits, of course). They may offer a dollar-for-dollar matching or **50% matching up to**a certain percentage of your salary.

For example, a dollar-for-dollar matching up to 5% of a $100,000 salary means that if you contribute $5,000 to your 401k, you will actually have $10,000 in your 401k. If you contribute $1,000, you will have $2,000. If you contribute $8,000, you will have $13,000. Simple, right?

As of 2020, the 401k contribution limit is $19,500 for workers under the age of 50 and $26,000 for those 50 and above.

While this is employer-sponsored, anything you contribute stays with you even if you were to leave that employer. That being said, be sure to read up on the employer benefits. Some employers will not offer the match until you’ve worked with them for a number of years.

At 59 1/2 years old, you have the option of withdrawing funds that will be taxed at the income rate for that year. If you were to withdraw anytime earlier, you will pay a 10% withdrawal penalty along with income tax on the distribution. That would be very sad. So don’t do it, please.

At 70 1/2 years old, you are required to take distributions.

Plans Similar to the 401k

2. Roth IRA (Individual Retirement Account)

Tax-Free ContributionsTax-Free GrowthTax-Free Withdrawals
Roth IRA

The term Roth refers to post-tax contributions. Well, it refers to a guy named William V. Roth. I guess he’s not just any guy. He was a Senator. But that’s beside the point.

You don’t get the tax benefit during that year you contribute, but your distributions become tax-free.

Similar to the 401k, you will owe a 10% penalty and income tax on early withdrawals (before 59 1/2 years old). So, once again, please, just don’t.

One thing that many people don’t know about Roth IRAs is that you can always withdraw money that you contribute without penalty. You just can’t take from the earnings.

You can also be exempt from taxes and penalties if you’ve had the Roth IRA for more than five years and meet the criteria for certain exceptions that are known as qualified distributions.

As of 2020, the Roth IRA contribution limit is $6,000 per year, but different rules apply given your filing status and income.

Plans Similar to the 401k

  • Roth 401k: Think 401k but post-tax
  • Roth 403b: Think 403b but post-tax
  • Roth 457: Think 457 but post-tax

3. HSA (Health Savings Account)

Tax-Free ContributionsTax-Free GrowthTax-Free Withdrawals

Pre-tax contributions? Tax-free growth? Tax-free withdrawals? All the above?

The three checkmarks above seem too good to be true. But it’ll make sense soon enough.

Brief Explanation

When most people think of HSAs, they think of a savings account to pay for healthcare expenses with tax-free money.

They are completely correct. HSAs are savings accounts that can only be used for qualified healthcare expenses. Any other expenses before the age of 65 will lead to a 20% penalty and owed income tax.

At the age of 65, your HSA begins to function as a traditional IRA, allowing you to use the HSA funds on non-medical expenses.

As of 2020, the HSA contribution limits for individual coverage and family coverage is $3,550 and $7,100, respectively.

In order to be eligible for an HSA, you need to be enrolled in a high-deductible health plan (HDHP), which is just a plan with a higher deductible than a traditional insurance plan.

Deductibles refer to the amount you pay your health care before your insurance company begins to pay. A higher deductible means you pay for more of your initial health care costs, but you also pay lower monthly premiums. This amount depends on your insurance plan and what your insurance covers.

This is especially beneficial in two scenarios:

  • If you’re super healthy, you won’t pay the deductible and will have lower premiums.
  • If you’re super sick, you’ll always go through the deductible and your insurance will pick up 100% of the cost after that.

Some insurance companies also offer a premium pass-through contribution, which is very similar to 401k employer matching, where insurance companies deposit a portion of your premiums into your HSA account each year. Essentially, you will be receiving free money from your insurance company each year.

How does this work for retirement?

Everybody will have medical expenses. That is a natural part of life. Not chosen. It just happens.

The idea is that you keep maxing out your HSA every year. Whenever a medical expense comes up, you pay out-of-pocket and leave your HSA to grow tax-free.

The great thing is that you can pay yourself back for this medical expense whenever you want. You don’t want to mess with the power of compound interest your HSA has… so don’t.

If you keep your medical receipts, you can withdraw money from your HSA years and years into the future for these qualified medical expenses. And the best part? This is all after the money has grown already. You’re paying back the initial amount but keeping the interest.

This is a great graphic made by Mad Fientist:

HSA for Retirement Plan

One more thing…

Most people just let their money sit in their HSA, but you can invest your HSA money into a brokerage account in order to fund your retirement with greater returns.

So many people are eligible for HSAs and don’t use them.

Of the people that do, they don’t realize that they can use it as an investment account.


I truly enjoy writing about these kinds of things.

There’s a lot of content out there, but I hope I cleared some concepts up and gave you a bigger picture of the retirement planning process.

Keep doing your research and learning about how you can better save for your future. Invest in all three of these retirement accounts if you can, and I hope you all are livin’ it up in your retirement.

More Finance Articles