Tax year 2026Checked

401(k) on OPT or H-1B: how it works for international workers in 2026

Who can join, the 2026 limit, how traditional and Roth deferrals show on your W-2 and Form 1040-NR, when the match is yours, and what happens if you leave the US.

$24,500 of your 2026 pay can go into a 401(k), traditional and Roth together, if you are under 50 (less in a SIMPLE 401(k))

In short

  1. For 2026 you can defer up to $24,500 into a 401(k), traditional and Roth together, less in a SIMPLE 401(k) (IRS Notice 2025-67); the federal limits on a plan's entry rules concern age and service, not visas.
  2. Traditional deferrals are left out of W-2 box 1, which feeds Form 1040-NR line 1a: deferring $4,800 of $80,000 OPT pay saves an estimated $1,056 in 2026.
  3. Deferrals stay in W-2 boxes 3 and 5, so H-1B workers pay Social Security and Medicare tax on them (7.65% on pay up to $184,500); F-1 students on OPT who are nonresident aliens pay none.
  4. Your own deferrals are always 100% vested; a match may vest as slowly as 100% after 3 years of service, or in steps to 100% after 6.
  5. A traditional 401(k) paid to you as a nonresident after you leave is still taxed by the US (Publication 519): the contributions part at graduated rates, the earnings generally at 30%, unless a treaty changes that.
Contents, 10 sections

F-1 students on OPT or STEM OPT and H-1B workers can join an employer's 401(k) in 2026 once they meet the plan's own rules. No federal limit on those rules names a visa. Pay you put into a traditional 401(k) (a "deferral"), up to $24,500, lowers the wages taxed on Form 1040-NR just as on Form 1040.

This guide explains the rules, not which option to pick. For the rest of your return, see how to file US taxes as an international student.

Can I contribute to a 401(k) on OPT or H-1B?

You can join once you meet the eligibility rules in your plan document, such as an age, a period of service and an entry date. The federal limits on those rules do not mention visas.

Before you may defer, a plan can require at most age 21 and one year of service (IRC 401(k)(2)(D)). It must then let you in within six months (IRC 410(a)). The IRS 401(k) plan overview adds that a plan can enroll you automatically at "a fixed percentage or amount" unless you choose otherwise.

Your visa changes the tax instead. OPT pay is free of Social Security and Medicare tax while you are a nonresident alien, usually your first five calendar years as a student (IRS). H-1B pay generally is not, for residents and nonresidents alike.

Key facts

2026 limit on your own deferrals (traditional and Roth together)
$24,500 ($23,500 in 2025), generally $17,000 in a SIMPLE 401(k); a plan may allow $8,000 more from age 50, or $11,250 if you turn 60 to 63
Longest a plan can make you wait to defer
Age 21 and 1 year of service, then at most 6 more months (IRC 401(k)(2)(D) and 410(a))
Traditional deferral on your W-2
Left out of box 1; box 12 code D
Roth deferral on your W-2
Included in box 1; box 12 code AA
Social Security and Medicare tax on deferrals
Generally owed on H-1B pay (boxes 3 and 5); none on OPT pay while you are a nonresident alien
Slowest vesting the law allows for a match
100% after 3 years of service, or 20% after 2 years rising to 100% after 6
For
F-1 students on OPT or STEM OPT and H-1B workers who are offered a 401(k) by a US employer in 2026.
Not for
Anyone looking for investment advice or for a pick between Roth and traditional; IRAs, which have their own rules; and how your home country taxes a 401(k).

How much can I put into a 401(k) in 2026?

You can defer $24,500 of 2026 pay, up from $23,500 in 2025, counting traditional and Roth deferrals together (IRS Notice 2025-67). From age 50 a plan may allow a catch-up of $8,000 more, or $11,250 if you turn 60 to 63 in 2026.

The limit is per person, not per plan: if you change jobs in 2026, both employers' deferrals share one $24,500 (Publication 525 (2025)). If you go over, tell the plan by the date it sets. If the plan permits, it pays the excess back with its earnings by April 15 of the next year; the excess is taxed for the year you deferred it.

A SIMPLE 401(k) has a lower limit, generally $17,000. Your employer's match does not count toward your limit: it is not an elective deferral (W-2 instructions).

How does a traditional 401(k) lower my tax on Form 1040-NR?

A traditional deferral is left out of box 1 of your Form W-2, and Form 1040-NR line 1a starts from the box 1 total. You generally pay federal income tax on it only when the plan pays it out.

The 2026 W-2 instructions tell employers to leave traditional 401(k) deferrals out of box 1 and report them in box 12, code D. A Roth deferral stays in box 1 and goes in box 12 with code AA. The 2026 draft Form 1040-NR labels line 1a "Total amount from Form(s) W-2, box 1".

Both kinds stay in boxes 3 and 5, the Social Security and Medicare wages, so on H-1B you pay 7.65% on the deferred pay too (on pay up to $184,500). On OPT, as a nonresident alien, those boxes should show no wages; if your pay stub shows those taxes, read how to get FICA back. A change from OPT to H-1B generally starts these taxes (F-1 to H-1B).

The match is not taxed when it goes in either, unless it is a Roth match (Publication 525).

States may differ: Pennsylvania's Personal Income Tax Guide tells employers to add 401(k) contributions back to box 1 wages to figure Pennsylvania wages.

Texas does not tax wages, by the Tax Foundation's count (OPT in states with no wage tax); other states: state income tax for international students.

What does a 6% deferral save on $80,000 of OPT pay?

For a nonresident on OPT, deferring 6% of $80,000 ($4,800) to a traditional 401(k) saves an estimated $1,056 of 2026 federal income tax. That is 22% of $4,800, because each deferred dollar comes off the 22% bracket.

Worked example: Tomi, on OPT in Texas for all of 2026

Tomi, an illustrative F-1 graduate, first came to the US in 2023, so 2026 is their fourth calendar year as a student. They are a nonresident alien for all of 2026, and no tax treaty applies. They earn $80,000 from a Texas employer, defer 6% ($4,800), and the plan matches 4% of pay ($3,200).

Tomi's 2026 Form W-2 in each case.
W-2 box Traditional Roth No 401(k)
1wages, tips, other compensation $75,200 $80,000 $80,000
3Social Security wages (exempt) none none none
5Medicare wages (exempt) none none none
12code and amount D $4,800 AA $4,800 none
Tomi's 2026 Form 1040-NR (2026 draft line numbers).
Line Traditional Roth No 401(k)
1awages from W-2 box 1 $75,200 $80,000 $80,000
15taxable income (no deductions) $75,200 $80,000 $80,000
16tax by the rate schedule $11,256 $12,312 $12,312

Traditional: $80,000 minus $4,800 = $75,200, and the tax is $5,800 plus 22% of ($75,200 minus $50,400), or $5,800 plus $5,456 = $11,256.

Roth or no 401(k): $5,800 plus 22% of ($80,000 minus $50,400), or $5,800 plus $6,512 = $12,312. The saving is $12,312 minus $11,256 = $1,056.

After tax and the deferral, Tomi keeps $63,944 with traditional ($80,000 minus $11,256 minus $4,800), $62,888 with Roth and $67,688 with no 401(k). The $3,200 match appears in neither box 1 nor box 12.

The tax uses the 2026 rate schedule (Revenue Procedure 2025-32); the IRS Tax Table can differ by a few dollars.

On H-1B, as a resident alien for all of 2026, the saving is the same $1,056. Without the deferral, $80,000 minus the $16,100 standard deduction = $63,900, taxed $8,770; with it, $75,200 minus $16,100 = $59,100, taxed $7,714.

Our calculator's estimates for tax year 2026: wages only, single, a full year in Texas, no treaty, $4,800 deferred; OPT after a 2023 arrival, H-1B as a resident.
$80,000 in Texas No 401(k) Traditional Roth
OPT, nonresident: federal income tax $12,312 $11,256 $12,312
H-1B, resident: federal income tax $8,770 $7,714 $8,770
H-1B: Social Security and Medicare (7.65%) $6,120 $6,120 $6,120
H-1B: pay after tax and the deferral $65,110 $61,366 $60,310

Roth or traditional 401(k) if I might leave the US?

A traditional 401(k) saves tax now and is taxed when paid out, even after you leave the US. A Roth 401(k) is taxed now, and a qualified payout later is not; which costs less depends on your rate now, your rate later and where you will live.

Bars for $100 of pay at a 22% federal rate. No 401(k): $78 to you, $22 tax. Traditional: $100 in, no tax now, take-home down $78; Roth: $100 in, $22 tax from other pay, take-home down $100.Three bars for $100 of pay, from the worked example of an F-1 graduate on OPT in Texas in 2026, a nonresident alien taxed at 22% on the last dollars of pay. No 401(k): $78 reaches you and $22 goes to federal tax; nothing goes into the 401(k). Traditional 401(k): all $100 goes into the 401(k) with no tax now, and it is taxed when it is paid out; take-home pay falls by $78. Roth 401(k): $100 goes into the 401(k) and $22 of tax is still due now, paid from your other pay; a qualified payout later is not taxed in the US; take-home pay falls by $100.$100 of pay at a 22% federal tax rateTomi's example: OPT, nonresident alien, Texas, 2026No 401(k)$78 to you$22 taxNothing goes into the 401(k)Traditional 401(k)$100 into your 401(k)No tax now; taxed when it is paid outTake-home pay falls by $78Roth 401(k)$100 into your 401(k)$22 tax$22 tax now, paid from your other payA qualified payout is not taxed in the USTake-home pay falls by $100Bars for $100 of pay at a 22% federal rate. No 401(k): $78 to you, $22 tax. Traditional: $100 in, no tax now, take-home down $78; Roth: $100 in, $22 tax from other pay, take-home down $100.Three bars for $100 of pay, from the worked example of an F-1 graduate on OPT in Texas in 2026, a nonresident alien taxed at 22% on the last dollars of pay. No 401(k): $78 reaches you and $22 goes to federal tax; nothing goes into the 401(k). Traditional 401(k): all $100 goes into the 401(k) with no tax now, and it is taxed when it is paid out; take-home pay falls by $78. Roth 401(k): $100 goes into the 401(k) and $22 of tax is still due now, paid from your other pay; a qualified payout later is not taxed in the US; take-home pay falls by $100.$100 of pay at a 22% tax rateTomi: OPT, nonresident, Texas, 2026No 401(k)$78 to you$22$22 goes to federal taxNothing goes into the 401(k)Traditional 401(k)$100 into your 401(k)No tax now; taxed when paid outTake-home pay falls by $78Roth 401(k)$100 into your 401(k)$22$22 tax now, from your other payA qualified payout later isnot taxed in the USTake-home pay falls by $100
Each $100 deferred costs Tomi $78 of take-home pay as traditional and $100 as Roth.

A Roth payout is generally qualified after a 5-taxable-year period starting with the year of your first Roth deferral to the plan. It must also come on or after age 59½, or after death or disability. The IRS Roth FAQs say a qualified distribution is not included in gross income; before that, the earnings part is taxed.

A traditional 401(k) paid to you as a nonresident alien is still US income. Publication 519 (2025) taxes the part from contributions for US work as effectively connected income, at graduated rates. That holds "whether or not you are engaged in a U.S. trade or business" in the year of the payout.

The earnings part is US-source income when the plan's trust is a US trust (Publication 515 (2026)). Publication 519 treats only the contributions part as effectively connected; income that is not effectively connected is taxed at a flat 30% or a lower treaty rate.

A tax treaty can change this, and the country you move to may tax the payment too: ask an adviser there.

What to weigh; it does not pick one.
Factor What to compare
Your tax rate now What a traditional deferral saves today (22% for Tomi)
Your rate when it is paid out As a nonresident: graduated rates on contributions (usually no standard deduction) and generally 30% on earnings, unless a treaty lowers it
Where you will live Whether a treaty applies, and how that country taxes the payout
When you take it out Until a Roth payout is qualified, its earnings are taxed

If your plan offers both, the Roth FAQs say you may split deferrals "in any proportion you choose." A Roth choice cannot be changed back to traditional.

When is my employer's match mine?

Your own deferrals are always 100% yours; the match becomes yours as it vests under your plan's schedule. The slowest schedule the law allows reaches 100% after 3 years of service, or rises in steps to 100% after 6.

The slowest vesting a 401(k) match may have under IRC section 411(a)(2)(B). Your plan may vest faster.
Years of service 3-year cliff 6-year graded
1 0% 0%
2 0% 20%
3 100% 40%
4 100% 60%
5 100% 80%
6 100% 100%

A year of service is "generally 1,000 hours worked over 12 months", says the IRS vesting page, and an unvested match may be forfeited when you leave. A safe harbor 401(k) must vest its required employer contributions when made (IRS overview). One with automatic enrollment may instead take up to 2 years of service (IRC 401(k)(13)).

Under a 3-year cliff, if Tomi left after 2 years, they would keep their deferrals but could lose all of the match ($3,200 a year).

What happens to my 401(k) if I change jobs or leave the US?

When you leave an employer, you can leave the money in the plan, roll it over or take it as cash, as your plan allows. Generally, only the cash is taxed now.

Three choices when you leave a job.
Choice US tax now
Leave it in the plan None until it is paid out (a qualified Roth payout is not taxed)
Roll it over directly to another plan or an IRA Generally none until you withdraw it; nothing is withheld (IRS rollovers page)
Take it as cash Taxable, except qualified Roth payouts and amounts already taxed; tax withheld; an additional 10% tax before age 59½, unless an exception applies

Paid to you as a resident alien, a payout has 20% withheld, even if you mean to roll it over. To roll over the full amount within 60 days, you replace the withheld tax from other money.

For a nonresident alien, the rules for foreign persons generally take precedence (Publication 515). Publication 519 says a US pension payment is then generally withheld at 30% or a lower treaty rate. The part from US work can be withheld at graduated rates instead if you give the payer Form W-8BEN or Form 8233 first.

Ask your plan whether it can pay you at a foreign address, and see the tax checklist for leaving the US.

What to do next

  1. Read your plan's Summary Plan Description, or ask HR: when you can join, whether it offers Roth, the match and the vesting schedule.
  2. After you enroll, check your next pay stub for the deferral and, on OPT as a nonresident alien, no Social Security or Medicare tax.
  3. Try your own numbers in the 2026 take-home calculator, which models traditional and Roth 401(k) amounts.
  4. File with your W-2 as printed. Your employer must send it by Monday, February 1, 2027. A Form 1040-NR with taxable wages, or a Form 1040, is due Thursday, April 15, 2027.
  5. For a nonresident alien on F-1 OPT, F1TaxReturn prepares Form 1040-NR and Form 8843 for free from that W-2 once the IRS publishes the final 2026 forms and instructions; you print, sign and mail them. A resident alien on H-1B files Form 1040, which F1TaxReturn does not prepare.
  6. Before you take money out or move abroad, ask a tax preparer, and an adviser in the country you move to.

Questions students ask

Can I contribute to a 401(k) on F-1 OPT?

Yes, once you meet your plan's eligibility rules. The federal limits on those rules are about age and service: a plan cannot ask for more than age 21 and one year of service before you may defer, and must then let you in within six months. A traditional deferral lowers your W-2 box 1, and so your Form 1040-NR wages, as it does for any employee.

What is the 401(k) contribution limit for 2026?

$24,500 of your own deferrals, traditional and Roth together, under IRS Notice 2025-67 (generally $17,000 in a SIMPLE 401(k)). From age 50 a plan may allow a catch-up of $8,000 more, or $11,250 if you turn 60 to 63 in 2026. The limit is per person, so deferrals at two employers in the same year share it. Your employer's match does not count toward it.

Do 401(k) contributions lower Social Security and Medicare tax?

No. Traditional and Roth deferrals both stay in W-2 boxes 3 and 5, so an H-1B worker generally pays 7.65% on them (on pay up to $184,500). An F-1 student on OPT who is a nonresident alien pays no Social Security or Medicare tax on their OPT pay.

Roth or traditional 401(k) if I might move back to India?

We cannot choose for you, and this guide does not cover how India taxes a US 401(k). A traditional deferral saves US tax now, and the US still taxes later payouts to a nonresident unless a treaty changes that. A Roth deferral is taxed now, and a qualified payout after age 59½ and 5 taxable years is not included in US gross income. Ask an adviser in India how India treats each.

What happens to my 401(k) if I leave the US?

You can leave it in the plan, roll it over or take it as cash, within your plan's rules. Cash is taxed, except qualified Roth payouts and amounts already taxed; before age 59½ the taxable part also owes an additional 10% tax unless an exception applies, and tax is withheld. Ask your plan whether it can pay you at a foreign address.

Sources

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

  1. Notice 2025-67, 2026 amounts relating to retirement plans and IRAs, IRS
  2. 401(k) plan overview, IRS
  3. Retirement topics: Catch-up contributions, IRS
  4. Retirement topics: Vesting, IRS
  5. Retirement plans FAQs on designated Roth accounts, IRS
  6. Rollovers of retirement plan and IRA distributions, IRS
  7. Retirement topics: Exceptions to tax on early distributions, IRS
  8. General Instructions for Forms W-2 and W-3 (2026), IRS
  9. Form 1040-NR (2026 draft), U.S. Nonresident Alien Income Tax Return, IRS
  10. Publication 525 (2025), Taxable and Nontaxable Income, IRS
  11. Publication 519 (2025), U.S. Tax Guide for Aliens, IRS
  12. Publication 515 (2026), Withholding of Tax on Nonresident Aliens and Foreign Entities, IRS
  13. Revenue Procedure 2025-32 (2026 tax rates and standard deduction), IRS
  14. Foreign student liability for Social Security and Medicare taxes, IRS
  15. 26 U.S. Code 410, Minimum participation standards, Legal Information Institute, Cornell Law School
  16. 26 U.S. Code 401, Qualified plans (subsections (k)(2)(D) and (k)(13)(D)), Legal Information Institute, Cornell Law School
  17. 26 U.S. Code 411, Minimum vesting standards (subsection (a)(2)(B)), Legal Information Institute, Cornell Law School
  18. PA Personal Income Tax Guide: Income Subject to Tax Withholding (DSM-12, 12-2023), Pennsylvania Department of Revenue