Should I invest my HSA and pay medical bills in cash?

Compare two ways to handle qualified medical bills with the same yearly cash flow: pay bills from your Health Savings Account (HSA) now and invest your spared cash in a taxable brokerage account, or pay medical bills out of pocket, keep your HSA invested, and reimburse yourself tax-free from saved receipts years later.

Example calculation
Invest HSA vs spend now
+$9,796 more
Invest HSA: $301,807 vs Spend HSA now: $292,011 after 20 years.
Invest HSA pays

At these inputs, paying medical bills in cash and keeping your HSA invested leaves about $9,796 more after tax over 20 years ($301,807 vs $292,011).

Invest HSA + save receipts Pays more

Pay $50,000 of medical bills out of pocket over 20 years and leave your HSA untouched. Your HSA grows to $301,807, and you can reimburse yourself $50,000 tax-free from saved receipts at any time.

All $50,000 of saved receipts can be withdrawn 100% tax-free, and the remaining HSA balance stays available for future Medicare and medical bills tax-free.

Spend HSA now + brokerage Trails

Reimburse $50,000 of medical bills from the HSA as they happen and invest your spared cash in a taxable brokerage account. After 20 years, you hold $192,144 in the HSA plus $99,867 in the brokerage account after tax ($292,011 total).

Taxable brokerage drag costs about $8,800 in total ($1,886 on yearly dividends and $6,914 on capital gains at 15%).

Break-even receipt loss: you could lose up to 89.1% of your saved receipts (and pay 22% retirement tax on that share after age 65) before investing the HSA falls behind spending it now.

Invest HSA + save receipts
$301,807
Includes $50,000 in tax-free receipts.
Spend HSA now
$292,011
$192,144 HSA + $99,867 after-tax brokerage.
Brokerage tax drag saved
$8,800
$1,886 dividend tax + $6,914 capital gains tax.
Break-even receipt loss
89.1%
Share of $50,000 receipts you could lose.

Side-by-side breakdown at the end of the horizon

Both paths start with the same HSA balance, contribute the same amount each year, and pay the same yearly medical bills.

Side-by-side comparison of investing the HSA and saving receipts versus spending the HSA now
LineInvest HSA + save receiptsSpend HSA now + brokerage
Starting HSA balance$5,000$5,000
Total HSA contributions over 20 years$130,000$130,000
Medical bills paid from HSA along the way$0$50,000
Medical bills paid in cash (receipts saved)$50,000$0
Ending HSA balance before receipt cash-out$301,807$192,144
Usable saved receipts (100% tax-free cash-out)$50,000$0
Taxable brokerage balance before capital gains tax$0$106,781
Dividend and capital gains taxes paid$0-$8,800
After-tax wealth at year 20$301,807$292,011
Net advantage vs the other path+$9,796-$9,796
If excess HSA growth is spent on non-medical retirement (22% tax)$288,682$292,011

After-tax wealth by year

Total after-tax balance (HSA plus after-tax brokerage) at the end of each year, alongside cumulative usable receipts.

Invest HSA + save receiptsSpend HSA now + brokerage
Year-by-year medical bills shifted, after-tax wealth under each path, usable saved receipts, and net advantage
YearBills shifted that yearSpend HSA now wealthInvest HSA wealthUsable saved receiptsInvest HSA ahead (+) or behind (-)
0 (start)$0$5,000$5,000$0$0
1$2,500$12,214$12,240$2,500+$26
2$2,500$19,906$19,987$5,000+$81
3$2,500$28,110$28,276$7,500+$166
4$2,500$36,860$37,145$10,000+$285
5$2,500$46,195$46,635$12,500+$440
6$2,500$56,156$56,790$15,000+$634
7$2,500$66,785$67,655$17,500+$870
8$2,500$78,130$79,281$20,000+$1,151
9$2,500$90,238$91,721$22,500+$1,482
10$2,500$103,164$105,031$25,000+$1,867
11$2,500$116,964$119,273$27,500+$2,309
12$2,500$131,699$134,512$30,000+$2,813
13$2,500$147,433$150,818$32,500+$3,385
14$2,500$164,235$168,266$35,000+$4,030
15$2,500$182,180$186,934$37,500+$4,754
16$2,500$201,346$206,910$40,000+$5,563
17$2,500$221,819$228,283$42,500+$6,464
18$2,500$243,688$251,153$45,000+$7,465
19$2,500$267,051$275,624$47,500+$8,572
20$2,500$292,011$301,807$50,000+$9,796

What changes the answer most

These two inputs move the after-tax advantage of investing your HSA the most when varied one at a time.

  • If years before cashing in receipts were 5 years higher, the after-tax advantage of investing the HSA would rise by about $8,211; 5 years lower, it would fall by about $5,042.
  • If the investment return were 2 points higher, the after-tax advantage of investing the HSA would rise by about $4,938; 2 points lower, it would fall by about $3,777.

How this estimates

Equal cash flow each year. Both paths start with the same HSA balance, put the same yearly contribution into the HSA, and pay the same yearly medical bills. Under Spend HSA now, up to your available HSA balance is withdrawn each year to pay medical bills, and the personal cash you did not have to spend on those bills is invested in a taxable brokerage account. Under Invest HSA + save receipts, you pay those medical bills out of pocket with that personal cash, leave the HSA untouched to compound, and save the medical receipts to reimburse yourself tax-free later.

Taxable brokerage drag. In the brokerage account, the dividend portion of the return is taxed each year at your capital gains and dividend rate, and the remaining price gain is taxed at the end of the horizon when realized. Inside the HSA, investment growth is 100% free of federal tax when used for qualified medical expenses (and subject to state tax only if you enter a state rate for California or New Jersey).

Cash buffer and receipt loss. Many HSA plans require a cash minimum (such as $1,000) that earns a lower cash rate before excess funds can be invested. If you enter a receipt-loss percentage above 0%, that share of the extra HSA balance is taxed at your retirement ordinary income tax rate (the rule after age 65).

What this leaves out

Upfront payroll or income tax savings from contributing to the HSA are identical under both paths and are not double-counted as an investing advantage. Credit card rewards from paying medical bills out of pocket (often 1.5% to 2% cash back), HSA custodian investment fees, estate taxes (an HSA left to a non-spouse beneficiary becomes taxable to the beneficiary in the year of death under IRC Section 223(f)(8)(B)), and medical inflation are not in the math.

IRS rules and state taxes

Per IRS Publication 969 and IRS Notice 2004-50 (Q&A-39), there is no time limit on when you reimburse yourself from an HSA for qualified medical expenses incurred after the HSA was established, provided you keep records showing that the expenses were not previously paid or reimbursed from another source and were not taken as an itemized medical deduction. Per IRS Revenue Procedure 2025-19, 2026 HSA contribution limits are $4,400 for self-only HDHP coverage and $8,750 for family coverage, plus $1,000 at age 55 or older.

Sources and date checked

Every starting value and statutory limit is listed in the sources table below with the date checked (2026-10-18). An estimate from the numbers you typed. Not tax, legal or financial advice. Confirm HSA recordkeeping rules with the IRS and a tax preparer.

Benchmark sources and dates

Starting assumptions are example benchmarks, not binding quotes. Change any input to match your own bills or offers.

Assumption / InputStarting valueSourceChecked
2026 HSA contribution limits$4,400 self-only coverage, $8,750 family coverage, plus $1,000 catch-up at age 55 or older. Default contribution $6,500 a year (typical family contribution, edit this).IRS Revenue Procedure 2025-19 and IRS Publication 9692026-10-18
Delayed HSA reimbursement ("shoebox" rule)No federal deadline to reimburse qualified medical expenses incurred after the HSA was established.IRS Notice 2004-50, Q&A-39 and IRS Publication 9692026-10-18
Qualified medical bills a year$2,500 a year. Typical, edit this.IRS Publication 502, Medical and Dental Expenses and IRS Revenue Procedure 2025-192026-10-18
Starting HSA balance and horizon$5,000 starting balance and 20 years. Typical, edit this.Employee Benefit Research Institute (EBRI) HSA Database context; round typical values2026-10-18
Yearly investment return and dividend yield7% total yearly return, including a 1.5% dividend yield in the taxable brokerage account. Typical, edit this.Historical U.S. equity and balanced portfolio benchmark convention; round typical values2026-10-18
HSA required cash buffer and cash interest rate$1,000 cash minimum earning 0.5% a year. Typical, edit this.Typical HSA custodian schedule (many employer plans require $1,000 to $2,000 in cash before investing; some direct custodians require $0)2026-10-18
Capital gains and dividend tax rate15%. Sourced statutory middle bracket; edit to add your state rate or enter 0%.IRS Topic 409, Capital Gains and Losses2026-10-18
State tax rate on HSA earnings0% default (48 states including New York, plus D.C.); 9.3% in the California/New Jersey preset.California FTB Publication 1001 and New Jersey Division of Taxation GIT-52026-10-18
Non-medical HSA withdrawals at age 65+22% ordinary income tax rate in retirement, 0% penalty after age 65. Typical marginal bracket, edit this.IRS Publication 969 and IRS Form 8889 Instructions2026-10-18