Tax year 2026Checked

HSA on H-1B or OPT: can you open one, deduct it, and keep it if you leave the US?

Who can open a health savings account on OPT, STEM OPT, J-1 or H-1B, the 2027 limits, what is and is not settled for a nonresident on Form 1040-NR, and what happens to the money when you move home.

$4,500 the most you can put in an HSA for 2027 with self-only HDHP cover, counting your employer's deposits

In short

  1. HSA eligibility has no citizenship, visa or residency test: you need coverage under a high-deductible health plan (HDHP) on the first day of each month, no other health coverage that is not allowed, no Medicare, and no one able to claim you as a dependent.
  2. For 2027 you can put in $4,500 with self-only HDHP cover or $9,000 with family cover, including your employer's deposits, plus $1,000 from age 55.
  3. HSA money taken from your pay through a cafeteria plan is free of federal income tax and Social Security and Medicare tax for every employee, nonresident aliens included.
  4. Whether a nonresident alien may deduct money they deposit in an HSA themselves, outside payroll, is not settled in the IRS texts, so the cafeteria-plan route is the one with a clear answer.
  5. The account stays yours after you leave the US; money spent on anything but qualified medical expenses before age 65 is taxable plus a 20% additional tax, unless you are disabled.
Contents, 10 sections

You can open and fund a health savings account (HSA) on H-1B, OPT or STEM OPT. The tax law has no visa, citizenship or residency test: you need a high-deductible health plan (HDHP) and no other coverage that is not allowed.

For 2027 you can put up to $4,500 with self-only cover in through your employer's cafeteria plan, straight from your pay. That money is free of federal income tax and of Social Security and Medicare tax (FICA) for every employee, and the account stays yours if you leave the US.

Two points are not settled for a nonresident alien: deducting money you deposit yourself, and how the US taxes a non-medical payout after you move home. This guide says where the IRS texts stop. For the rest of your return, start with the guide to US taxes for international students.

Can you open an HSA on H-1B, OPT or another visa?

Anyone can put money in an HSA, whatever their visa, for each month they meet four tests. Publication 15-B (2026) adds that "There are no income limits" and no earned-income requirement.

For each month you must (Publication 969):

  1. Be covered by an HDHP on the first day of the month.
  2. Have no other health coverage that is not allowed. A general-purpose health FSA or HRA counts as other coverage; a limited-purpose one does not.
  3. Not be enrolled in Medicare.
  4. Not be someone another person can claim as a dependent.

For 2027 an HDHP has a deductible of at least $1,750 (self-only) or $3,500 (family). Its out-of-pocket costs, premiums aside, may not exceed $8,700 or $17,400 (Revenue Procedure 2026-24).

The first-of-the-month test catches new graduates. If your student health plan is not an HDHP and still covers you on July 1, when your employer HDHP starts, you are not eligible for July.

Note

Whether home-country insurance or a national health system counts as "other health coverage" is not answered in any IRS text we found. If you keep cover at home, ask the HSA provider or a tax preparer before you contribute.

A spouse's non-HDHP plan does not end your eligibility if it does not cover you. Pub 969 says you can still be eligible "even if your spouse has non-HDHP coverage, provided you aren't covered by that plan."

Key facts

2027 HSA limit
$4,500 self-only, $9,000 family ($4,400 and $8,750 for 2026)
Extra from age 55
$1,000 a year (not indexed)
2027 HDHP minimum deductible
$1,750 self-only, $3,500 family
HSA through payroll (cafeteria plan)
No federal income tax and no Social Security or Medicare tax, for any visa
Last day to add money for 2026
Thursday, April 15, 2027
Non-medical withdrawal before 65
Income tax plus a 20% additional tax, unless you are disabled
For
F-1 workers on OPT or STEM OPT, J-1 workers and H-1B workers choosing a health plan and an HSA at open enrollment for 2027, and their H-4 or F-2 spouses.
Not for
Anyone looking for a recommendation of a plan, an insurer or an HSA provider, and anyone asking how their home country taxes an HSA.

How much can you put in an HSA for 2027?

For 2027 the limit is $4,500 with self-only HDHP cover and $9,000 with family cover, and your employer's deposits count toward it. From age 55 you may add $1,000 a year.

HSA and HDHP figures from Revenue Procedures 2026-24 (2027) and 2025-19 (2026).
Figure 2026 2027
HSA limit, self-only cover $4,400 $4,500
HSA limit, family cover $8,750 $9,000
Extra from age 55 $1,000 $1,000
HDHP minimum deductible, self-only and family $1,700 and $3,400 $1,750 and $3,500
HDHP out-of-pocket maximum, self-only and family $8,500 and $17,000 $8,700 and $17,400

Three changes in the One Big Beautiful Bill Act widen who qualifies (IR-2025-119):

  • Telehealth before the deductible no longer breaks eligibility, for plan years from 2025.
  • Bronze and catastrophic plans count as HSA-compatible from 2026.
  • From 2026, certain direct primary care arrangements are allowed, and the HSA can pay their fees. For 2027 the fees must be no more than $150 a month ($300 for more than one person).

Moving from a health FSA to an HSA? A general-purpose FSA grace period running into 2027 blocks HSA contributions, unless your FSA balance at the end of the 2026 plan year is zero (Pub 969).

Is HSA money pre-tax for a nonresident alien?

Money taken from your pay through your employer's cafeteria plan is federally pre-tax for every employee, nonresident aliens included. Publication 15 (2026) says such contributions are not wages and are not subject to employment taxes or withholding.

An HSA in three stages. Put money in through a payroll cafeteria plan with no income tax or FICA, up to $4,500 self-only or $9,000 family for 2027. It grows untaxed federally (California taxes earnings), and comes out tax-free for medical costs; other uses cost income tax plus 20% before 65 unless you are disabled.Federal tax at each stage of a health savings account, with 2027 limits. Stage 1, put money in: through an employer cafeteria plan there is no federal income tax and no Social Security or Medicare tax (FICA); the 2027 limit is $4,500 for self-only cover or $9,000 for family cover; from age 55, $1,000 more. Stage 2, let it grow: earnings are not taxed federally while they stay in the account; California taxes them each year. Stage 3, take it out: qualified medical expenses are tax-free; other uses before age 65 cost income tax plus a 20% additional tax; other uses from age 65, or after disability, cost income tax only. Leaving the US: the account stays yours, but how the US taxes a non-medical payout after you leave is not settled.An HSA in three stagesFederal tax at each stage, 2027 limits1. Put money inPayroll (cafeteria plan): no income tax, no FICA2027 limit: $4,500 self-only, $9,000 familyAge 55 or older: $1,000 more2. Let it growEarnings are not taxed federally while heldCalifornia taxes earnings each year3. Take it outQualified medical expenses: tax-freeOther uses before 65: income tax plus 20%Other uses from 65, or if disabled: income tax onlyIf you leave the USThe account stays yours. How the US taxes anon-medical payout after you leave is not settled.An HSA in three stages. Put money in through a payroll cafeteria plan with no income tax or FICA, up to $4,500 self-only or $9,000 family for 2027. It grows untaxed federally (California taxes earnings), and comes out tax-free for medical costs; other uses cost income tax plus 20% before 65 unless you are disabled.Federal tax at each stage of a health savings account, with 2027 limits. Stage 1, put money in: through an employer cafeteria plan there is no federal income tax and no Social Security or Medicare tax (FICA); the 2027 limit is $4,500 for self-only cover or $9,000 for family cover; from age 55, $1,000 more. Stage 2, let it grow: earnings are not taxed federally while they stay in the account; California taxes them each year. Stage 3, take it out: qualified medical expenses are tax-free; other uses before age 65 cost income tax plus a 20% additional tax; other uses from age 65, or after disability, cost income tax only. Leaving the US: the account stays yours, but how the US taxes a non-medical payout after you leave is not settled.An HSA in three stagesFederal tax at each stage, 2027 limits1. Put money inPayroll (cafeteria plan):no income tax and no FICA2027: $4,500 self-only, $9,000 familyAge 55 or older: $1,000 more2. Let it growEarnings are not taxed federallywhile heldCalifornia taxes earnings each year3. Take it outQualified medical expenses:tax-freeOther uses before 65:income tax plus 20%Other uses from 65,or if disabled: income tax onlyIf you leave the USThe account stays yours. How theUS taxes a non-medical payoutafter you leave is not settled.
Cafeteria-plan money goes in tax-free and grows untaxed federally; medical payouts are tax-free.

Neither publication draws a line by visa, and the money never reaches W-2 box 1, so you claim nothing to get the saving. Some websites say a nonresident "cannot deduct" HSA contributions; that mixes up two routes.

Money you deposit yourself is the unsettled route. HSA money taken from pay outside a cafeteria plan is taxed as wages (Pub 15), so it needs the same deduction. The texts point two ways:

  • The 2025 Instructions for Form 1040-NR include the HSA deduction (Schedule 1 line 13), and Pub 969 says to report it on "Form 1040, 1040-SR, or 1040-NR."
  • Publication 519 (2025) says nonresident aliens "can generally claim only deductions related to income that is effectively connected" with a US business. Its list of deductions does not mention HSAs.

No IRS text we found says plainly whether a nonresident alien may take that deduction. The cafeteria-plan route has a clear answer; before a direct deposit, ask a tax preparer.

Worked example: Nam on STEM OPT and Ana on H-1B, $100,000 each in Texas, 2027

Nam, an illustrative F-1 graduate from Vietnam (its US tax treaty is signed but not in force), first came to the US on an F-1 visa in 2024. In 2027, their fourth calendar year, Nam is a nonresident alien and pays no FICA. Ana (also illustrative) is on H-1B and a resident alien all year. Each puts $4,500 into an HSA through their employer's cafeteria plan. 2027 brackets are not yet published, so this uses 2026 federal rates, where 22% runs from $50,400 to $105,700 (Revenue Procedure 2025-32).

Line Nam (OPT) Ana (H-1B)
Wages $100,000 $100,000
Standard deduction $0 $16,100
Taxable income before the HSA $100,000 $83,900
Top bracket 22% 22%
Income tax saved: $4,500 x 22% $990 $990
FICA saved: $4,500 x 7.65% $0 (none owed) $344
Total saved $990 $1,334

Had Ana deposited the $4,500 on their own, a deduction on their Form 1040 would save the $990 but not the $344. For Nam, that deduction is the unsettled point above.

The pre-tax benefits comparison sets an HSA beside the other pre-tax elections. For your own paycheck, the take-home calculator models an HSA too.

Any year money goes into or out of your HSA, you file Form 8889. The 2025 Form 8889 instructions require it if "You, your employer, or someone else made contributions to your HSA." Payroll contributions appear in W-2 box 12, code W.

Can a J-1 use an HSA?

A J-1 exchange visitor usually cannot pair the required insurance with an HSA. 22 CFR 62.14 caps a J-1's deductible at $500 per accident or illness, while a 2027 HDHP's must be at least $1,750 for self-only cover.

A separate J-1 policy held beside an HDHP would usually be other health coverage, which ends HSA eligibility. The rule also asks for $50,000 of medical evacuation and $25,000 of repatriation cover, which an employer plan may not include.

Do states tax HSA money?

California does not follow the federal HSA rules, and New Jersey does not follow the federal cafeteria-plan rule. Other states were not checked for this guide.

  • California's 2025 Schedule CA (540) instructions say "California law does not conform" to the HSA deduction. An employer's HSA contribution (W-2 box 12, code W) is added back, and "Interest or earnings in an HSA are taxable in the year earned." A non-medical payout taxed federally is "not taxable for California purposes."
  • New Jersey "does not adopt the federal income tax treatment of cafeteria plans" (TB-39(R)), so benefits bought by salary reduction are New Jersey wages. The bulletin does not name HSAs; check how your employer reports yours.

What happens to your HSA if you leave the US?

The account stays yours: Pub 969 says an HSA is "portable" and "stays with you if you change employers or leave the work force." You do not have to take money out each year.

Federal tax on an HSA payout, from Pub 969 (2025).
Use of the money Federal tax
Qualified medical expenses None
Anything else, before age 65 Income tax plus a 20% additional tax
Anything else, from age 65 or after disability Income tax only

Only expenses incurred after you open the HSA qualify. For drugs bought abroad, Publication 502 says a prescribed drug bought and used in another country counts only if it is legal there and in the US.

Watch out

Any HSA payout, even one spent on medical bills, means a US return for that year. The 2025 Form 1040-NR instructions list HSA distributions as a reason a nonresident alien must file. The Form 8889 instructions say to file Form 8889 with it "even if you have no taxable income."

How the US taxes a non-medical payout to someone who has left has no IRS text we found, whether on its rate, its source or a treaty. How your home country treats an HSA is outside this guide. Ask a tax preparer before you take money out for anything but medical care.

The last-month rule can cost you if you leave soon after joining. If you are eligible on December 1, you may fund the full year.

You must then stay eligible through December 31 of the next year. If you do not, for any reason but death or disability, the extra is added to your income with a 10% additional tax (Pub 969).

Worked example: the last-month rule after a July start

Illustrative: your self-only HDHP starts July 1, 2027, so you are eligible for 6 months. Without the last-month rule your 2027 limit is $4,500 x 6 / 12 = $2,250. You use the rule and put in $4,500, then leave the job and its HDHP in March 2028. The extra $4,500 minus $2,250 = $2,250 is added to your 2028 income, plus a 10% additional tax of $225.

After an H-1B layoff, HSA money may pay COBRA premiums (Pub 969). The H-1B leaving-the-US guide covers your final return, and the retirement accounts guide covers a 401(k) and IRA.

Can you still put money in for 2026?

You can add money for 2026 until Thursday, April 15, 2027, if you were eligible in 2026 (Pub 969). It goes in outside payroll, so it saves no FICA, and for a nonresident alien the deduction is the unsettled point above.

What to do next

  1. At open enrollment for 2027, check whether your plan is an HDHP: a deductible of at least $1,750 self-only or $3,500 family.
  2. Check for other coverage on the first of each month: a general-purpose health FSA, an overlapping student plan, or a J-1's required policy.
  3. If you choose an HDHP and an HSA, set the amount through your employer's cafeteria plan if it has one. The 2027 limit, $4,500 or $9,000, includes your employer's deposits. You can generally change it later for future paychecks.
  4. If you join partway through 2027 and may leave the US or the plan before December 31, 2028, weigh the last-month rule first.
  5. Keep your receipts and the forms your HSA provider sends (Form 5498-SA for money in, Form 1099-SA for money out). File Form 8889 for any year money goes in or out.
  6. Read the open enrollment checklist for OPT and H-1B and why Marketplace subsidies end for visa holders in 2027.

F1TaxReturn prepares Form 1040-NR and Form 8843 for nonresident alien students for free, once the IRS publishes the final 2026 forms; you print, sign and mail them. It does not prepare Form 8889, or the Form 1040 an H-1B resident files.

Questions students ask

Can I open an HSA on F-1 OPT?

Yes, if your health plan is a high-deductible health plan (HDHP) you have no other health coverage that is not allowed, you are not on Medicare and no one can claim you as a dependent. The tax law has no visa, citizenship or residency test for an HSA. Check the first-of-the-month rule if your university plan overlaps your new employer plan.

Can a nonresident alien deduct HSA contributions on Form 1040-NR?

Payroll contributions through a cafeteria plan need no deduction, because they never enter your taxable wages. For money you deposit yourself, the 2025 Form 1040-NR instructions include an HSA deduction line, but Publication 519 limits a nonresident's deductions to those connected with US business income and does not mention HSAs. That point is not settled, so ask a tax preparer before relying on it.

What happens to my HSA if I move back home?

The account stays yours. Money spent on qualified medical expenses stays tax-free under US rules, and money spent on anything else before age 65 is taxable plus a 20% additional tax. How the US taxes a non-medical payout to someone who has left is not settled, and any HSA payout means filing Form 8889 with Form 1040-NR for that year.

Can a J-1 have an HSA?

Rarely in practice. A J-1's required insurance may have a deductible of no more than $500, while a 2027 HDHP must have a deductible of at least $1,750 for self-only cover. A separate J-1 policy beside the HDHP would usually be other coverage that ends HSA eligibility.

Can my HSA pay for COBRA if I lose my H-1B job?

Yes. Publication 969 lists COBRA continuation coverage among the insurance premiums an HSA may pay. You cannot add new money for months without HDHP coverage. If you used the last-month rule and then lose HDHP coverage, the extra money is added to your income with a 10% additional tax.

Sources

This guide is checked against these 14 documents, most recently on .

  1. Revenue Procedure 2026-24 (2027 HSA and HDHP amounts), IRS
  2. Revenue Procedure 2025-19 (2026 HSA and HDHP amounts), IRS
  3. Publication 969 (2025), Health Savings Accounts and Other Tax-Favored Health Plans, IRS
  4. Instructions for Form 8889 (2025), Health Savings Accounts, IRS
  5. Publication 15 (2026), (Circular E), Employer's Tax Guide, IRS
  6. Publication 15-B (2026), Employer's Tax Guide to Fringe Benefits, IRS
  7. Instructions for Form 1040-NR (2025), IRS
  8. Publication 519 (2025), U.S. Tax Guide for Aliens, IRS
  9. Publication 502 (2025), Medical and Dental Expenses, IRS
  10. IR-2025-119, guidance on new tax benefits for health savings account participants, IRS
  11. Revenue Procedure 2025-32 (2026 tax rates and standard deduction), IRS
  12. 22 CFR 62.14, Insurance (exchange visitors), US Department of State (eCFR)
  13. 2025 Instructions for Schedule CA (540), California Franchise Tax Board
  14. TB-39(R), Cafeteria Plans, New Jersey Division of Taxation