Are HSA Contributions Subject to Social Security Tax?

Whether HSA contributions are subject to Social Security tax depends entirely on how the money gets into the account. Contributions routed through an employer’s Section 125 cafeteria plan, and contributions your employer makes directly, are exempt from the 6.2% Social Security tax. Contributions you make with after-tax money from a personal account are not exempt, and the Social Security tax already withheld on those dollars cannot be recovered.

Payroll Contributions Through a Cafeteria Plan

Most employees fund an HSA through a Section 125 cafeteria plan. The amount you elect is pulled from your paycheck before payroll taxes are calculated, so it never enters the wage base used for FICA. Federal law specifically excludes cafeteria plan contributions from the definition of taxable wages used to calculate FICA obligations.1Office of the Law Revision Counsel. 26 U.S. Code 3121 – Definitions

The savings are concrete. Route $4,400 into your HSA through payroll and you avoid roughly $273 in Social Security tax for the year (6.2% × $4,400).2Internal Revenue Service. Topic No. 751, Social Security and Medicare Withholding Rates Your employer saves the same amount because it pays a matching 6.2% on every dollar of taxable wages. That mutual benefit is why most employers push payroll deferrals over personal deposits.

Direct Employer Contributions

Money your employer deposits into your HSA on top of your own elections is also outside the Social Security and Medicare wage base. The IRS does not treat employer HSA contributions as part of your gross income, and they are not subject to employment taxes.3Internal Revenue Service. Publication 969, Health Savings Accounts and Other Tax-Favored Health Plans The combined figure (your cafeteria plan election plus the employer share) appears in box 12 of your W-2 under code W, but it is not included in the wages reported in box 1, 3, or 5.

Employer contributions still count against your annual HSA limit, so the total of what you and your employer put in cannot exceed the cap for your coverage type.

After-Tax Personal Contributions

If you write a check or transfer money to your HSA from a personal account, the tax picture changes. You get an income tax deduction when you file, but the Social Security and Medicare taxes withheld from the paycheck that produced those dollars stay withheld.3Internal Revenue Service. Publication 969, Health Savings Accounts and Other Tax-Favored Health Plans

A $4,000 contribution from after-tax savings is a useful example. You already paid $248 in Social Security tax on that $4,000 when it hit your paycheck. You can deduct the $4,000 on Form 1040 to lower your federal income tax, but there is no mechanism to reclaim the $248.4Internal Revenue Service. About Form 8889, Health Savings Accounts (HSAs) Combined with the 1.45% Medicare tax that is also lost, an after-tax contribution costs you about 7.65% more than the same contribution made through a cafeteria plan.

Self-Employed Contributors

If you are self-employed, your HSA deduction reduces your income tax but does not reduce the earnings on which self-employment tax is calculated. The deduction is taken as an adjustment to gross income on your personal return; it does not flow through to Schedule SE. In practical terms, self-employed contributors pay the full 12.4% Social Security portion of SE tax on the money they put into an HSA.

Partners in a partnership sit slightly outside that rule. If the partnership makes HSA contributions treated as distributions rather than guaranteed payments, those amounts are not included in your net earnings from self-employment, and you take the deduction on your personal return. Contributions treated as guaranteed payments are included in self-employment income before the deduction is applied.3Internal Revenue Service. Publication 969, Health Savings Accounts and Other Tax-Favored Health Plans

Medicare Tax Follows the Same Rule

The pre-tax versus after-tax split that drives Social Security treatment also drives Medicare treatment. Cafeteria plan and employer contributions are exempt from the 1.45% Medicare tax; after-tax personal contributions are not, and the Medicare tax already paid cannot be recovered.

For higher earners, the 0.9% Additional Medicare Tax applies to wages above $200,000 for single filers and $250,000 for joint filers.5Internal Revenue Service. Questions and Answers for the Additional Medicare Tax Because a payroll HSA election reduces Medicare wages, it can shrink the amount subject to that surtax or keep you under the threshold entirely.

The Cost of Lower Reported Earnings

Sheltering wages from Social Security tax also shrinks the earnings record that determines your future benefit. Social Security uses your highest 35 years of indexed earnings to calculate retirement benefits, and every dollar diverted into an HSA through payroll is a dollar missing from that record.

For most contributors, the current tax savings and the tax-free growth inside the HSA outweigh the modest reduction in future benefits. If your wages already exceed the Social Security wage base (which is $184,500 in 2026), the trade-off effectively disappears, because earnings above the cap do not count toward benefits either way.6Social Security Administration. Contribution and Benefit Base

Excess Contributions Lose the Exemption

The Social Security tax break only reaches contributions within the annual limit. Anything above the cap is treated as regular wages, taxed at the full 6.2%, and hit with a 6% excise tax for each year the surplus stays in the account.7Office of the Law Revision Counsel. 26 USC 4973 – Tax on Excess Contributions to Certain Tax-Favored Accounts and Annuities

You can avoid the excise tax by withdrawing the excess, along with any earnings on it, before your filing deadline including extensions. If you already filed, you have up to six months after the original due date to pull the excess and file an amended return.8Internal Revenue Service. Instructions for Form 8889 Earnings withdrawn with the excess are reported as income in the year of the withdrawal.