The Substantial Presence Test: When You Flip from Non-Resident to US Tax Resident

The day you cross the Substantial Presence Test threshold, your entire tax filing changes — here is exactly when it happens and what to do next.

By F1Jobs Team · 2026-05-27 · 11 min read
A large wall calendar showing multiple years with certain months highlighted, beside a desk lamp casting warm light over a notepad with tally marks

You have been filing Form 1040-NR every April since you arrived in the US, claiming your treaty benefits, reporting only your US wages, and generally feeling like the IRS treats you as a guest. Then one year, usually the year your H-1B kicks in or the year after your F-1 exemption window closes, the math changes and you owe US taxes on money sitting in a bank account back home that you never touched.

This is not a surprise the IRS springs on you without warning — the rules are actually published and well-defined. But almost nobody explains them in plain terms until you are already sitting in front of a CPA with a confusing CP2000 notice. This guide walks through the Substantial Presence Test exactly as it works, how to calculate the day you flip from Non-Resident Alien to Resident Alien for tax purposes, what that means for your filing, and the dual-status year in between.

What the Substantial Presence Test actually measures

The IRS uses the Substantial Presence Test (SPT) to determine whether you are a "Resident Alien" for federal income tax purposes. This is a purely tax-law concept — it has nothing to do with your immigration status, your green card application, or USCIS. You can be on an F-1 visa and be a Resident Alien for tax purposes at the same time. The two systems are independent.

The formula is:

The weighting formula counts:

The formula in practice

YearDays PresentWeightWeighted Days
Current year (Year 3)180× 1180
Prior year (Year 2)150× 1/350
Two years back (Year 1)90× 1/615
Total weighted days245

In this example, 245 ≥ 183 and you were present at least 31 days this year, so you meet the Substantial Presence Test and you are a Resident Alien for federal tax purposes for the current year.

The F-1 exempt individual rule — why most students are sheltered for years

Here is the part that confuses most international students: the SPT has an exempt individual exception. When you are on an F-1, J-1 (student), M-1, or Q-1 visa, the days you are in the US simply do not count toward the day tally — you are an exempt individual for those days.

The F-1 exemption applies for 5 calendar years (not 5 school years — calendar years, counted from your first calendar year of F-1 presence in the US, including the arrival year itself).

What this means practically:

Important nuance for repeat visitors

The 5-year exemption is cumulative across your lifetime, not per visa. If you came to the US on F-1 for a master's, went home for two years, then came back for a PhD — your prior F-1 years count against your 5-year exemption. The IRS tracks this on Form 8843, which you should have been filing every year as a Non-Resident Alien.

Step-by-step: calculating when you flip

Follow this process to determine your residency start date for tax purposes.

  1. Count your F-1 exempt years. Look at your Form 8843 filings (or reconstruct from passport stamps). How many calendar years have you already used? If you are at 4 or fewer, you are likely still exempt.

  2. Identify the first year you are no longer exempt. This is the year you need to run the SPT math.

  3. Pull your travel records for that year and the two prior years. US Customs and Border Protection maintains entry/exit records accessible through the I-94 Travel History tool at cbp.dhs.gov. Count every day you were physically present in the US — partial days count as full days.

  4. Apply the weighted formula. Use the table structure shown above. If your total weighted days reach 183 and you were present at least 31 days in the current year, you pass the SPT.

  5. Determine your residency start date. If you meet the SPT, your residency start date is the first day you were present in the US in that calendar year (unless you qualify for the closer connection exception, discussed below).

  6. Determine your filing obligation. Did you arrive mid-year? You may have a dual-status year. Did you meet the SPT from January 1 onward? You are a full-year Resident Alien and file Form 1040.

What changes when you become a Resident Alien for tax purposes

This is where the stakes become real. The filing differences are significant.

As a Non-Resident Alien (NRA) — Form 1040-NR

As a Resident Alien — Form 1040

For most international students transitioning to H-1B, the practical impact is: foreign bank accounts back home now trigger reporting even if the balances are modest, and any interest earned on those accounts is taxable in the US.

Our detailed guide to FICA taxes and tax treaty benefits covers the treaty angle and how FICA applies once you flip to Resident Alien status.

The dual-status year — the most confusing tax filing you will do

The year you first meet the Substantial Presence Test is almost always a dual-status year unless you met the SPT from January 1. In a dual-status year:

How to file a dual-status return

There is no single form for a dual-status year. The IRS instructs you to:

  1. File Form 1040 as your primary return, covering the Resident Alien period
  2. Attach a statement (formatted like a 1040-NR) showing NRA-period income
  3. Write "Dual-Status Return" across the top of the 1040
  4. You cannot take the standard deduction for the full year on a dual-status return — only itemized deductions for the NRA period, and you may take the standard deduction only for the Resident Alien period if you itemize nothing

This is one area where professional help is genuinely worth the cost. Dual-status returns are error-prone and the IRS matches them closely. A CPA who specializes in international tax — look for ones with EA (Enrolled Agent) or CPA credentials and explicit international client experience — can prevent a CP2000 notice 18 months later.

The closer connection exception — a possible exit ramp

Even if you technically meet the SPT, you may be able to avoid Resident Alien status for the year by claiming the closer connection exception on Form 8840. You qualify if:

This exception is available even after the 5-year F-1 exemption expires. It is most commonly used by students and researchers who split their time roughly evenly between the US and home country. It does not help if you were in the US for 200+ days that year.

The H-1B transition year — the most common flip point

For most F-1 students reading this, the most likely scenario is: your H-1B starts on October 1, your F-1 exempt-individual years are used up, and you spend the rest of the year on H-1B.

Here is what typically happens in that year:

If your F-1 exempt years ran out before the H-1B start year, you may have met the SPT during your OPT period — in which case your residency start date was earlier in the year.

If your F-1 exempt years were still valid through September 30, you need to run the SPT math only from October 1 onward for the current year (H-1B days count fully), plus a weighted lookback on prior years (where your OPT days may or may not count depending on whether your exemption had expired).

See our guide on OPT vs STEM OPT vs CPT for details on how each affects your status clock and, by extension, your tax residency timeline.

FICA taxes — another thing that changes at the flip point

While you are an NRA on F-1 or OPT (including STEM OPT), you are generally exempt from FICA (Social Security and Medicare taxes) on wages. Once you become a Resident Alien for tax purposes, FICA applies to your wages at the standard rates — 6.2% Social Security (up to the wage base, approximately $176,100 in 2026) and 1.45% Medicare, matched by your employer.

This can reduce your take-home pay by roughly 7.65% starting the year you flip. Factor this into your salary negotiation if you know the flip is coming.

For more on FICA and what happens to those contributions if you leave the US, see our tax guide covering FICA and treaty benefits.

What to do if you do not have a Social Security Number yet

If you are just arriving on OPT and have not yet received your SSN, you may need to file using an Individual Taxpayer Identification Number (ITIN). The ITIN is for tax filing purposes only and does not authorize work or affect immigration status.

See our guide on applying for an ITIN as an international student without an SSN for the current process, which requires attaching your ITIN application (Form W-7) directly to your first tax return using that ITIN.

Common mistakes

Assuming OPT days never count. OPT is part of your F-1 status, so those days are exempt — but only for as long as your 5-year exempt window is open. Many students assume OPT days never count regardless of how long they have been here. After year 5, OPT days count just like any other presence days.

Forgetting to file Form 8843. Form 8843 is the document that formally claims your exempt-individual status each year. If you never filed it, the IRS may not recognize that your early F-1 years were exempt, and your SPT calculation could look different. File it retroactively if needed — there is no IRS penalty for late filing of Form 8843 itself (it is an informational form, not a tax return).

Not tracking foreign accounts after the flip. The FBAR threshold is $10,000 aggregate across all foreign accounts at any point during the year — not year-end balance. If your home-country account dipped above $10,000 for even one day, you have an FBAR obligation. Failure to file the FBAR can result in civil penalties that dwarf the account balance.

Using the wrong treaty article after flipping. Many students continue claiming treaty benefits on Form 1040 after becoming Resident Aliens without checking whether the treaty article they are relying on applies to residents. Most wage-exemption articles in US tax treaties apply only to NRAs or are limited to the first few years of residence. Read the specific treaty article or consult an international tax professional.

Forgetting the dual-status standard deduction restriction. In a dual-status year, you cannot take the standard deduction for the full year. Many tax software products will automatically apply the standard deduction without prompting you to check your residency status. If you are doing your own return in the year of the flip, verify this manually.

Conflating immigration residency and tax residency. Your I-94 expiration, your OPT authorization period, and your H-1B status are immigration concepts. Your tax residency is determined exclusively by the SPT (or the green card test). You can be in valid F-1 status and be a US tax resident. You can be a permanent resident (green card holder) and be a Non-Resident Alien if you spent most of the year abroad and qualify for closer connection. These are separate systems.

Frequently asked questions

When does an F-1 student become a US tax resident under the Substantial Presence Test?

An F-1 student is treated as an "exempt individual" by the IRS for up to 5 calendar years (including the year of arrival), which means the days you spend in the US on an F-1 visa do not count toward the Substantial Presence Test during that period. After that 5-year exemption window closes, your days start counting. You become a US tax resident in the first year you meet the 183-day formula — 31 days in the current year plus at least 183 weighted days across the current and prior two years (current year days count fully, prior year counts as one-third, two years back counts as one-sixth).

What is the difference between filing Form 1040-NR vs Form 1040 as an international student?

Non-Resident Aliens (NRAs) file Form 1040-NR, which taxes only US-source income — wages, US dividends, rental income from US property. Resident Aliens for tax purposes file Form 1040 (the same form US citizens use), which taxes worldwide income including foreign bank interest, foreign employer wages, and foreign investment gains. The 1040 also opens up more deductions (standard deduction, retirement account contributions) but adds reporting obligations like FBAR and FATCA for foreign accounts over the reporting thresholds.

What is a dual-status tax year and who experiences it?

A dual-status year is a calendar year in which you are a Non-Resident Alien for part of the year and a Resident Alien for part of the year. This typically happens in the year you first meet the Substantial Presence Test or in your final year in the US before departing permanently. During the NRA portion of the year you report only US-source income; during the resident portion you report worldwide income. Dual-status returns have specific rules — you cannot take the standard deduction for the entire year, and you must attach a statement showing income for each period.

Can F-1 students on OPT claim tax treaty benefits to reduce their tax bill?

Yes, if your home country has a tax treaty with the US that covers wages or scholarships, you can claim it on Form 1040-NR while you are still an NRA. Once you become a US Resident Alien for tax purposes, treaty benefits may no longer apply or may require filing Form 8833 (Treaty-Based Return Position Disclosure) to claim an exception. The treaty analysis changes at the residency flip point, so it is worth reviewing your treaty article carefully or consulting a tax professional in the year you cross the threshold.

Do days spent in the US on OPT count toward the Substantial Presence Test?

OPT is work authorization tied to your F-1 student status, so you are still considered an F-1 visa holder during OPT — including STEM OPT extensions. That means the 5-year F-1 exempt-individual rule still applies during OPT. Once you transition to H-1B status (typically October 1 of the H-1B start year), your days in the US begin counting toward the Substantial Presence Test immediately, and you will likely become a Resident Alien for tax purposes in that same calendar year.


The Substantial Presence Test is one of those rules that sits quietly in the background for years and then suddenly matters a lot. Knowing your exemption countdown, running the math in advance of the flip year, and understanding the dual-status filing requirements puts you in control of the transition instead of discovering it after the fact when the IRS sends a notice.

If you want a second set of eyes on your tax situation as part of your overall US career plan, F1Jobs works with international candidates navigating exactly these transitions every day.

Frequently asked questions

When does an F-1 student become a US tax resident under the Substantial Presence Test?

An F-1 student is treated as an "exempt individual" by the IRS for up to 5 calendar years (including the year of arrival), which means the days you spend in the US on an F-1 visa do not count toward the Substantial Presence Test during that period. After that 5-year exemption window closes, your days start counting. You become a US tax resident in the first year you meet the 183-day formula — 31 days in the current year plus at least 183 weighted days across the current and prior two years (current year days count fully, prior year counts as one-third, two years back counts as one-sixth).

What is the difference between filing Form 1040NR vs Form 1040 as an international student?

Non-Resident Aliens (NRAs) file Form 1040-NR, which taxes only US-source income — wages, US dividends, rental income from US property. Resident Aliens for tax purposes file Form 1040 (the same form US citizens use), which taxes worldwide income including foreign bank interest, foreign employer wages, and foreign investment gains. The 1040 also opens up more deductions (standard deduction, retirement account contributions) but adds reporting obligations like FBAR and FATCA for foreign accounts over the reporting thresholds.

What is a dual-status tax year and who experiences it?

A dual-status year is a calendar year in which you are a Non-Resident Alien for part of the year and a Resident Alien for part of the year. This typically happens in the year you first meet the Substantial Presence Test or in your final year in the US before departing permanently. During the NRA portion of the year you report only US-source income; during the resident portion you report worldwide income. Dual-status returns have specific rules — you cannot take the standard deduction for the entire year, and you must attach a statement showing income for each period.

Can F-1 students on OPT claim tax treaty benefits to reduce their tax bill?

Yes, if your home country has a tax treaty with the US that covers wages or scholarships, you can claim it on Form 1040-NR while you are still an NRA. Once you become a US Resident Alien for tax purposes, treaty benefits may no longer apply or may require filing Form 8833 (Treaty-Based Return Position Disclosure) to claim an exception. The treaty analysis changes at the residency flip point, so it is worth reviewing your treaty article carefully or consulting a tax professional in the year you cross the threshold.

Do days spent in the US on OPT count toward the Substantial Presence Test?

OPT is work authorization tied to your F-1 student status, so you are still considered an F-1 visa holder during OPT — including STEM OPT extensions. That means the 5-year F-1 exempt-individual rule still applies during OPT. Once you transition to H-1B status (typically October 1 of the H-1B start year), your days in the US begin counting toward the Substantial Presence Test immediately, and you will likely become a Resident Alien for tax purposes in that same calendar year.