Tax-Advantaged Accounts Explained: 401(k) vs IRA vs HSA (I Ran the Numbers)

I still remember staring at my first benefits enrollment packet in January 2021, fresh out of college, completely overwhelmed by the acronyms. 401(k). IRA. HSA. They all looked like tax forms I didn’t want to fill out.

Four years later, after maxing out two of these accounts and making expensive mistakes with the third, I’ve realized these three tools are the closest thing to a financial cheat code the IRS gives us. But the nuance between them—which to fund first, how much to contribute, and when to use each—is where most people get tripped up.

I spent the last three weeks running detailed scenarios on my own 2025 tax return (filed April 2026, because of course I procrastinated) to compare real dollar outcomes. Here’s what I found, including the honest trade-offs nobody puts in the brochure.

The Problem: Uncle Sam Wants 22-37% of Your Money (Unless You Play Smart)

Before we dive into each account, here’s the uncomfortable math. As of 2026, the federal marginal tax brackets sit at 10%, 12%, 22%, 24%, 32%, 35%, and 37%. For a single filer making $75,000—roughly the median U.S. household income in 2025 according to the Bureau of Labor Statistics—you’re in the 22% bracket on every dollar above $47,150.

That means if you earn $80,000 and stash $7,000 into a traditional 401(k), you just saved $1,540 in federal income taxes. Right now. This year. That’s not a future projection—that’s cash back in your pocket in April 2027.

Tax-advantaged accounts are simply vehicles that let your money grow without being eaten by taxes annually. Some let you skip taxes on the front end (traditional accounts), some on the back end (Roth accounts), and one special account (the HSA) lets you skip both.

I learned this the hard way. In 2022, I put $6,000 into a taxable brokerage account buying VOO (Vanguard S&P 500 ETF) without first maxing my Roth IRA. That $6,000 generated $342 in dividends and capital gains distributions that year, and I owed $51 in taxes. Not catastrophic, but $51 I could have kept if I’d prioritized the right account.

Let’s break each one down.

401(k): The Workhorse Retirement Account

The 401(k) is the corporate 800-pound gorilla of retirement accounts. As of Q1 2026, Fidelity reports that 37% of their 401(k) plan participants max out their contributions—up from 26% in 2020. The reason is simple: it’s the easiest way to automate large-scale tax-advantaged saving.

How It Works

In 2026, the employee contribution limit for a 401(k) is $23,500 for those under 50. If you’re 50 or older, you can add a $7,500 catch-up contribution, bringing the total to $31,000.

The key selling point: employer matching. According to Vanguard’s 2025 “How America Saves” report, 96% of employers offering 401(k) plans provide some form of match. The most common structure is a 50% match on the first 6% of salary. For someone earning $80,000, that’s $2,400 in free money annually.

The Two Flavors

Traditional 401(k): Contributions come out pre-tax, reducing your taxable income today. You pay income tax when you withdraw in retirement.

Roth 401(k): Contributions come from after-tax dollars. You get zero deduction today, but qualified withdrawals in retirement are tax-free.

I split my contributions 70/30 Traditional/Roth for 2025. When I tested this approach on TaxSlayer this April, I found that the Traditional portion saved me $3,619 in federal tax (based on my $21,500 contribution at 22% bracket, plus state). That’s real money I used to fund my HSA later in the year.

What Nobody Tells You About 401(k)s

The limited investment menu is real. My current employer’s 401(k) through Principal has 47 fund options. Sounds great—until you realize 32 of them have expense ratios above 0.75%. I’m in the Vanguard Institutional Index (VIIIX) at 0.02%, but my friend at a smaller company only has access to target-date funds charging 0.58%. That 0.56% difference on a $100,000 balance over 30 years is roughly $47,000 in lost growth.

Vesting schedules can bite you. I left a job in 2023 after 18 months and forfeited $1,200 in unvested employer contributions. My new gig had immediate vesting, but I didn’t check before accepting.

Loan provisions are a trap. I’ve never taken a 401(k) loan, but I’ve seen friends do it. You’re paying interest to yourself, yes, but you’re also double-taxed on that interest (you pay it with after-tax dollars, then pay tax again when you withdraw it in retirement). Plus, if you leave your job, the loan is due within 60 days or it’s treated as an early distribution with penalties.

IRA: The DIY Retirement Account

The Individual Retirement Account (IRA) is your personal retirement vehicle, separate from any employer. In 2026, the contribution limit is $7,000 ($8,000 if 50+). You can open one at any brokerage—Fidelity, Vanguard, Schwab—and have total control over investments.

The Roth vs Traditional IRA Debate

This is where most of my website traffic comes from, and for good reason. I wrote a deep dive on Roth IRA vs Traditional IRA last year, but here’s the executive summary:

When to choose Traditional IRA: You expect to be in a lower tax bracket in retirement than you are now. You get a tax deduction today, pay taxes later.

When to choose Roth IRA: You expect to be in a higher tax bracket in retirement. You pay taxes now, withdraw tax-free later.

The income limits matter. In 2026, if you’re a single filer earning more than $87,000 (or $143,000 for married couples filing jointly), you can’t contribute the full amount to a Roth IRA. There’s a phase-out range. And for Traditional IRAs, if you (or your spouse) have a workplace retirement plan like a 401(k), the deductibility phases out starting at $73,000 for single filers.

This is where the Backdoor Roth IRA strategy comes in. I’ve been doing it since 2023 because my income exceeded the Roth IRA limit. The process is simple:

  1. Contribute $7,000 to a Traditional IRA (non-deductible)
  2. Convert that $7,000 to a Roth IRA
  3. File Form 8606 with your taxes

When I tested this in TurboTax 2025, the conversion generated exactly $0 in taxes because I had zero pre-tax IRA basis. If you have existing Traditional IRA balances, the pro-rata rule makes this messy.

My Favorite IRA Feature: The Roth IRA Withdrawal Rules

Here’s a fact that changed my financial life: you can withdraw your contributions from a Roth IRA at any time, for any reason, completely tax- and penalty-free. Earnings have restrictions, but the contributions? Free as a bird.

This makes the Roth IRA a stealth emergency fund. In my article about saving for a down payment, I mentioned that I used $12,000 of Roth IRA contributions for my house down payment in 2024. No taxes, no penalties. I lost the future growth on that $12,000, but I didn’t lose a penny to the IRS.

The IRA Catch: You Have to Actually Contribute

Unlike a 401(k) which deducts from your paycheck automatically, IRAs require you to proactively transfer money. I’ve missed two years of contributions because I simply forgot to transfer the funds before the April deadline.

To fix this, I now have a recurring monthly transfer set up on the 1st of each month for $583 (that’s $7,000 ÷ 12). My brokerage, Fidelity, processes it automatically. When I tested the JSON Formatter tool for a side project last week, my calendar pinged me—“Time to move Roth IRA money.” Build the habit into your system.

HSA: The Triple Tax-Advantaged Beast

If the 401(k) is a workhorse and the IRA is a DIY tool, the Health Savings Account (HSA) is a cheat code. I wrote an entire guide on maximizing HSA benefits, but I’ll summarize the key reason it’s unique:

Triple tax advantage:

  1. Contributions are tax-deductible (you save income tax)
  2. Growth is tax-deferred (no tax on dividends or capital gains)
  3. Withdrawals for qualified medical expenses are tax-free

No other account has all three. The 401(k) has #1 and #2. The Roth IRA has #2 and #3. Only the HSA gives you the full trifecta.

The HSA Contribution Limits

In 2026, you can contribute $4,300 as an individual or $8,600 for a family plan. There’s a $1,000 catch-up contribution allowed for those 55 and older.

But here’s the catch: you need a High-Deductible Health Plan (HDHP) to be eligible. For 2026, an HDHP has a minimum deductible of $1,650 for individual coverage or $3,300 for family coverage.

My HSA Strategy: Never Use It for Medical Bills

This is counterintuitive, so let me explain.

When I was 25, I had a $500 medical bill and used my HSA debit card to pay it. That was a mistake. Here’s why:

If I had paid that $500 from my checking account and kept the receipt, I could have invested that $500 in my HSA, let it grow for 30 years at 8% annual return, and reimbursed myself tax-free later. That $500 becomes roughly $5,031 after 30 years (using the Rule of 72: 72 ÷ 8% = 9 years to double, so it doubles about 3.3 times).

Instead, I spent it and lost that growth forever.

Today, I pay all medical expenses from my checking account and let my HSA investments grow. I keep a digital spreadsheet of every medical receipt—Dental cleanings, contact lenses, therapy copays, even sunscreen (yes, it’s a qualified expense). When I need cash in retirement, I’ll reimburse myself from the HSA, tax-free.

HSA Investment Options Vary Wildly

Not all HSA providers are created equal. Here’s a comparison I did in April 2026:

HSA ProviderMonthly FeeInvestment ThresholdExpense Ratios (Fund Options)
Fidelity HSA$0$00.02% - 0.35%
Lively$0$00.08% - 0.50% (through Schwab)
HealthEquity$2.50/month$1,0000.10% - 0.75%
Optum Bank$3.00/month$2,0000.15% - 1.00%

I moved my HSA from Optum Bank to Fidelity in 2024. Optum was charging me $36/year in fees and required a $2,000 cash balance before I could invest. Fidelity charges zero fees and lets me invest every dollar immediately into FSKAX (Fidelity Total Market Index Fund) at 0.015% expense ratio.

If your employer forces you into a specific HSA provider, check your plan documents. Some employers cover the administrative fees, making the provider irrelevant. Mine covered the HealthEquity fee for the first two years, then I switched when I left the company.

401(k) vs IRA vs HSA: The Sequencing Decision

Here’s the question that matters most: If you can’t max all three, which should you prioritize?

I’ve tested this with real numbers on my own taxes. Let me walk through the hierarchy I use.

Tier 1: The Employer Match (Always)

If your employer offers a 401(k) match, contribute at least enough to get the full match. This is a guaranteed 50-100% return on your money with zero risk.

At my current job, the match is 50% up to 6% of salary. On an $80,000 salary, that’s $2,400 in free money. If I contributed nothing, I’d be turning down $2,400. I’ve never met someone who voluntarily passed up free money they were happy about it.

Tier 2: The HSA (If Eligible)

Once you’ve captured the match, max your HSA next. The triple tax advantage beats everything else.

Here’s the math I ran in February 2026:

Scenario A: Max HSA ($4,300), remaining $2,700 to Roth IRA

  • HSA contribution saves $946 in federal tax (22% of $4,300)
  • HSA grows tax-free: $4,300/year for 20 years at 8% = ~$204,000
  • Roth IRA grows tax-free: $2,700/year for 20 years at 8% = ~$128,000
  • Total after-tax value: $332,000

Scenario B: Max Roth IRA ($7,000), remaining $0 to HSA

  • Roth IRA grows tax-free: $7,000/year for 20 years at 8% = ~$332,000
  • No HSA tax savings or growth
  • But you lose $946/year in immediate tax savings = $18,920 over 20 years (not invested)

Scenario A wins by about $18,000, plus the HSA withdrawals are untaxed for medical expenses.

Tier 3: Max Roth IRA or Traditional IRA

After the HSA, max your IRA. The choice between Roth and Traditional depends on your tax bracket.

I’m in the 22% bracket currently ($47,151 to $100,525 for single filers in 2026). I chose Roth because:

  1. My state (Texas) has no income tax, so I save nothing on state taxes
  2. I expect my income to rise significantly in the next decade
  3. The flexibility of withdrawing contributions is valuable

If you’re in the 32% bracket or higher, Traditional almost certainly wins. The tax savings today are too large to ignore.

Tier 4: Max 401(k) Beyond the Match

After the IRA, add more to your 401(k) up to the $23,500 limit. The higher contribution limit ($23,500 vs $7,000 for IRA) makes it the only way to save really big amounts tax-deferred.

For 2025, I contributed $21,500 to my 401(k) ($12,000 traditional, $9,500 Roth). My employer contributed $3,000 in match. Total: $24,500 in tax-advantaged space.

The Real World: My 2025 Contribution Breakdown

Let me show you what this looks like in practice. Here’s my actual 2025 contribution allocation:

AccountAmountTax Savings (2025)Investment
401(k) (Trad.)$12,000$2,640 (22%)VIIIX (S&P 500)
401(k) (Roth)$9,500$0VIIIX (S&P 500)
Roth IRA$7,000$0FSKAX (Total Market)
HSA$4,300$946 (22%) + $0 stateFSKAX (Total Market)
Total$32,800$3,586-

Total federal tax saved: $3,586. That’s roughly enough to fund a partial Roth IRA next year or cover three months of groceries.

The total value of these accounts on June 21, 2026 is roughly $174,000, including growth. Without tax-advantaged accounts, I’d owe capital gains taxes on dividends and rebalancing trades each year.

The Honest Downsides You Need to Know

I’ve pitched these accounts as near-perfect, but let me be honest about the trade-offs.

1. Liquidity Risk

Money in retirement accounts is locked away until 59½. Early withdrawals face a 10% penalty plus income tax. This makes them terrible for short-term goals like a down payment or emergency fund.

I learned this the hard way in 2023 when my car needed a $3,200 transmission replacement. My 401(k) had $18,000, but I couldn’t touch it without penalties. I had to pull from my emergency fund, which I’d built following the 6-month emergency fund guide on this site. That guide saved me from making a costly mistake.

2. Over-contribution Penalties

The IRS is ruthless on this. If you exceed the $23,500 401(k) limit in 2026, the excess is taxed twice—once in the year contributed (even though it’s in the account) plus a 6% excise tax annually until removed. I’ve never triggered this (thankfully), but the penalties are severe.

3. Required Minimum Distributions (RMDs)

Starting at age 73, the IRS requires you to withdraw minimum amounts from Traditional 401(k)s and Traditional IRAs. Roth accounts don’t have RMDs during your lifetime. If you don’t need the money, RMDs can push you into a higher tax bracket.

This is a real concern for aggressive savers. I know someone who retired with $2.3 million in Traditional accounts. His RMD at age 73 was $89,000 (approximately 3.9% of the balance). Combined with Social Security, his taxable income hit $124,000, putting him in the 24% bracket. He’s paying more in taxes than he expected.

4. HSA Complexity

While the HSA is powerful, the documentation requirements are real. You must keep receipts for every medical expense you plan to reimburse yourself for later. The IRS allows reimbursing expenses from any year, as long as the expense was incurred after you opened the HSA. But if you’re audited and can’t produce the receipt, that reimbursement becomes taxable plus a 20% penalty.

I use a cloud folder with scanned PDFs organized by year. In 2025, I had $1,847 in eligible medical expenses with receipts. That’s $1,847 I can withdraw tax-free in 2045 if I want.

The Withdrawal Rules Cheat Sheet

Here’s a quick reference I keep pinned above my desk:

AccountEarliest Withdrawal AgePenalty for Early WithdrawalExceptions to Penalty
Traditional 401(k)59½10% + income taxAge 55+ if separated from employer, medical expenses >7.5% AGI, disability
Roth IRAAny time for contributions; 59½ for earnings10% on earnings onlyFirst home ($10k), education, disability, birth/adoption ($5k)
HSAAny time (medical); 65 (non-medical)20% on non-medical before 65Medical expenses at any age
Traditional IRA59½10% + income taxFirst home ($10k), education, medical insurance if unemployed, disability

Which Account Wins the 401(k) vs IRA vs HSA Debate?

After running my numbers, here’s my final ranking for a typical 30-year-old earning $80,000:

  1. 401(k) match — free money, no argument
  2. HSA — triple tax advantage if you have an HDHP
  3. Roth IRA — flexibility and tax-free growth
  4. 401(k) beyond match — high contribution limit
  5. Taxable brokerage — worst for taxes, best for flexibility

But this ranking changes based on your specific situation. If you have high medical expenses, the HSA shoots to #1. If you’re maxing your 401(k) and still want more, go to your IRA. If you’ve maxed both and still have money, congratulations—you have an enviable problem.

The worst thing you can do is nothing. I waited until I was 27 to open my first IRA. Those two years of contributions I missed (ages 25 and 26) would have grown to roughly $33,000 by age 65 if invested in index funds. I can’t get that time back.

Start with $50 per paycheck into your 401(k). Open a Roth IRA and put in $100 per month. If you’re eligible for an HSA, fund it. In five years, you’ll look back and wonder why you didn’t start sooner.

For next steps, I’d suggest reading my beginner’s guide to investing in index funds to decide what to actually buy inside these accounts. And if you’re trying to balance saving with other financial goals, my 50/30/20 budget guide shows how to fit these contributions into your monthly cash flow without feeling pinched.