A health savings account is usually treated as a place to park money for this year's doctor bills, but its tax rules make it one of the strongest long-term investment accounts available to people with the right health plan. This page covers the tax treatment, who qualifies after the 2026 changes, the limits, when to invest rather than hold cash, the receipt strategy, a 20-year example, the rules at 65 and the two states that tax HSAs. How it fits with workplace plans and IRAs is on the stocks hub.
How does the HSA triple tax advantage work?
An HSA can avoid federal income tax at all three stages: when money goes in, while it grows and when it comes out for medical care. Contributions through an employer's cafeteria plan also skip Social Security and Medicare tax, which no IRA contribution or 401(k) deferral does.
| HSA | Traditional 401(k) or IRA | Roth IRA | |
|---|---|---|---|
| Money going in | Deductible or excluded from pay; no payroll tax through a cafeteria plan | Deductible or excluded from income tax; payroll tax still applies | Not deductible |
| Growth | Not taxed | Not taxed | Not taxed |
| Withdrawals for medical costs | Tax-free at any age | Taxed as ordinary income | Tax-free once qualified |
| Withdrawals for anything else | Taxed as income; a 20% penalty also applies before 65 | Taxed as income; a 10% penalty usually applies before 59½ | Contributions come out tax-free; earnings can be taxed and penalized |
| Required withdrawals | None | Yes, starting at 73 or 75 depending on birth year | None for the original owner |
Qualified medical expenses are the costs listed in IRS Publication 502, such as deductibles, copays, prescriptions, dental work and glasses, for you, your spouse and your dependents. Insurance premiums mostly don't qualify. The exceptions are COBRA coverage, coverage while you receive unemployment benefits, long-term care insurance within limits and, from 65, Medicare premiums.
Who can contribute to an HSA in 2026?
You can contribute for any month that starts with HSA-eligible health coverage and no other coverage that disqualifies you. Normally that means a high-deductible health plan whose deductible and out-of-pocket cap meet the IRS thresholds in the next section, though preventive care can be covered from the first dollar. A 2025 law, explained in IRS Notice 2026-5, widened the rules:
- Bronze and catastrophic plans. From 2026 these count even when they miss the usual thresholds, provided the same plan is sold as individual coverage on a health insurance exchange. Buying it directly from the insurer is fine; small-business exchange plans qualify only if they meet the normal thresholds.
- Direct primary care. A membership with a doctor's practice costing up to $150 a month, or $300 covering more than one person, no longer disqualifies you, and the fees can be paid from the HSA.
- Telehealth. A plan can cover virtual visits before the deductible without costing you eligibility, a rule now made permanent.
You can't contribute while enrolled in any part of Medicare, if someone else can claim you as a dependent, or while other health coverage pays before the deductible. A general-purpose health FSA or HRA counts, including a spouse's that can reimburse your bills. Dental, vision, accident, disability and long-term care coverage are allowed.
How much can you contribute to an HSA?
For 2026 the limit is $4,400 for self-only coverage and $8,750 for family coverage, plus $1,000 at 55 or older, and the 2027 figures are already published.
| Figure | 2026 | 2027 |
|---|---|---|
| Contribution limit | $4,400 for self-only coverage and $8,750 for family coverage, plus $1,000 at 55 or older | $4,500 for self-only coverage and $9,000 for family coverage, plus $1,000 at 55 or older |
| High-deductible plan thresholds | a deductible of at least $1,700 for self-only coverage or $3,400 for family coverage, with out-of-pocket costs capped at $8,500 or $17,000 | a deductible of at least $1,750 for self-only coverage or $3,500 for family coverage, with out-of-pocket costs capped at $8,700 or $17,400 |
Sources: IRS Rev. Proc. 2025-19 for 2026 and Rev. Proc. 2026-24, published May 29, 2026, for 2027.
- One shared limit. Your deposits and your employer's all count. Deposits through payroll skip payroll tax; deposits you make yourself are deducted on your return but come from pay that already owed payroll tax.
- Couples. With family coverage, spouses split the family limit however they like, but each spouse 55 or older adds the $1,000 catch-up only to an HSA in their own name.
- Part-year coverage. The limit is prorated by month unless you are eligible on December 1, when the last-month rule allows the full amount. You must then stay eligible through December 31 of the next year, or the extra is taxed with a 10% additional tax.
- Deadline. You can still fund the 2026 limit until April 15, 2027.
- IRA transfer. Once in a lifetime you can move IRA money into an HSA, up to that year's limit, as a qualified HSA funding distribution.
- Too much. Contributions over the limit owe a 6% excise tax for every year they remain.
Limits for workplace plans and IRAs are in IRA and 401(k) contribution limits.
Should you invest your HSA or keep it in cash?
A common approach is to keep enough cash for the deductible or a typical year's bills and invest the rest for the long term.
| Cash in the HSA | Invested HSA | |
|---|---|---|
| Suits | Bills expected this year or next | Money you won't touch for five years or more |
| Typical holdings | Interest-bearing deposit or money market option | Index funds, target-date funds or other funds on the provider's menu |
| Main risk | Inflation slowly erodes the balance | Prices can fall just before a large bill |
| Costs to check | Interest rate paid and monthly account fees | Fund expense ratios and any investment platform fee |
Many providers require a minimum cash balance before you can invest, and menus range from a handful of funds to a full brokerage window. Your employer usually picks the provider that receives payroll deposits, but trustee-to-trustee transfers to another HSA are unlimited, so you can keep the payroll tax savings and invest elsewhere. A single fund that shifts its mix with age, explained in target-date funds, keeps upkeep low.
Cash set aside for near-term bills works like an emergency fund for medical costs; where to keep an emergency fund compares the options, and how money market funds work explains a common HSA cash choice. HSAs with a brokerage window may also hold Treasury bills, which behave much as described in T-bills in an IRA.
How does paying out of pocket and reimbursing yourself later work?
You can pay a medical bill with other money, let the HSA keep growing and withdraw the same amount tax-free years later. IRS Notice 2004-50 sets no time limit, provided the expense came after the HSA was opened, wasn't reimbursed by insurance and wasn't claimed as an itemized deduction. Keep the itemized receipt or explanation of benefits and proof of payment for as long as you might withdraw against it, plus the years the return could be examined.
Worked example: A $2,000 dental bill reimbursed 14 years later
In 2026 Nia pays a $2,000 dental bill from her checking account and files the itemized receipt and card statement. Her HSA stays invested.
- The $2,000 left in the HSA, grown at an assumed 6% a year for 14 years: $4,521.81.
- In 2040 she withdraws $2,000 tax-free against the saved receipt.
- The other $2,521.81 stays invested and has never been taxed.
The strategy only helps if you can pay bills from other savings without carrying debt, and it depends on records surviving for years. Withdraw only what your documents support, because an undocumented withdrawal before 65 is taxed and penalized.
How much could an invested HSA grow in 20 years?
Funded at the 2026 self-only limit for 20 years, an HSA spent on medical costs ends well ahead of the same pay saved elsewhere.
Worked example: 20 years of HSA contributions compared
Nia is 45, has self-only HSA-eligible coverage and can set aside $4,400 of pre-tax pay each year for 20 years. Assumptions: a 6% yearly return on investments, 2% on cash, a 22% federal tax rate now and in retirement, 7.65% payroll tax and a 15% rate on long-term gains. Catch-ups, limit increases and state tax are left out.
| Where the $4,400 of pay goes | Invested each year | Value at 65 | After tax |
|---|---|---|---|
| HSA, invested, spent on medical costs | $4,400.00 | $161,856.60 | $161,856.60 |
| HSA, invested, spent on other things after 65 | $4,400.00 | $161,856.60 | $126,248.15 |
| Traditional 401(k), after payroll tax | $4,063.40 | $149,474.57 | $116,590.17 |
| Roth 401(k) or Roth IRA | $3,095.40 | $113,866.12 | $113,866.12 |
| HSA left in cash at 2% | $4,400.00 | $106,908.43 | $106,908.43 |
| Taxable brokerage account | $3,095.40 | $113,866.12 | $106,072.40 |
Spent on medical costs, the invested HSA finishes $55,784.20 ahead of the taxable account and $54,948.17 ahead of the same HSA held in cash.
Even spent on other things after 65, the HSA beats the traditional 401(k) by $9,657.98 here, purely because it skipped payroll tax. That edge disappears if you contribute directly instead of through payroll, and a 401(k) match, which an HSA can't offer, would change the comparison. A 6% return is an assumption, not a forecast; real returns vary and can be negative for years. Test other rates and periods with the compound interest calculator, and see capital gains tax on stocks for how gains in the taxable account are taxed.
What changes at 65 and when you enroll in Medicare?
At 65 the 20% penalty on non-medical withdrawals ends, but enrolling in any part of Medicare stops new contributions from the first month of coverage. After 65 the account can pay Medicare Part A, Part B, Part D and Medicare Advantage premiums tax-free, though not Medicare supplement (Medigap) policies.
Starting Social Security at 65 or later enrolls you in Part A automatically. If you apply later, premium-free Part A begins up to six months before your application, but not before 65, so the Social Security Administration advises stopping HSA contributions six months before you apply.
Worked example: Prorating contributions around Medicare
Omar turns 65 on August 15, 2026, and his Medicare Part A begins August 1. He was HSA-eligible from January through July.
- Eligible months in 2026: 7.
- Limit: ($4,400 + $1,000 catch-up) × 7 ÷ 12 = $3,150.
If he instead delayed Medicare and Social Security and applied in March 2028, Part A would be backdated to September 2027. His 2027 limit would become ($4,500 + $1,000) × 8 ÷ 12 = $3,666.67, and contributions should stop after August 2027.
Do California and New Jersey tax HSAs?
Yes: both states tax HSA money that federal law leaves alone, in different ways, so residents get less from an HSA than the figures above suggest.
California does not recognize HSAs. Contributions aren't deductible on the state return, employer contributions are added back to state wages, and interest, dividends and capital gains inside the account are taxed by California in the year they arise, so you need yearly records much like a brokerage account. Because that money was already taxed, a non-medical withdrawal included in federal income isn't taxed again by California.
New Jersey has no deduction for HSA contributions: its list of allowed deductions includes Archer medical savings accounts but not HSAs. Contributions made by salary reduction also count as taxable New Jersey wages, because the state does not follow the federal cafeteria plan exclusion. The Division of Taxation does not clearly address the yearly earnings inside an HSA, so residents should check with a tax professional who knows New Jersey rules. Most other states follow the federal treatment, but check your own state's rules.
What are the risks of investing an HSA?
The biggest risk is needing the money for a large medical bill just after the market has fallen.
- Market losses. Invested balances can drop sharply; types of investment risk explains the main ones.
- High deductibles. An HSA-eligible plan can cost more in a bad health year than a plan with a lower deductible, so compare total expected costs, not just premiums.
- Penalties. Non-medical withdrawals before 65 owe income tax plus 20%, and losing eligibility after using the last-month rule brings tax plus 10%.
- Records. Reimbursing yourself years later depends on receipts that prove each expense.
- Fees and menus. Account fees and costly funds can eat into a small balance, and some providers offer few choices.
- Social Security credit. Payroll contributions are left out of the earnings Social Security counts, which can slightly lower future benefits.
- Heirs. A spouse can take over the account, but any other beneficiary owes income tax on the whole balance at once, so spending it on medical costs during life is usually more efficient.
- Rule changes. Congress widened eligibility for 2026 and can change the rules again, and state treatment can differ from federal.
An HSA sits alongside workplace and IRA savings: 401(k) basics covers how an employer match works, and Roth vs traditional IRA weighs a deduction today against tax-free withdrawals later. HSA rules and state treatment change, so check current IRS guidance and consider a tax professional for your own situation.
