The Substantial Presence Test is the day-count formula the IRS uses to decide whether a foreign national is a U.S. tax resident for the year. You meet it if you were physically present in the United States for at least 31 days during the current calendar year and your weighted total of days across the current year and the two preceding years reaches 183.1Office of the Law Revision Counsel. 26 USC 7701 – Definitions2Internal Revenue Service. Taxation of Nonresident Aliens3Internal Revenue Service. NRA Withholding
Holding a green card at any point in the year makes you a resident alien automatically under a separate rule, so the day-count test only matters if you are not a lawful permanent resident.4eCFR. 26 CFR 301.7701(b)-1 – Resident Alien
Running the Math
Two hurdles have to clear before the test applies. You need at least 31 days of physical presence in the current calendar year. If you hit that, you calculate a weighted total across three years.1Office of the Law Revision Counsel. 26 USC 7701 – Definitions
Days in the current year count at full value. Days in the year immediately before count at one-third. Days in the year before that count at one-sixth. Add the three figures. If the total is 183 or higher, you meet the test.
An example shows how tight the margins can get. Say you spent 120 days in the United States each year for three consecutive years. Your weighted total is 120 + (120 × 1/3) + (120 × 1/6) = 120 + 40 + 20 = 180. That is three days short, so you are not a resident alien for the current year. Add three more days in the current year and you tip over the threshold. A handful of days can change your entire tax picture, so accurate travel records matter.
Which Days Count
Any part of a day physically in the United States counts as a full day. A flight landing at 11:55 p.m. puts the whole date on your count. Several categories, though, drop out of the calculation entirely:5Internal Revenue Service. Substantial Presence Test
- Layover hours under 24 while transiting between two points outside the U.S.
- Days you regularly commute to work in the U.S. from a home in Canada or Mexico.
- Days spent in the U.S. as a crew member of a foreign vessel.
- Days you could not leave because of a medical condition that arose after you arrived (you must file Form 8843 to claim this).
- Days when you qualify as an “exempt individual” under the rules below.
The IRS can cross-check what you claim against passport stamps and CBP entry and exit records, so keep supporting documentation for any day you exclude.
People Whose Days Don’t Count at All
Four categories of “exempt individuals” skip the day count for a limited period. Being exempt for day-count purposes does not mean you owe no U.S. tax on income earned here; it only keeps those days from pushing you into resident alien status.1Office of the Law Revision Counsel. 26 USC 7701 – Definitions
Foreign government personnel. Diplomats, full-time employees of international organizations, and immediate family members of either group exclude their days without a built-in time limit.
Teachers and trainees on J or Q visas (non-student). Days are excluded unless you were already treated as exempt for any two of the six preceding calendar years. If all your compensation qualifies as exempt under the tax code’s provisions for foreign teachers, the lookback stretches to four out of six years.
Students on F, J, M, or Q visas. Days are excluded for up to five calendar years total. The count runs by calendar year, not by actual days present, so a student who arrived in 2021 is exempt through 2025 and starts counting days in 2026. Any prior years spent exempt as a teacher or trainee count against this five-year limit.6Internal Revenue Service. Tax Residency Status Examples
Professional athletes at qualifying charity events. Days spent competing are excluded only if the event benefits a tax-exempt charity, all net proceeds go to that charity, and substantially all the work is done by volunteers.7GovInfo. 26 USC 7701 – Definitions
Form 8843 Protects the Exclusion
Exempt individuals (other than foreign government personnel on A or G visas) and anyone excluding days for a medical condition must file Form 8843.8Internal Revenue Service. Form 8843, Statement for Exempt Individuals and Individuals With a Medical Condition If you file a tax return, attach it. If you have no return filing requirement, mail Form 8843 separately by June 15 of the year after the tax year. Missing the deadline can cost you the athlete or medical-condition exclusion outright, which could push you over 183 days. The only way back in is clear and convincing evidence that you made a genuine effort to learn the rule and take significant steps to comply.
You Meet the Test but Might Still Be Nonresident
Two escape hatches exist for people whose weighted total hits 183.
The Closer Connection Exception
You can still be treated as a nonresident if you satisfy all four of these conditions during the year:9Internal Revenue Service. Closer Connection Exception to the Substantial Presence Test
- Fewer than 183 actual days of presence in the current year (real days, not the weighted total).
- A tax home maintained in a foreign country for the entire year. Your tax home is where your main place of business or employment sits, or if you have no regular business location, where you regularly live.
- A closer connection to that foreign country than to the U.S. The IRS weighs where your permanent home is, where your family lives, where you keep personal belongings, where you bank, vote, and hold a driver’s license. No single factor decides it.
- No application filed or pending for lawful permanent resident status. Forms like I-485, I-130, and I-140 disqualify you, whether filed during the year or still pending from earlier.
You claim the exception on Form 8840. Attach it to your return, or mail it by the return due date if you have no return to file. Miss the deadline and you generally lose the exception for that year and can be treated as a resident for all of it.10Internal Revenue Service. Form 8840, Closer Connection Exception Statement for Aliens
Treaty Tie-Breakers
If you can’t use the Closer Connection Exception, a U.S. income tax treaty with your home country may still resolve the conflict in your favor. Many treaties contain tie-breaker provisions that assign residency based on where your permanent home is, your center of vital interests, your habitual abode, and your nationality. Using a tie-breaker to claim nonresident status means filing Form 1040-NR and attaching Form 8833, Treaty-Based Return Position Disclosure. Skipping Form 8833 carries a $1,000 penalty for each failure. Not every country has a treaty with the United States, so this option depends on where you’re from.11Internal Revenue Service. Form 8833, Treaty-Based Return Position Disclosure
When Your Residency Actually Starts
If you satisfy the test for a given year, your residency starting date is generally the first day you were physically present in the U.S. that year.12Internal Revenue Service. Residency Starting and Ending Dates Days before that fall under nonresident rules; days from that point forward are resident days. That split creates a dual-status year, in which the resident portion is taxed on worldwide income and the nonresident portion is taxed only on U.S.-source income and income effectively connected with a U.S. trade or business.13Internal Revenue Service. Publication 519, U.S. Tax Guide for Aliens
Dual-status filers face real restrictions: no standard deduction, no head-of-household filing, and no joint return with a spouse unless both of you elect to be treated as U.S. residents for the entire year. That full-year election puts both spouses’ worldwide income on the U.S. return, so run the numbers both ways before choosing.14Internal Revenue Service. Taxation of Dual-Status Individuals
What Resident Alien Status Actually Costs
Being a resident alien changes more than your tax rate. Your worldwide income becomes reportable, and two foreign-asset disclosure regimes typically kick in.
The FBAR (FinCEN Form 114) is required if your foreign financial accounts, combined, exceed $10,000 at any point during the year. The threshold is aggregate: three accounts of $4,000 each trip it. FBARs are filed electronically through the BSA E-Filing System, not with your tax return.15Internal Revenue Service. Report of Foreign Bank and Financial Accounts (FBAR)
Form 8938, filed with your tax return, covers a broader range of specified foreign financial assets, including foreign stock, securities, and interests in foreign entities. For resident aliens living in the U.S., the filing thresholds are $50,000 on the last day of the year or $75,000 at any point during the year for unmarried filers and those married filing separately, and $100,000 or $150,000 for married couples filing jointly.16Internal Revenue Service. Do I Need to File Form 8938, Statement of Specified Foreign Financial Assets? Many resident aliens end up filing both forms because they cover different assets under different thresholds.
The penalties for skipping these filings are steep and actively enforced. Non-willful FBAR failures carry a statutory base penalty of $10,000 per violation, adjusted for inflation, capped across all open years at 50 percent of the highest aggregate account balance.17Internal Revenue Service. Report of Foreign Bank and Financial Accounts (FBAR) Willful violations can reach the greater of $100,000 or 50 percent of the balance, with potential criminal exposure on top. Form 8938 failures start at $10,000 and grow by $10,000 for every 30 days after a 90-day IRS notice, up to an additional $50,000.18eCFR. 26 CFR 1.6038D-8 – Penalties for Failure to Disclose
If your day count is anywhere close to 183 on the weighted formula, work the numbers carefully, keep your travel records, and look at whether the Closer Connection Exception or a treaty tie-breaker fits your situation before assuming resident status is unavoidable.