I've long made the contention that a Health Savings Account (HSA) is the best investing account. Today, for the first time on this blog, we're going to put some numbers to it. We're going to throw a HSA into the octagon with a 401(k) and see who comes out on top. Two accounts go in, but only one account comes out on its feet.
The 401(k)
First, in the South corner wearing the red trunks we have the staple of the current American retirement system, the 401(k). Founded in 1981, it provides for tax-deferred (or Roth) employee contributions of up to $19K per year ($25K if 50+) plus the opportunity for employer match or profit-sharing contributions up to a total contribution of $56K per year. It provides the largest tax break available for most doctors and protects their retirement assets from their creditors and the taxman as it grows.
Depending on the employer, it may suffer from high fees and crummy investment choices. You also may not be able to transfer the money away from the employer until you quit, are terminated, retire, or die. The 401(k) allows you to borrow up to $50K (or 50% of the balance, whichever is smaller) from it. Additionally, you can roll your 401(k) over to an IRA which, if left to heirs, can be stretched for additional decades. Although there are a few exceptions (including early retirement) if you want to access the money prior to age 59 1/2, you will owe a 10% penalty in addition to any taxes due. Clearly, a 401(k) is a formidable champion when it comes to investing accounts.
For an individual 401(k) one option for you could be Rocket Dollar ($100 off with code WHITECOATINVESTOR). They administer self-directed Solo 401(k)s and IRAs. Or My401K ($50 bonus for going through my link). Because it’s self-directed, you can buy real estate properties on your own or leverage RE crowdfunding platforms like Equity Multiple, RealtyMogul, Fundrise, Roofstock, CrowdStreet, etc.
The HSA
However, our challenger, wearing blue trunks in the North corner, is no slouch. Camouflaging its true purpose with the name Health Savings Account, this Stealth IRA packs a real punch. Fresh on the scene in 2004, it provides for triple tax-free contributions of up to $3,500 ($7,000 family) per year but does require the use of a High Deductible Health Plan.
Although not the largest account out there (neither is the 401(k)), it is like a wolverine that punches way above its weight. Not only do you save income taxes when you contribute, but if the contributions are taken directly from your paycheck by your employer, you also save payroll taxes. In addition, so long as you spend the money on health care, you can withdraw money from the account tax and penalty-free at any age. HSAs shield investments from the taxman (although probably not from your creditors) as they grow over the years. You also can pull the money out of the account years after the health care expenses without tax or penalty as long as you keep receipts. Although the penalty for pulling money out of the account inappropriately is higher (20% for non-health care expenses before age 65), after age 65 its tax treatment is no worse than an IRA or 401(k) (thus the term Stealth IRA.)
It's a lousy account to leave to heirs (probably the worst thing possible tax-wise), but since it can be used to pay for Medicare premiums and the other hundreds of thousands of dollars in health care expenses most seniors face, that shouldn't be too much of an issue. If your employer's provided HSA plan stinks, you can roll the money over to your own chosen plan once per year.
Let the battle begin.
401(k) vs HSA: the Head to Head Competition
Let's say you have $7,000 to invest, but you're not sure whether to put it in your 401(k) or your HSA (and for some crazy reason can't max out both accounts.) Which account is going to be most advantageous to you?
Initial Tax Break
Assuming a 35% marginal tax rate, if you contribute $7K to the HSA, you save $7000 *35% = $2,450 in federal/state income taxes. But you also save payroll taxes. For a typical employee doctor, this is just going to be 1.45% in Medicare, or another $102 for a total upfront tax break of $2,552.
If you contribute that same $7K to the 401(k), you only save the $2,450 in income taxes. But wait, what if there's an employer match? Let's say your employer matches up to 25% of the first $4000 you contribute to the account each year. That means there is now $8,000 in that 401(k).
Advantage: 401(k), but only if there is a match.
Available Investments

It might be hard to get hurt in three foot deep powder, but should it happen, you'll prefer an HSA to a 401(k).
Your unenlightened employer doesn't offer particularly good investment options or fees in either account. However, at least with the HSA, you can roll the money out of the account once a year to a plan with better investments and lower fees. Let's assume the 401(k) money grows at 7.5% and the HSA money grows at 8% per year over the decades. I thought 0.5% was a reasonable average additional fee for plan fees and higher ER mutual funds. That may overstate or understate the case for your 401(k).
Advantage: HSA, but could vary by employer
Need Money Now
Uh oh. Something has come up. You need cash. Which account should you tap? Well, withdrawing from the 401(k) incurs taxes and a 10% penalty. Withdrawing from the HSA incurs taxes and a 20% penalty. You can borrow against the 401(k), but the terms aren't that hot with a fairly high interest rate. Luckily, you spent a few bucks on health care this year and have some receipts saved up, so you can actually withdraw the needed money from the HSA tax, penalty, and interest-free.
Advantage: HSA
Creditors Come Knocking
There's a potential suit above policy limits. Your state protects your 401(k) in bankruptcy but provides no such protection to the HSA. Luckily, like happens almost all the time, on appeal, the judgment is reduced to policy limits and you lose no personal assets.
Advantage: None
Time to Withdraw Money In Retirement For Health Care
Now you're 70 and need to pay some health care expenses for recent cancer treatment. Where should you take the money from? If you take it from the 401(k), you'll owe taxes at your ordinary income tax rates. If you take it from your HSA, the withdrawal will be tax-free. Just how much of an advantage does the HSA have here? Let's run the numbers.We'll add that original Medicare tax savings into the HSA total for simplicity and the match into the 401(k), then apply 30 years of compound interest.
HSA: =FV(8%,30,0,-7102) = $71,464.99 Multiply by 1 – 0% for taxes and you end with $71,465 to spend on health care.
401(k): =FV(7.5%,30,0,-8000) = $70,039.64 Multiply by 1 – 25% for taxes and you end up with $52,530 to spend on health care.
Despite the employer match, the HSA ends up with 33% more money. You can buy a lot of health care with an extra $19K, especially if you multiply that by 20 or 30 years of HSA contributions.
Advantage: HSA
Time To Buy A Sailboat
With your cancer scare over, it's time to get out on the bay in a new sailboat. Which account will provide a larger sailboat? Let's run those numbers again:
HSA: =FV(8%,30,0,-7102) = $71,464.99 Multiply by 1 – 25% for taxes and you end with $53,599
401(k): =FV(7.5%,30,0,-8000) = $70,039.64 Multiply by 1 – 25% for taxes and you end up with $52,530
The HSA wins, but not by much.
Advantage: HSA
Game, Set, and Match to the HSA
As you can see, in the vast majority of comparisons, the HSA is going to come out on top as the best of the two investing accounts. Even when it is not superior, it is typically about the same as or not much worse than the 401(k). And when it is superior (paying for healthcare before or during retirement) it is dramatically superior thanks to its triple tax-free nature. That said, a 401(k) is still a very good place to invest and ideally, you'll be able to max out both and even invest in a taxable account above and beyond your tax protected accounts.
What do you think? Which do you think is the best investing account? What is the first account you fund each year? Comment below!
Agree with outcome unless family/HSA has a chronic illness with maximum out of pocket cost/year being met. Family would be better off with lower deductible insurance with more coverage. 401k easily provides the knockout here (1st round if match provided)
This isn’t a HDHP vs low deductible plan comparison, it’s HSA vs 401(k). I agree you need to choose the right health care plan FIRST, then if it is a HDHP, you should use the HSA.
https://www.whitecoatinvestor.com/should-i-get-an-hdhp-just-to-use-an-hsa/
I don’t understand why we assume 7.5% gain for the 401k and 8% for the HSA. Why not run numbers with the same percentage gain?
I think he is doing that because some 401ks have fees. He doesn’t say this but just a guess on my part.
I know mine does but it is only.1%
As mentioned in the post office? Should be maxing both of these. The right comparison is to a taxable account. Of course these are both better then taxable but that should be the basis of comparison. The gold standard if you would allow.
That would be a boring match. It would be like Mike Tyson and George Foreman vs me. It wouldn’t last long.
In context I thought it was also to adjust for assumed better returns? It was introduced in a paragraph about being able to move hsa funds from assumed crappy employer options into an outside hsa once per year, while 401k might be stuck until you leave the job.
Oh, you’re right. I did explain it. Your own 401(k) fees may be higher or lower of course.
For what it’s worth, at my employer the 403b has Vanguard institutional funds (ER as low as 0.02%), and the HealthEquity HSA has similar Vanguard institutional but tacks on a 0.4% annual fee.
That’s a great question and I probably should have explained that when I wrote the post because now looking back, I can’t quite remember exactly. But I think my reasoning was that 401(k)s have additional fees (whether plan based, AUM based or with higher fund ERs) and I thought 0.5% was a reasonable approximation of that.
Obviously, you can run the numbers yourself using whatever assumptions you like.
Your timing is impeccable! I was just with a client yesterday at 3pm. She was not maxing out the HSA. This is exactly what I told her. Kind of spooky. I forwarded the article to her. Good one. This is one of my favorite accounts. Not sure about the 7.5 versus 8 percent assumption, as this client has Vanguard. However, still a no brainer to max it out.
We just started using an HSA for the first time this year (it was not offered previously). Unfortunately, the HDHP did not provide much of a discount on monthly premiums. So, many of my colleagues did not take part.
We plan on using the HSA for any health care related expenses this year and saving as much as we can from what we don’t use. As our side pot of money grows, we will probably just pay for the health care expenses out of pocket and save up the receipts to turn in should we need the money.
Either way, I think people often look at using an HSA versus the other “cheaper” plans in a one year vaccum instead of looking at it in terms of 10 year odds (how much do we anticipate actually using over a ten year period, $70,000? Probably not).
The HSA is hands down the best retirement account out there. It has more flexibility, better tax sheltering, and can be invested into a variety of low cost index funds. I think you got it right.
TPP
An HSA isn’t an insurance plan. It’s important that every one recognizes that. The “which plan” decision is almost completely separate from the “should I invest my hsa” decision.
“An HSA isn’t an insurance plan”
Exactly. Yet we often hear sob stories about people who get hit with crushing healthcare costs because the HDHP didn’t cover enough. The critics neglect HSAs in their analysis. They tend to assume its the fault of the insurance company or the employer.
More needs to be said to educate the anti-HDHP crowd about the beauty AND the responsibility of paying into one’s HSA. There should be fairly high minimum deposit during each pay deduction to ensure a decent cushion.
Something mentioned here re: inheritance distributions got me thinking, how would a 401K be distributed differently if it were not converted to an IRA by the time of death?
It’s pretty much the same as an IRA.
https://www.thebalance.com/inherited-401k-distribution-and-withdrawal-rules-2388269
Quick question stimulated from today’s Re-Blog:
I have chronic health issues so our family plan has been to do a non HSA plan (top of the line family plan) provided by my employer.
My wife just got a new job and is benefits eligible.
My question is:
Should we get an ADDITIONAL HSA through her employer just so we can put away an extra $7k/yr?
Note: We currently max out all 401k options already and both do Backdoor IRAs.
You should be careful trying to mix HSAs with non-high deductible health plans. There are rules (which I don’t know all the ins and outs of off-hand) that restrict this, but bottom line is I think you can’t have an HSA if you are covered by a non-high deductible plan.
That’s correct.
No, you wouldn’t qualify to make new contributions because you are covered under a non-HSA eligible plan. It isn’t just having a HDHP, it’s having an HDHP AND NO OTHER PLAN.
You’re conveniently ignoring the compliance costs for states that elect not to mirror the federal non taxable nature of the HSA. In particular California does not recognize this and so all dividends and cap gains in the account are taxable. What’s worse, many HSA providers don’t give you 1099 since it’s a non taxable (federally) account. So you have to hunt down all of the gains and self report every year’ plus track your own basis on everything. This has a very real and serious cost. I think harry at the financebuff did a nice write up on this:
https://thefinancebuff.com/california-new-jersey-hsa-tax-return.html
Yup, I ignored provisions that only apply to 2/50 states. Guilty as charged. To be fair, I already told all my readers they should leave CA and NJ for financial reasons. 🙂
Thanks for the link. It’ll be helpful for those in that situation.
Dude, 1 out of every 8 Americans live in California. 😉
[Off-topic, politically inflammatory comment deleted.]
Yes, it’s actually a decent chunk of my readers too according to Google Analytics.
I’ll be honest though, I love California. It’s a wonderful place to visit. But I have no idea why there is not a massive physician shortage there given how they treat docs. Same (or lower) pay, very high taxes, very high cost of living. Moving from the Midwest to California, you go from being one of the wealthiest in town and having money coming out of your ears to having to compete with dot-com millionaires for houses in the good school district by buying a house that is 5-10X your gross income while having a marginal tax rate over 50%.
I think I have a post coming up called something like 15 Ways California Hates Doctors and the HSA exclusion is on the list.
So…if a doc is moving to CA or NJ for work, what is the best way to approach this!?!??! NEVER heard of this. Take the 20% cut or expose to massive radiation (kidding)
It’s just another one of the costs of moving to California or New Jersey. I’d probably leave the money in the HSA if it were me, but maybe I’d spend it a little faster than I otherwise would if I were going to remain there long term.
Can you clarify… If we paid for cancer treatment, reimbursed ourselves and THEN bought the boat, that money would not be taxed, would it?
Because money is fungible, it would not be taxed in that case.
You would still have to pay sales tax on the boat, The government screws us again! 😉
That’s right. Money is fungible.
Does HSA still make sense for someone with high costs chronic illness (in their 30s)? Assuming the person can max out both 401k and HSA.
Furthermore-does HSA make sense if that said person still has significant student debt burden she is working on obliterating?
I haven’t been doing HSA because I need a really good health insurance plan and the high deductible scares me.
Thanks in advance!
Choose the right plan first. If the right plan is an HDHP, then use the HSA.
Sounds to me like a HDHP isn’t right for you.
And as far as the student loans, that’s just the old invest vs pay off debt question and given that tax treatment, I’d lean toward the HSA most of the time as long as you’re on a 2-5 year plan on the student loan payoff.
https://www.whitecoatinvestor.com/pay-off-debt-or-invest/
Could you please discuss the advantages/disadvantages of pulling money out of the HSA vs leaving it in the HSA?
For example, I have about 60K in my HSA at this time. I currently have 35K in healthcare receipts that I have saved over the past 8 years.
Given my current age (40) and my current income level, I have no need for the 35K so I have just continued to save receipts and let the money grow in the HSA invested in index funds . I can’t think of a good reason to take it out at this time as I just don’t need that money. But, what would be the advantage to taking it out. Is there an equally easy/safe retirement account that I could put this money in and get better growth? I know I could take it out and invest it in something more risky with a potential for higher growth, but that’s not really what I’m looking for. I don’t want a boat and I paid off the Tesla 5 years ago ;).
I think what you’re doing is fine, but it’s probably less hassle to spend as you go.
https://www.whitecoatinvestor.com/the-best-ways-to-use-an-hsa/
Regarding that high medical expense scenario: When my employer rolled out the HDHP/HSA option, one older gentleman very pointedly asked about out of pocket maximums. Our HDHP had lower maximums than the traditional plan. This fellow and his wife were apparently accustomed to high medical bills and were better off with the HDHP and its lower maximum, especially since the first part of his costs were tax free. He would have been saving the full 7.65% FICA. We also got a nice premium break to encourage election of the HDHP. So the conclusion is one ought to run the numbers every year.
Oh, and the company also kicked in $500 single/$1000 family to the HSA to further encourage adoption. This company was large enough to be self-insuring for health care, so they had the flexibility to set premiums/OOP max/company contribution where they judged best. They sweetened the pot for a couple years to get people out of the traditional plan.
To healthy me, it was a no-brainer to go HDHP. It was surprising to see that it might also be the best choice for the unhealthy.
Interesting. Funny how it works out sometimes, but good point to always look at the details because that’s where the devil is.
Learned that HSA is not deductible in California…so need to keep track of basis, report dividends and capital gains, etc. pay state tax on the amount invested.
OTOH, it gets treated as any other taxable acct when I use the funds, and my employer seeds the contribution w 1000 at start of the year to encourage use of the hdhp option. I think of the hdhp as a major medical plan…it works for us.
You would only report gains if you cashed out, right? Doesn’t the HSA give an annual tax doc which would show that?
| You can borrow against the 401(k), but the terms aren’t that hot with a fairly high interest rate.
Up to five years for loan repayment with interest paid back to yourself at bank rates.
And ten years for a house down payment.
Obviously, the money goes AWOL from any investment accounts, but the terms are quite reasonable compared to 3rd party lenders. The only time the HSA works out better (since you can’t borrow at all) is when someone happens to be holding a pile of medical reimbursement chits and is willing to cash them in. That’s quite a bit of a unicorn case vs. the ability to borrow for anything else on demand whenever it’s needed.
Up to five years/ten years if you don’t leave the job. Then you’ve only got a year (better than the 60 days you used to have.) Having your loan terms connected to your employment is by definition not “hot” terms. As far as interest, it’s usually 1-2% more than prime, which is currently 5.25%. So 6-7%. I don’t find that particularly attractive given you can get a car loan at 0-2%, a mortgage at 3-4%, student loan refinancing at 3-5%, a margin loan at 3.9%.
And as far as “paying the interest to yourself” that doesn’t really change anything as explained here:
https://www.kitces.com/blog/401k-loan-interest-to-yourself-opportunity-cost-tax-rules/
Here Kitces argues that it’s not a bad way to borrow IF you have to borrow, but that because you pay and receive the interest, the real cost is the opportunity cost in the account (could be 7-10% if the money were in stocks for example) but that the interest rate is not a rate of return in any way.
The comparison was between borrowing out funds which can be put back into a tax deferred account (401K loan) vs. permanently emptying out funds from the HSA (medical reimbursement). For someone who needs $50K for a down payment, the 401K loan is unquestionably better than reimbursement since the money is eventually returned for future tax deferred growth. Opportunity cost is the same in both cases. My 401K is with my own company so the points about employment and additional handling fees aren’t applicable.
As a practical matter, someone needing money for something like a home down payment to avoid PMI and get better rates is likely to be younger. They’re not going to have $50K in HSA funds and almost no likelihood of having $50K in pent up medical expenses that were paid out of pocket. I’m 52YO and haven’t accrued that much in OOP medical expenses cumulatively for the entire family at this stage.
You’re very lucky if you’re 52 and your family hasn’t spent $50K on health care in the previous 30 years.
The 401(k) loan is nice in that it is reversible.
Regarding commenters who are asking about appropriateness of HDHP vs PPO plan…
If you know you will have high amount of medical expenses, you need to compare the out of pocket maximums on the plan options available to you. Example, say you estimate your medical expenses to be $10,000. The HDHP may have an OOPM of $10,000 and the PPO $9,000 for family coverage. But if the HDHP costs $2,000 less per year in premium, your best choice is the HDHP.
Enrolling in the HDHP will ‘front load’ your expenses during the year versus the PPO.
Great article and have a few questions. My company pays for medical for myself and family with no deductible. However, is my wife eligible with her employer? Just trying to understand and determine if we are eligible or not.
She could be, but you aren’t. And you probably should just keep her on your plan, but check to see if your wife would have to pay any premiums.
Thanks for the response WCI. I will have her look into her options. Appreciate everything.
From my experience, employer provided health insurance has the biggest jump in premiums when adding the spouse. It is a smaller increase to only add coverage for children. Grant’s company covering the full cost for a whole family is certainly not the norm. For Grant I would check the details of her offering and compare the cost vs being on your employers plan. If her Employer also kicks in money for the HSA it makes it an even easier decision. If her typical health care spending is low even better. FYI, even though your spouse might fund her HSA, those funds are not limited to her medical expenses. She can make a qualified withdrawal for YOUR future medical expenses as well.
Nice article, but I think your last example understates the benefit of the HSA.
As long as you incur qualified medical expenses while the HSA is funded, you could potentially use the funds in the HSA to pay for that sailboat without incurring any additional income tax. The HSA advantage is even bigger in that case.
That is true if you have enough receipts. In the example, there were no past expenditures.
Thanks for the great post. Can anyone point me in the right direction to answerthe following:
Are the employee parents or children of the owner of an S-corp eligible to open an individual 401k (aka solo-401k) plan via the business like the owner and her spouse are? The parents/children are employed by the S-corp and paid on a W-2. There are no other employees.
Are they automatically eligible because of the IRS’s family attribution rules, or do you have to make them official part owners?
You don’t need to cross post on multiple old posts. It’s mostly just me reading them anyway and I see all of the comments.
If you have parents or children as employees you can’t use a solo 401k either. You could put in a regular 401k if you wanted to.
My bad. I thought since each post had a separate author, who may or may not respond… rookie mistake
Anyway, thanks for the quick reply and the excellent content of your site.
HSA contributions save social security tax at 7.65% and medicare tax while 401k contributions are not.
Some employers also provide HSA match.
It seems to me HSA has more advantage in the initial tax break comparison.
That’s true if the HSA contributions are withheld from payroll. Not the case for many of us who do the contributions directly to the HSA. But I agree HSAs are great. If you’re using an HDHP, be sure to use the HSA.