Cifrely. ← All guides
ENES
US · IRS · 2026

The US Substantial Presence Test, explained

If you're not a US citizen or green-card holder but you spend real time in the US, one IRS day-count can quietly turn you into a US tax resident — taxed on your worldwide income. Here's exactly how it works, and how to know where you stand.

The test, in one formula

You're a US tax resident under the Substantial Presence Test if you were physically present in the US for at least 31 days this year AND 183 days over three years, counting:

YearHow much counts
This yearall days (×1)
Last year1/3 of days
Two years ago1/6 of days

Add those up. If the weighted total is 183 or more (and you were here 31+ days this year), you meet the test. Any part of a day in the US — including arrival and departure days — counts as a full day.

Quick example: 120 days a year, three years running, is 120 + 40 + 20 = 180 — just under the line. Bump this year to 130 and you're at 195 — a resident. The margins are thin, which is why counting carefully matters.

The days that don't count

Some days are excluded: a regular commuter from Mexico or Canada, days in transit under 24 hours between two foreign points, days as a crew member of a foreign vessel, days you couldn't leave for a medical condition that arose in the US — and days as an exempt individual.

Exempt individuals: students and teachers

If you're on certain visas, your days don't count at all while you're exempt: students (F, J, M, Q) generally for their first 5 calendar years; teachers and trainees (J, Q) generally if they weren't exempt for 2 of the last 6 years; and foreign-government-related people (A, G). The catch: you must file Form 8843 every year to claim it — and once the exemption period runs out, your days start counting.

Meeting the test — and the two escape hatches

Meet the test and you're a US resident alien: your worldwide income is US-taxable, reported like a citizen's. But two things can still change the outcome:

Closer-connection exception (Form 8840): even if you meet the test, you can be treated as a nonresident if you were in the US fewer than 183 days this year, kept a tax home abroad all year, and have a closer connection to that country. Note this uses a different 183 — your current-year days, not the weighted total.
Tax-treaty tie-breaker: if you're a resident of both the US and a treaty country (like Mexico), the treaty's tie-breaker rules can assign your residence to the other country. This is fact-heavy and usually filed on Form 8833 — get a professional.

Where a calculator stops

A day count tells you whether you cross the threshold — the essential first question. What it can't decide for you: your exact residency start and end dates, whether you truly qualify as an exempt individual, and how a treaty applies. Those turn on facts and documents. Use the count to know if you're anywhere near the line, then take it to a cross-border tax advisor if you are.

Check your US tax residency now Free calculator: enter your days for three years and see your weighted total, whether you meet the test, and if the closer-connection exception might apply.

Frequently asked questions

Does any part of a day count?

Yes — if you were in the US at any moment on a day, it's a full day, including arrival and departure.

I'm an F-1 student. Do my days count?

Not for your first 5 calendar years as an exempt individual — but you must file Form 8843 each year.

Does meeting the test mean I owe tax?

It means you're taxed like a resident on worldwide income for your resident period — unless the closer-connection exception or a treaty changes it. Get advice if you're close.

Sources

Based on the IRS Substantial Presence Test rules, Publication 519, and Forms 8843 and 8840.

Verified as of July 19, 2026 — IRS Substantial Presence Test, Pub. 519, Forms 8843/8840 · Educational, not tax advice.

Sources: IRS — Substantial Presence Test · IRS — Closer Connection Exception · IRS — Publication 519