What Is an HSA?

A health savings account (HSA) is a tax-advantaged account for medical costs. To contribute, you generally must be covered by a high-deductible health plan. Contributions may be tax-deductible, growth isn't taxed, and withdrawals for qualified medical expenses are tax-free. Because the money can stay in the account year after year, some people also use an HSA as a long-term savings tool for future health costs.
This guide, part of our Taxes & Investing section, explains how HSAs work in general terms. The IRS sets the rules, including annual contribution limits and the definition of a high-deductible plan, and those numbers can change each year. Check IRS.gov for current figures before you contribute.
The tax treatment, in depth
HSAs are sometimes described as having three tax benefits. Here's what each one means.
| Stage | General tax treatment | Fine print to check |
|---|---|---|
| Putting money in | Contributions may be tax-deductible, or made before tax through payroll at work | Annual limits set by the IRS; eligibility each month |
| While it's invested | Growth, interest and dividends inside the account aren't taxed | Investment options and fees vary by provider |
| Taking money out | Withdrawals for qualified medical expenses are tax-free | Non-qualified withdrawals may be taxed and penalized |
Two words do a lot of work here. Eligible means you meet the IRS conditions to contribute, starting with being covered by a qualifying high-deductible health plan. Qualified medical expenses are costs the IRS recognizes, and IRS.gov publishes guidance on what counts.
Some states treat HSAs differently from the federal rules, so state taxes may apply even where federal taxes don't. A tax professional can tell you how your state handles it.
How an HSA differs from an FSA
People often confuse HSAs with flexible spending arrangements (FSAs). Both help with health costs, but they work differently.
- Ownership: an HSA belongs to you and generally stays with you if you change jobs. An FSA is usually tied to your employer.
- Carryover: HSA money generally rolls over every year. FSA money is often use-it-or-lose-it, with limited exceptions set by the plan.
- Eligibility: an HSA requires a qualifying high-deductible health plan. An FSA doesn't.
- Investing: many HSAs allow investing. FSAs generally don't.
Using an HSA as a long-term account
Because unused HSA money rolls over and can be invested, some people pay current medical bills from their regular budget and leave the HSA to grow for future health costs, which often rise later in life. Others use the HSA for today's bills, which is exactly what it's designed for. Neither approach is right for everyone.
If you think about the long-term approach, keep these points in mind:
- You need cash flow to cover bills now. If paying out of pocket would strain your budget or emergency fund, using the HSA as intended is perfectly reasonable.
- Investments carry risk. Money invested inside an HSA can lose value. Funds you may need soon are often kept in cash.
- Receipts matter. Some people save receipts for qualified expenses to support tax-free withdrawals later. Our guide to investment record keeping covers how to store records like these.
- Rules can change. What's allowed today may not be allowed later.
Health costs are one piece of a bigger retirement picture. Our guide on how much to save for retirement explains why there's no single number and which factors, including health care, are worth considering.
A hypothetical example
Example (made-up situation): Riley's employer offers a high-deductible health plan with an HSA, and adds a contribution of its own. Riley confirms with HR that the plan qualifies, then sets up payroll contributions. They keep a modest cash balance in the HSA for likely bills this year and put the rest in a diversified investment option, knowing it can rise or fall. Riley saves every medical receipt in a folder labeled by year. They also ask a tax professional how their state treats HSA contributions.
Choosing and using an HSA provider
If your employer offers an HSA, it usually picks the provider. You may be able to move money to a different provider later. When comparing, look at:
- Monthly or yearly account fees
- Investment options and their costs
- Any minimum cash balance before you can invest
- How easy it is to pay bills or reimburse yourself
- How the provider reports contributions and withdrawals for tax time
What happens when your coverage changes
Life changes can affect your HSA. If you switch to a health plan that isn't high-deductible, you generally can't keep contributing, but the money already in your HSA stays yours and can still be used for qualified medical expenses. Changing jobs works the same way: the account goes with you. Contributions in a year when you were eligible for only part of the time can be complicated, so this is a good moment to check IRS.gov or ask a tax professional before adding more.
Common mistakes
- Contributing while not eligible, for example after switching to a plan that isn't high-deductible.
- Going over the annual limit when both you and your employer contribute.
- Using HSA money for non-qualified expenses without realizing the tax consequences.
- Not keeping receipts for withdrawals.
- Investing money you'll need next month in something that can drop in value.
Where HSAs fit with other accounts
An HSA is one of several tax-advantaged accounts. Our guide to 529 plans explains a different special-purpose account built for education. And since growth inside an HSA isn't taxed each year, it's treated differently from the dividends and interest covered in our guide to investment income taxes.
You may see paid courses promising an "HSA strategy" that sounds too good to be true. Our guide to free investing resources points to official, no-cost education you can start with instead.
Questions to ask
- Does my health plan qualify as a high-deductible plan for HSA purposes?
- What is this year's contribution limit on IRS.gov, and does my employer's contribution count toward it?
- What fees does my HSA charge, and what investment options does it offer?
- How does my state tax HSAs?
A CPA, enrolled agent or benefits specialist can help with the tax side, and a fee-only fiduciary adviser can help you think about how an HSA fits your overall plan.
Something to do today
If you have an HSA, log in and find three things: your current balance, any monthly fee, and whether part of your balance is invested or held in cash. If you don't have one, look at your health plan summary and find out whether it's described as HSA-eligible.
This guide is general education, not tax, medical or investment advice. Check IRS.gov for current rules and consider talking with a qualified tax professional.
Want a structured investing course?
Some people like the structure of a paid program. This button opens a third-party investing course, newsletter or program from one of our advertising partners. Its claims are its own, not ours, and we haven't verified any results it describes. Investing involves risk, including loss of money. Never invest money you can't afford to lose, and weigh any offer against our investment red flags checklist.
See the partner program →We may be paid when you click. The program shown can change. Read its terms before you buy anything. How this works
Frequently asked questions
Who can contribute to an HSA?
To contribute to a health savings account, you generally must be covered by a high-deductible health plan, and other IRS conditions apply. Your health plan or employer can tell you whether your coverage qualifies, and IRS.gov explains the full rules.
Does HSA money disappear at the end of the year?
No. Unlike some flexible spending arrangements, money in an HSA generally stays in your account from year to year, and the account belongs to you even if you change jobs or health plans.
Can I invest the money in my HSA?
Many HSA providers let you invest part of your balance in options such as funds once you meet any minimum they set. Investments can lose value, so money you expect to need for near-term medical bills may belong in the cash portion.



