Financial Literacy Investing Work Optional Lifestyle

From Investopedia: Investing in Your HSA vs. Your 401(k)

BY Spectrum Wealth Management | Jun 13, 2023
By Carrie Pallardy | Reviewed by David Kindness | Fact checked by Vikki Velasquez

May 31, 2023

Health Savings Accounts (HSAs) and 401(k) plans are offered by many employers in the United States. Both HSAs and 401(k) plans can offer tax benefits, but these two types of accounts have distinct purposes and rules. What is the difference between your HSA and your 401(k)?


  • A high-deductible health plan (HDHP) lets you make contributions to a Health Savings Account (HSA), which will help you save up for qualified medical expenses.
  • Your 401(k) is a retirement savings plan offered by many employers.
  • Both employers and employees may make contributions to HSAs and 401(k)s.
  • Contributions to your HSA are not taxed, while the tax rules for 401(k) plans depend on whether your 401(k) is traditional or Roth.

How an HSA Works

An Health Savings Account (HSA) is a savings account paired with a high-deductible health plan (HDHP). In 2022, HDHPs have an annual deductible of $1,400 or more for individuals and $2,800 or more for families. The health plan also must have limits on out-of-pocket medical expenses. In 2022, out-of-pocket expenses cannot exceed $7,050 for individual coverage and $14,100 for family coverage.1 In 2023, HDHPs annual deductible increases to $1,500 or more for individuals and $3,000 or more for families. Also, out-of-pocket expenses limit increases to $7,500 for individual coverage and $15,000 for family coverage.2

To make HSA contributions, you must have an HDHP. Additionally, you cannot have other health coverage or be enrolled in Medicare. You also cannot be claimed as a dependent on someone else’s tax return.3

Typically, you cannot use your HSA to pay for premiums. The funds in the account can be used to pay for expenses like your deductible, co-payments, and co-insurance.4

The money in the account accrues tax free, and you have the option of investing HSA funds to potentially increase your returns.5

How a 401(k) Works

A 401(k) is a retirement savings plan that allows employees to contribute money, often through payroll deductions, to an investment account. Employers can elect to match all or some of employees’ 401(k) contributions.6 You typically have the option to choose from different investment types, often mutual funds, for your 401(k).7

Traditional and Roth are the two main types of 401(k) plans, and tax treatment is the primary difference between these two options. With a traditional 401(k), you will wait to pay taxes until you withdraw money from the account, typically in your retirement years. With a Roth 401(k), you contribute money after taxes, which means that withdrawals in your retirement years will be tax free.8

What Are the Contribution Limits?

Each year, the Internal Revenue Service (IRS) sets contribution limits for HSAs and 401(k)s. In 2022, individuals can contribute up to $3,650 to their HSAs. Individuals with family health coverage can contribute up to $7,300.9 For 2023, the contribution limits increase to $3,850 and $7,750 respectively.10

Individuals who are age 55 or older can make an annual catch-up contribution, an additional $1,000. These limits include any contributions made by the individual and the employer.11

If you make HSA contributions that exceed the limit set by the IRS, the excess amount will generally be subject to a 6% excise tax.12

In 2022, the IRS set the maximum 401(k) contribution as $20,500 (rising to $22,500 in 2023). If you are 50 or older, you are also eligible to make an additional catch-up contribution of $6,500 (rising to $7,500 in 2023). In 2022, the IRS limits employer and employee contributions to $61,000 (rising to $66.000 in 2023).13

If you over-contribute to your 401(k), the excess amount needs to be returned to you. That amount will be considered taxable earnings, and they are subject to a 10% early distribution tax if not withdrawn before annual tax filings are due.13

What Are the Tax Benefits and Considerations?

HSAs are considered tax-advantaged accounts. Your contributions to an HSA are tax deductible, and any contributions that your employer makes are not included in your gross income. Additionally, the earnings from your HSA are not taxable, and the distributions that you use to pay for qualified medical expenses are also tax free. You are able to make tax-free withdrawals to pay for qualified medical expenses at any age.5

While your HSA may be set up with the help of your employer, it is not tied to them. You are able to take the account and all of the funds in it with you if you change jobs or retire. You can continue to leverage the account during your retirement to pay for medical expenses in retirement. Once you turn age 65, you can begin using your HSA funds for non-qualified expenses without paying a tax penalty. Instead, you will simply pay income tax on the funds used for non-qualified expenses.5

Tax deferral is one of the main benefits of a traditional 401(k). The money that you contribute is pretax, which means your taxable income is less for that year. You do not have to pay taxes on the money in your traditional 401(k) until you begin making withdrawals during your retirement years. 401(k)s, unlike HSAs, come with required minimum distributions (RMDs).14

Money is contributed to a Roth 401(k) after income taxes, which means that you do not have any tax deductions during the years when you make contributions. When you make withdrawals during retirement, you will not have to pay any taxes.14

Keep in mind that withdrawing money from your 401(k) before you reach the age of 59½ means that you will incur a 10% additional income tax. If you qualify for a hardship withdrawal, you can avoid the 10% penalty, but you will still owe taxes.15,16

How Does Investing in a 401(k) Work?

401(k) plans typically offer mutual funds that range from conservative to aggressive. Before choosing, consider your risk tolerance, age, and the amount you’ll need to retire. Avoid funds with high fees, and be sure to diversify your investments to mitigate risk, although many funds are already diversified.

How Does Investing in an HSA Work?

You can also use the money in your Health Savings Account (HSA) to invest in stocks and other securities, potentially allowing for higher returns over time. The key to maximizing your unspent contributions, of course, is to invest them wisely. Your investment strategy should be similar to the one you’re using for your other retirement assets, such as a 401(k) plan or an individual retirement account (IRA). When deciding how to invest your HSA assets, make sure to consider your portfolio as a whole so your overall diversification strategy and risk profile are where you want them to be.

When Can I Make Withdrawals?

You can make HSA withdrawals for qualified medical expenses at any time without having to pay any taxes. You can also save the funds in your HSA to help fund medical expenses in your retirement. After you turn 65 years old, you can begin using your HSA funds for other expenses without paying a 20% penalty.17

If you take money out of your 401(k) before turning age 59½, it is considered an early withdrawal, which usually comes with financial penalties. After you reach 59½, you can begin taking withdrawals without penalties.16

The Bottom Line

You can have both an HSA and a 401(k). You can leverage the former to help you cover medical expenses, while the latter will help you to save up for retirement. Typically, you can opt for a certain amount of each paycheck to go into your HSA and your 401(k). Your employer may also make contributions to both accounts, depending on your benefits package. You can use both your HSA and your 401(k) as retirement planning tools.

This article was originally published in Investopedia on May 31, 2023, written by By Carrie Pallardy, reviewed by David Kindness, and fact checked by Vikki Velasquez.


2. Image courtesy of iStock

Investopedia requires writers to use primary sources to support their work. These include white papers, government data, original reporting, and interviews with industry experts. We also reference original research from other reputable publishers where appropriate. You can learn more about the standards we follow in producing accurate, unbiased content in our editorial policy.

Article Sources

1.  Internal Revenue Service.

2. Internal Revenue Service.

3. Internal Revenue Service.

4. Health Insurance Market Place.

5. U.S. Securities and Exchange Commission.

6. Financial Industry Regulatory Authority.

7. Financial Industry Regulatory Authority.

8. U.S. Securities and Exchange Commission.

9. Internal Revenue Service.

10. Internal Revenue Service.

11. Internal Revenue Service.

12. Internal Revenue Service.

13. Internal Revenue Service.

14. Internal Revenue Service.

15. Internal Revenue Service.

16. Internal Revenue Service.

17. Internal Revenue Service.

Spectrum Wealth Management, LLC is an investment adviser registered with the U.S. Securities and Exchange Commission. Registration does not imply a certain level of skill or training. Additional information about Spectrum’s investment advisory services is found in Form ADV Part 2, which is available upon request. The information presented is for educational and illustrative purposes only and does not constitute tax, legal, or investment advice. Tax and legal counsel should be engaged before taking any action. The opinions expressed and material provided are for general information and should not be considered a solicitation for purchasing or selling any security.