HSA Investment Calculator
Calculate how your HSA grows into a retirement medical fund with the only account that offers tax-free contributions, tax-free growth, and tax-free withdrawals.
Your HSA Inputs
2025 limits: $4,300 (individual), $8,550 (family)
Enter 0 if employer doesn't contribute
Leave 0 to maximize invested growth
Used to calculate tax savings on contributions
HSA Value at Retirement
—
tax-free for qualified medical expenses
—
Total Tax Savings
—
Total Contributions
—
Tax-Free Growth
Tax 1: Contributions
—
saved on pre-tax contributions
Tax 2: Growth
—
tax-free investment growth
Tax 3: Withdrawals
$0 tax
on qualified medical withdrawals
HSA Growth Projection
Year-by-Year HSA Growth
| Year | Balance | Added | Medical Paid |
|---|
Calculation Details
Embed This Calculator
Copy the code and paste it into any webpage to embed this calculator.
WordPress users: add a Custom HTML block (not the Embed block) and paste the code there.
Free to use. A small "Powered by Blucalculator" credit is appreciated but not required.
How to use this calculator
Enter your current HSA balance, your annual contribution, any employer contribution, expected annual medical expenses you’ll pay from the HSA, your marginal tax bracket, years until retirement, and expected investment return.
The calculator shows your projected HSA balance at retirement, total tax savings from the triple tax advantage, total contributions you’ll make, and how much of the final balance is investment growth vs. principal.
Annual Medical Expenses is the amount you plan to withdraw from the HSA each year for qualified medical costs. Set this to zero if your plan is to pay medical bills out of pocket and let the HSA compound untouched — that’s the maximum-growth strategy.
Tax Bracket is your federal marginal rate. This is used to calculate the tax savings on contributions and on qualified withdrawals. Your effective rate is lower, but marginal rate is the right number here since HSA contributions reduce your top-dollar income.
How HSA investment growth works
An HSA grows like any investment account. You put money in, it earns a return, and that return compounds over time. The HSA doesn’t change the math of compounding — it just removes taxes from three different points in the process.
The formula is the standard future value of an annuity:
Where PV = current balance, r = net annual return (after withdrawals), n = years, C = annual net contribution
Net annual contribution = employee contribution + employer contribution − annual medical withdrawals
Example: Current balance $5,000. Contributing $4,300/year. Employer adds $500/year. Paying $1,000/year in medical expenses from the HSA. 7% return. 25-year horizon.
Net annual contribution = $4,300 + $500 − $1,000 = $3,800/year
FV = $5,000 × (1.07)^25 + $3,800 × [(1.07)^25 − 1] / 0.07 FV = $5,000 × 5.427 + $3,800 × 63.249 FV = $27,135 + $240,346 = $267,481
At 22% tax bracket, the triple tax savings add up to roughly $67,000 over 25 years.
The triple tax advantage, explained
The HSA is the only account in the US tax code with three separate tax benefits. Most people only know about one or two of them.
Tax 1 — Contributions go in pre-tax. If you contribute through payroll deduction, the money avoids both federal income tax and FICA taxes (Social Security + Medicare). That’s a 7.65% bonus on top of the income tax savings. Self-employed people making direct contributions save income tax but not FICA.
Tax 2 — Growth is tax-free. Every dollar of investment gain, dividend, or interest earned inside the HSA is never taxed. There’s no annual 1099, no capital gains event, no tax drag on compounding. A 7% gross return in an HSA is a true 7% net return.
Tax 3 — Withdrawals for medical expenses are tax-free. When you use HSA funds for qualified medical expenses — deductibles, copays, prescriptions, dental, vision, LASIK — you pay nothing. Not even ordinary income tax. Compare that to a 401k where every dollar withdrawn is taxed as ordinary income.
Put all three together: you never pay tax on money that goes into an HSA, grows inside an HSA, or comes out of an HSA for medical use. That’s genuinely unique.
| Account | Contributions | Growth | Withdrawals |
|---|---|---|---|
| HSA (medical) | Pre-tax | Tax-free | Tax-free |
| Roth IRA | After-tax | Tax-free | Tax-free |
| 401k / Traditional IRA | Pre-tax | Tax-deferred | Taxed as income |
| Taxable brokerage | After-tax | Taxed annually | Capital gains tax |
| FSA | Pre-tax | None (use it or lose it) | Tax-free |
No other account gets all three. The Roth IRA is close, but you pay taxes on contributions upfront. The 401k saves taxes on contributions but fully taxes withdrawals.
2025 HSA contribution limits
The IRS adjusts HSA limits annually for inflation. For 2025:
| Coverage Type | Employee Limit | Employer + Employee Combined |
|---|---|---|
| Self-only HDHP | $4,300 | $4,300 |
| Family HDHP | $8,550 | $8,550 |
| Catch-up (55+) | +$1,000 | +$1,000 |
Both spouses can contribute catch-up amounts if both are 55 or older and each has their own HSA.
The limit applies to total contributions from all sources. If your employer contributes $1,000 to your HSA, your own contribution limit is reduced by $1,000 for the year. Track this so you don’t accidentally over-contribute — the penalty is 6% of the excess amount.
You can contribute up to the annual limit even if you switch to a non-HDHP plan mid-year, but only if you maintain HDHP coverage through December 1st and keep HDHP coverage for the entire following year (the “testing period”). If you fail the testing period, the pro-rated excess becomes taxable plus a 10% penalty.
HDHP eligibility: what qualifies
You can only contribute to an HSA if you’re covered by a High-Deductible Health Plan and nothing else. The “nothing else” part catches people off guard.
For 2025, an HDHP must have:
| Self-Only | Family | |
|---|---|---|
| Minimum deductible | $1,650 | $3,300 |
| Maximum out-of-pocket | $8,300 | $16,600 |
You lose HSA eligibility if you’re also covered by:
- Medicare Part A or B (even if you didn’t enroll voluntarily — turning 65 auto-enrolls you in Part A if you’ve received Social Security)
- A spouse’s non-HDHP plan
- A general-purpose FSA (a limited-purpose FSA for dental/vision only is fine)
- VA benefits within the past three months
- Tricare (in most cases)
You don’t lose eligibility from being a dependent on someone else’s taxes, having a spouse with their own separate health insurance, or being covered by a limited-purpose FSA.
If you’re not sure whether your plan qualifies, look at the Summary of Benefits and Coverage document from your insurer. If the deductible meets the minimums and the plan is labeled HDHP, you’re eligible.
When to start investing your HSA
Most HSA providers hold your balance in a low-yield cash account by default. You have to actively invest it. Don’t leave your HSA in the default cash option — it’s one of the most common and costly HSA mistakes.
Many providers require a minimum balance (usually $500 to $2,000) before you can invest. Once you clear that threshold, move everything above the minimum into index funds.
Which funds to pick? The same logic as any retirement account: low-cost, broad market index funds. A simple three-fund portfolio works fine. Vanguard’s VTSAX, Fidelity’s FZROX, or equivalents depending on your provider’s fund menu.
If your provider has a limited fund menu with high expense ratios, you have options. Some HSA providers let you link to an outside brokerage for investing. If yours doesn’t offer good funds, consider moving your HSA to a better provider. Fidelity’s HSA has no fees and gives access to their full brokerage platform including zero-expense-ratio index funds.
Switching providers doesn’t affect your contribution limits. You can do one trustee-to-trustee transfer per year without tax consequences.
The reimbursement strategy: save receipts, reimburse yourself later
Here’s the most underused HSA strategy: pay medical bills out of pocket now, save every receipt, and reimburse yourself from the HSA years later.
The IRS doesn’t set a time limit on reimbursements. You can pay a doctor bill in 2026, let the HSA grow untouched for 20 years, and withdraw that reimbursement in 2046 tax-free. The receipt date is what matters, not the reimbursement date.
This turns your HSA into a tax-free emergency reserve. You accumulate years of unreimbursed medical receipts as a “float” — a pool of tax-free withdrawal capacity you can tap any time without penalty. Some people call this the HSA “shoebox strategy.”
To make this work:
- Keep every qualified medical receipt (paper or digital)
- Track the total amount in a spreadsheet
- Never reimburse immediately — let the money compound
- In retirement (or whenever you need cash), submit the old receipts for reimbursement
The math is compelling. A $2,000 medical expense you pay out of pocket at age 35 represents $2,000 × (1.07)^30 = $15,224 in tax-free withdrawal capacity at 65. Pay the bill yourself, save the receipt, and let that $2,000 compound in your HSA for 30 years.
One thing to watch: you need good documentation. Digital receipt storage (Google Drive, a dedicated folder, a finance app) is more reliable than a physical shoebox. The IRS can audit, and you’ll need to show that each receipt was a qualified medical expense paid after you opened your HSA.
After 65: your HSA becomes a traditional IRA
At age 65, the HSA rules change significantly. Withdrawals for non-medical expenses become legal — they’re just taxed as ordinary income, exactly like a traditional IRA.
This is a big deal. It means the HSA is effectively a traditional IRA with an extra benefit: if you use it for medical expenses (which retirees have plenty of), those withdrawals are still tax-free. Before 65, non-medical withdrawals cost income tax plus a 20% penalty. After 65, the penalty disappears.
Medicare premiums are qualified medical expenses for HSA purposes. Part B premiums ($185/month in 2025), Part D premiums, and Medicare Advantage premiums all qualify. Dental and vision continue to qualify. Long-term care insurance premiums qualify up to age-based limits.
Average healthcare costs in retirement run $150,000+ per couple according to Fidelity’s annual estimate. An HSA balance can cover a large portion of that tax-free. That makes the HSA uniquely valuable as a retirement account — it’s solving a specific, guaranteed expense in retirement with tax-free money.
The one catch: once you enroll in Medicare, you can no longer contribute to an HSA. If you plan to work past 65 and keep an HDHP, delay Medicare enrollment to keep contributing. But be careful — delaying Medicare past 65 without other qualifying coverage can result in penalties.
Common mistakes with HSAs
Using an HSA like an FSA. The HSA’s value is in long-term compounding, not in spending down medical costs each year. If you treat it as a medical spending account and zero it out every year, you get tax-free spending but miss the triple-tax compounding. The better approach is to pay small medical expenses out of pocket, invest the HSA fully, and let it grow.
Leaving money in the default cash account. The HSA custodian makes money on your cash balance. You need to actively move funds to the investment option. This is the single biggest drag on HSA returns for most account holders.
Losing HSA eligibility without knowing. Enrolling in Medicare, joining a spouse’s non-HDHP plan, or getting covered under an FSA all terminate eligibility. You can still spend existing HSA funds, but you can’t contribute more. Check your eligibility status before each plan year.
Over-contributing. The 6% excise tax on excess contributions applies for every year the excess stays in the account. If you over-contribute, withdraw the excess plus any earnings before the tax filing deadline to avoid the penalty. Your HSA custodian can calculate the earnings on the excess.
Using HSA funds for non-qualified expenses before 65. The 20% penalty plus income tax is harsh. Before 65, treat the HSA as untouchable except for genuine medical expenses. Keep a list of what counts: IRS Publication 502 is the definitive reference.
Forgetting about the employer contribution. Many people don’t know their employer contributes to their HSA. Check your benefits portal. Free money sitting unacknowledged is the easiest win in personal finance.
Frequently asked questions
What is an HSA and how does it differ from an FSA?
An HSA (Health Savings Account) is a tax-advantaged savings account available to people covered by a High-Deductible Health Plan. Unlike an FSA (Flexible Spending Account), HSA funds roll over year to year with no “use it or lose it” rule, the account belongs to you even if you change jobs, and you can invest the balance for growth. An FSA is employer-owned, typically has a use-it-or-lose-it rule (with limited grace periods), and doesn’t allow investment growth.
Can I contribute to both an HSA and a 401k?
Yes. HSA and 401k contributions are completely independent. You can max out both simultaneously. Many financial advisors recommend the order: 401k to match, HSA max, then additional 401k. The HSA’s triple tax advantage makes it a priority once you’ve captured the free employer 401k match.
What happens to my HSA if I leave my job?
The HSA is yours, permanently. Unlike an FSA, it doesn’t belong to your employer. When you leave a job, the HSA stays with you. You can continue using it, investing it, and withdrawing for medical expenses. You just can’t contribute new money unless you enroll in an HDHP at your new employer or through the marketplace. Some people choose to roll their HSA to a different provider (like Fidelity) after leaving a job that used a high-fee HSA custodian.
Can I use my HSA for my spouse's or dependents' medical expenses?
Yes. You can use HSA funds for qualified medical expenses for yourself, your spouse, and any dependents you claim on your tax return. This is true even if your spouse or dependent isn’t covered by your HDHP. If your child is on your insurance plan and incurs a medical expense, you can use HSA funds even if the child has a separate non-HDHP coverage through a school plan.
What counts as a qualified medical expense?
Qualified expenses are defined in IRS Publication 502. They include doctor visits, hospital stays, prescriptions, dental care, vision care, LASIK, orthodontia, hearing aids, physical therapy, mental health services, and many over-the-counter medications. They do not include cosmetic procedures, gym memberships (unless prescribed), teeth whitening, or most dietary supplements. After age 65, Medicare premiums also qualify.
How do I report HSA contributions and withdrawals on my taxes?
You’ll receive Form 1099-SA from your HSA custodian showing distributions, and Form 5498-SA showing contributions. You report HSA activity on Form 8889, which is then summarized on Schedule 1 of your 1040. Contributions made through payroll deduction are already excluded from your W-2 wages. Direct contributions you made yourself are deducted on Schedule 1. Qualified withdrawals don’t show up as income. Non-qualified withdrawals show up as income plus a 20% penalty (or just income after 65).
What's the best HSA investment strategy?
If you’re under 50 and have a long time horizon, invest aggressively — mostly equities. The HSA is solving a future expense (medical costs in retirement) that’s decades away. A 100% stock index fund allocation is appropriate for young, long-horizon savers. As you approach retirement, shift to a more conservative allocation matching when you expect to use the funds. Many people keep a small cash buffer ($2,000-$5,000) for near-term medical expenses and invest everything else.
Can I contribute to an HSA after age 65?
Only if you’re not enrolled in Medicare. If you’re still working at 65, covered by an employer HDHP, and haven’t enrolled in Medicare, you can keep contributing. Once you enroll in Medicare (Part A, B, C, or D), HSA contributions stop. Many people who work past 65 delay Medicare to continue contributing. Just be aware that the IRS rules here are specific — verify with a tax advisor before delaying Medicare enrollment.
What if I accidentally use my HSA for a non-qualified expense?
Before 65: you owe income tax on the distribution plus a 20% penalty. This is harsh. If you realize the mistake, you can correct it by repaying the distribution to the HSA before your tax filing deadline. After the deadline, there’s no way to undo it — you’ll owe the tax and penalty. After 65: the 20% penalty disappears, but you still owe income tax on non-qualified withdrawals, the same as a traditional IRA.
Is an HDHP always a good choice just to get the HSA?
Not always. HDHPs typically have lower premiums but higher out-of-pocket costs. If you have predictable high medical expenses — ongoing prescriptions, regular specialist visits, a chronic condition — the math often favors a lower-deductible plan even without the HSA. The HSA is most valuable when you’re relatively healthy, your medical costs are unpredictable rather than chronic, and you can afford to pay unexpected expenses out of pocket in the short term. Run the numbers for your specific situation: premium savings vs. expected out-of-pocket costs vs. HSA tax benefit.
Frequently Asked Questions
What is the HSA triple tax advantage?
HSA contributions are pre-tax (reduce taxable income), growth is completely tax-free, and withdrawals for qualified medical expenses are tax-free. No other account type has all three benefits simultaneously. A Roth IRA has two of three — contributions are after-tax. A 401k has two of three — withdrawals are taxable.
Who can contribute to an HSA?
You must be enrolled in a High-Deductible Health Plan (HDHP). In 2025, an HDHP has a minimum deductible of $1,650 (individual) or $3,300 (family). You can't have Medicare, can't be claimed as a dependent, and can't have other non-HDHP health coverage.
What are the 2025 HSA contribution limits?
$4,300 for individual coverage, $8,550 for family coverage. Catch-up contributions of $1,000/year are allowed if you're 55 or older. Combined employee + employer contributions can't exceed these limits.
Can I invest my HSA funds?
Most HSA providers allow investing once your balance exceeds a minimum threshold (typically $1,000-$2,000). You can invest in stocks, ETFs, and mutual funds — the same types of investments as an IRA. Fidelity HSA has no investment minimum and offers Fidelity index funds with 0% expense ratio.
What happens to my HSA after 65?
After 65, you can withdraw for any reason without penalty. Medical withdrawals remain tax-free. Non-medical withdrawals are taxed as ordinary income — exactly like a Traditional IRA. This makes the HSA a "stealth IRA" for non-medical expenses after 65.
What counts as a qualified medical expense?
Doctor visits, prescriptions, dental, vision, mental health, lab tests, long-term care insurance premiums, and Medicare premiums. Cosmetic procedures, gym memberships, and most supplements don't qualify. IRS Publication 502 has the full list.
Should I pay medical expenses from my HSA or out of pocket?
Pay out of pocket when you can afford to. Let the HSA grow invested. There's no time limit on HSA reimbursements — you can pay a medical bill in 2025 from your pocket, save the receipt, and reimburse yourself from the HSA in 2045. This is the "receipt" strategy for maximizing tax-free growth.
What is an HSA vs a Flexible Spending Account (FSA)?
Key differences: HSA funds roll over every year (no "use it or lose it"); FSA funds typically must be used by year-end. HSA balances can be invested; most FSAs cannot. HSAs are yours permanently — they move with you when you change jobs. FSAs are employer-owned.
Can my spouse and I both have HSAs?
If you both have family HDHP coverage on separate plans, you can each have an HSA, but the combined contribution limit is $8,550 (family limit) in 2025. If one spouse has family coverage that covers both, only one HSA is needed.
What happens to an HSA when I die?
If your spouse is the named beneficiary, the HSA transfers to them as their own HSA — the triple tax advantage continues. If a non-spouse beneficiary inherits, the account balance becomes taxable income for them in the year of inheritance. Name your spouse as beneficiary if possible.
Related Calculators
Compound Growth Calculator
Calculate future investment value with compound growth, choosing from daily, monthly, quarterly, or annual compounding frequencies.
Roth IRA Calculator
Calculate your future Roth IRA value, tax-free retirement income, and see how tax-free compounding builds wealth over time.
401k Calculator
Calculate your future 401k balance including employer matching, total retirement savings, and estimated monthly retirement income.
Traditional IRA Calculator
Calculate your future Traditional IRA value, tax-deferred growth, and estimated after-tax retirement withdrawals.
Investment Doubling Time Calculator
Calculate exactly how long your investment takes to double at a given return rate, using both the Rule of 72 estimate and precise compound interest formula.
Retirement Nest Egg Calculator
Project your retirement nest egg from current savings and monthly contributions to see exactly what you'll have at retirement.