Federal · SPT

F-1 to OPT to H-1B: Tax Residency Through the Transition

F1 OPT tax residency explained: the 5-year exempt window, when OPT days start counting toward the Substantial Presence Test, and the H-1B transition year.

10 min read

On F-1 and OPT you are usually an exempt individual for your first 5 calendar years in the US, so your days don't count toward the Substantial Presence Test (SPT) and you file as a nonresident. The transition matters the moment the exemption runs out, typically when you switch to H-1B, because that's when your US days start counting and you can become a resident alien taxed on worldwide income.

The whole F-1 → OPT → H-1B path is governed by two clocks: the 5-year student exemption and the 183-day SPT. Most surprises at tax time come from misreading where you sit on those two clocks. Here's the full picture.

The 5-year exempt-individual window

An F-1 student (and most J, M, and Q students) is an exempt individual for any 5 calendar years. "Exempt" doesn't mean exempt from tax, it means your physical days in the US are excluded from the SPT count. While exempt, you file as a nonresident alien (typically Form 1040-NR) and are taxed only on US-source income.

  • The 5 years are cumulative, not consecutive, any prior calendar years you held F/J/M/Q student status count, even partial years and years from a previous degree.
  • Each calendar year in which you were present for even one day as a student burns a full year of the allowance.
  • OPT and STEM OPT are still F-1 status, so OPT years draw from the same 5-year pool.
  • After the 5th calendar year, you stop being exempt and your days start counting under the SPT.

Count from your first year of student presence, not from when OPT or H-1B started. Someone who did a 4-year bachelor's then a 1-year master's has often already used all 5 exempt years before OPT even begins, meaning OPT days count toward residency immediately.

OPT and when your days start counting

OPT (and the STEM extension) is post-completion work authorization, but for residency purposes you are still in F-1 status. So the day-counting answer depends entirely on whether you are still inside your 5-year exempt window:

Situation on OPTExempt?Do US days count toward SPT?
Still within your first 5 calendar years as a studentYesNo, file as nonresident
Past the 5-year window (6th calendar year onward)NoYes, full SPT applies

If you're past year 5 while still on OPT, your days count under the normal weighted SPT formula: all current-year days, plus 1/3 of last year's, plus 1/6 of the year before. Cross 183 weighted days and you're a resident alien, which means FICA may start applying and you generally move from 1040-NR to a 1040.

Even while exempt, log every US day. The moment your exemption ends, your SPT clock starts at that year's day one, and a clean prior record makes the count clean. Tax Days can mark exempt years and switch counting on automatically.

H-1B: the trigger that ends exemption

H-1B is not a student status, so it does not extend the exempt window, and an H-1B holder is not an exempt individual at all. The day your status changes to H-1B (commonly October 1 in a cap-subject case), you begin counting US days toward the SPT for that calendar year. If you've already used your 5 student years, every day from January 1 of that year may already have been counting on OPT.

Because the switch usually happens mid-year, your first H-1B year is frequently a dual-status year: nonresident for the part of the year before residency starts, resident for the part after. Dual-status returns are fiddly, you can't take the standard deduction and can't file jointly in most cases, so many people look at the alternatives below.

First-year choice and the residency start date

If you don't meet the SPT in your H-1B switch year but will in the next year, the first-year choice lets you elect to be treated as a resident for part of the current year. To use it you generally must be present at least 31 consecutive days in the current year and at least 75% of the days from the start of that 31-day period through year-end, and you must meet the SPT in the following year. It's an election you attach to your return (often filed after meeting next year's SPT, sometimes with an extension).

Married filers have a second lever: if one spouse becomes a resident, the couple can sometimes elect to treat the nonresident spouse as a resident for the full year, enabling a joint return with the standard deduction, at the cost of reporting worldwide income. Run both scenarios; the right answer depends on your foreign income and credits.

  • Dual-status, default when you become resident mid-year; no standard deduction, limited joint filing.
  • First-year choice, opt into partial-year residency to set an earlier start date when it helps.
  • Full-year resident election (married), treat both spouses as residents all year; report worldwide income but unlock joint rates and the standard deduction.

Grace periods and status gaps

F-1 includes a 60-day grace period after OPT ends and H-1B has a 60-day grace period after employment ends, but these are immigration grace periods, they govern how long you may lawfully remain, not how the IRS counts days. For tax purposes, days physically present in the US are days present, grace period or not. Don't assume a grace period pauses your SPT clock.

One more wrinkle: if your H-1B is denied or you change back to F-1, you may re-enter exempt status, but only if you have unused years in the 5-year pool. The pool doesn't refill.

What changes when you become a resident

Becoming a resident alien is a bigger shift than a different form number. As a nonresident on F-1/OPT you're generally exempt from Social Security and Medicare (FICA) on authorized employment and taxed only on US income. As a resident you're taxed on worldwide income, FICA generally applies, and you may have foreign-account reporting obligations (FBAR/FATCA) if you hold accounts abroad.

If you straddle a treaty country, a treaty tie-breaker or student/trainee treaty article may still reduce US tax in transition years, worth checking before you file. To keep the day math honest across the whole journey, the SPT calculator and Tax Days both handle exempt years and the year you flip to resident.

FAQ

Frequently asked questions

Do F-1 OPT students pay taxes?

Yes. On OPT you generally file as a nonresident and pay US tax on US-source income, but you're usually exempt from Social Security and Medicare (FICA) on authorized work. You still typically file Form 8843 and, if you had income, Form 1040-NR.

When do my days start counting toward the Substantial Presence Test on F-1?

After your 5-year exempt window ends. The 5 calendar years are cumulative across all your student time, so if you've already used them, your days count immediately even while you're still on OPT. See the substantial presence test calculator at taxdaysresidencytracker.com/tools/substantial-presence-test-calculator.

Does switching to H-1B reset the 5-year exempt period?

No. H-1B is not a student status and never qualifies as exempt, and it doesn't refill or extend your 5-year student allowance. The day you move to H-1B you begin counting US days toward the SPT (if you weren't already).

What is a dual-status alien in the H-1B switch year?

Someone who is a nonresident for the part of the year before residency begins and a resident for the rest. Dual-status filers generally can't take the standard deduction or file jointly, which is why some elect the first-year choice or a full-year resident election instead.

Does the 60-day grace period stop my SPT day count?

No. Grace periods are immigration concepts. For tax purposes, any day you're physically present in the US counts the same way whether or not you're inside a grace period.

Can I use the first-year choice if I switch to H-1B late in the year?

Often yes. If you don't meet the SPT this year but will next year, and you meet the 31-day and 75%-presence tests, you can elect partial-year residency to set an earlier start date. It's an election attached to your return.

Sources & further reading

Every rule on this page is drawn from primary sources. Verify the current law before making a residency decision.

  1. [1]Substantial Presence TestIRS
  2. [2]Exempt Individual, Who Is a Student or Teacher/TraineeIRS
  3. [3]Form 8843, Statement for Exempt IndividualsIRS
  4. [4]First-Year ChoiceIRS
  5. [5]Taxation of Dual-Status IndividualsIRS
  6. [6]Publication 519, U.S. Tax Guide for AliensIRS