Skip to content

Substantial Presence Test Calculator

By Quinn Moran, iReside co-founder. Rules last checked against official sources on .

The short answer

You meet the IRS Substantial Presence Test, and are a US tax resident for the year, if you were in the US at least 31 days this year and at least 183 days over three years, counting all of this year's days, 1/3 of last year's and 1/6 of the year before's. Any part of a day in the US counts. Enter your days below to see your weighted total and how many more days you can spend this year.

Runs entirely in your browser. 100% private.

This calculator is for informational purposes only, not legal or tax advice. US tax residency rules are complex. Consult a qualified tax professional for advice specific to your situation.

Days physically present in the United States

Weight: 100%= 0 days
Weight: × ⅓= 0 days
Weight: × ⅙= 0 days
Does Not Meet TestThreshold: ≥ 183 weighted days
0 / 183

You do not appear to meet the Substantial Presence Test for 2026.

You are 183 weighted days below the 183-day threshold.

Safe zone for 2026: Based on your prior-year days, you can spend up to 182 days in the US in 2026 without meeting the SPT.

Your inputs are saved in this browser tab. To save permanently or share, click Share below.

This calculator is for informational purposes only and does not constitute tax, legal, or financial advice. Tax residency rules are complex and vary by jurisdiction. Consult a qualified tax professional for advice specific to your situation.

iReside counts this automatically every day

Your Substantial Presence total changes every day you are in the US. iReside logs whether you are in the US or abroad from your phone's location, keeps the weighted three-year total live, and alerts you before you reach 183.

Download free on the App Store$44.99/year after free trial. Cancel anytime.
iReside Dashboard for 2026, Day 296 of 365. Days by Location: United States 296 days, split into New York City 158 days, Florida 131 days and Massachusetts 7 days. My Trackers: Florida, 131 days, and New York City, 25 left of its 183-day limit.

In the iReside app

Your US days, already logged

Days in each US state and city this year, counted from your phone's location, so the days you would add up by hand are already on record.

How the Substantial Presence Test works

The test is set by 26 U.S.C. § 7701(b)(3) and explained by the IRS in two conditions. You must be physically present in the US on at least:

31 days during the current year, and 183 days during the 3-year period that includes the current year and the 2 years immediately before that, counting: All the days you were present in the current year, and 1/3 of the days you were present in the first year before the current year, and 1/6 of the days you were present in the second year before the current year.
Source: IRS: Substantial Presence Test

The 31-day floor stops prior-year days from making you resident in a year you barely visited. The weighting means a regular visitor can spend about four months a year in the US indefinitely, but not much more.

If you meet the test you are a resident alien for the year: generally taxed on worldwide income and filing Form 1040 rather than 1040-NR. If you hold a green card you are resident under the separate green card test whatever your days.

Days that do not count

The IRS lists four kinds of day you leave out of the count:

  • Days you commute to work in the US from a residence in Canada or Mexico.
  • Days you are in the US for less than 24 hours, in transit between two places outside the US.
  • Days you are in the US as a crew member of a foreign vessel.
  • Days you cannot leave because of a medical condition that developed while you were in the US.

Days as an exempt individual are also left out: foreign government-related individuals on A or G visas (not A-3 or G-5), teachers and trainees on J or Q visas (not if you were exempt as a teacher, trainee or student for any part of 2 of the 6 preceding calendar years, with a narrow exception when a foreign employer pays all your compensation), students on F, J, M or Q visas (exempt status is lost after more than 5 calendar years, unless you show you do not intend to live in the US permanently), and professional athletes temporarily in the US for a charitable sports event. You claim exempt days and medical days on Form 8843.

The closer connection exception (Form 8840)

Meeting the test is not always the end. If you were in the US fewer than 183 days this year, you can still be treated as a nonresident if you:

  • kept a tax home in one foreign country for the whole year,
  • had a closer connection to that country than to the US, and
  • did not apply for, or have pending, lawful permanent resident status.
If you do not timely file Form 8840, Closer Connection Exception Statement for Aliens, you cannot claim the closer connection exception to the substantial presence test.
Source: IRS: Closer Connection Exception

This is the route most Canadian and European snowbirds rely on. It only works while your actual days this year stay under 183, so the count still matters.

Worked examples

SituationCalculationResult
120 days in each of 2024, 2025 and 2026120 + 120/3 + 120/6 = 120 + 40 + 20 = 180Does not meet the test (under 183)
122 days in each of 2024, 2025 and 2026122 + 40.67 + 20.33 = 183Meets the test
150 days in 2026, 90 in 2025, 60 in 2024150 + 30 + 10 = 190Meets the test, but under 183 actual days in 2026, so Form 8840 may keep you nonresident
25 days in 2026, 300 in 2025Fails the 31-day floor for 2026Does not meet the test for 2026

How days are counted

For the Substantial Presence Test you are present on any day you are in the US at any time during the day. A morning arrival, a day trip across the border from Canada for shopping or a late-night departure all count as a full day. Other rules count very differently, which is why the same trip can be one day for the IRS and zero days somewhere else:

RuleWhat counts as a day
US Substantial Presence TestAny part of a day in the US counts as a full day. (IRS, Substantial Presence Test)
US state 183-day rules (most states)Varies by state. New York counts any part of a day; Pennsylvania counts a day as outside the state only if it is a full day, midnight to midnight; Ohio counts contact periods; many states publish no partial-day rule. (Each state's statute (see the state guide))
FEIE physical presence testOnly full 24-hour days abroad, midnight to midnight, count. (IRS, Physical Presence Test)
UK Statutory Residence TestA day counts if you are in the UK at midnight, subject to the transit exception and the deeming rule. (HMRC, RFIG20710)
Schengen 90/180The day you enter and the day you leave both count as days of stay. (Schengen Borders Code, Art. 6(1) and 6(2))

Guides and tools for US tax residency

Frequently asked questions

What is the Substantial Presence Test?
It is the IRS day-count test that decides whether a non-citizen without a green card is a US resident for federal income tax. You meet it if you were in the US at least 31 days this year and at least 183 days over three years, counting all of this year's days, one third of last year's and one sixth of the year before's.
How is the Substantial Presence Test calculated?
Add your US days this year, plus one third of your US days last year, plus one sixth of your US days the year before. If that weighted total is 183 or more and this year's days are at least 31, you meet the test. Exempt days are left out before you add anything up.
Do arrival and departure days count?
Yes. The IRS treats you as present in the US on any day you are physically in the country at any time during the day, so the day you land and the day you fly out are both full days. The exceptions are narrow: commuting from Canada or Mexico, transit of less than 24 hours between two foreign places, foreign vessel crew, and a medical condition that arose in the US.
Is 120 days a year in the US safe?
Only just. 120 days every year gives 120 + 40 + 20 = 180, three days under the line. At 122 days a year the total reaches 183 and you meet the test, so one extra long weekend each year is enough to tip it.
Who is an exempt individual?
People whose days do not count while they hold the status: foreign government-related individuals on A or G visas (not A-3 or G-5), teachers and trainees on J or Q visas, students on F, J, M or Q visas, and professional athletes competing in a charitable sports event. Students are limited to 5 calendar years. Exempt individuals file Form 8843.
What is Form 8840 and the closer connection exception?
If you meet the test but were in the US fewer than 183 days this year, kept a tax home in one foreign country all year and had a closer connection to that country than to the US, you can stay a nonresident by filing Form 8840. If you do not file it on time you generally lose the exception. It is not available if you applied for a green card.
Does the Substantial Presence Test apply to green card holders?
No. A green card holder is a US tax resident under the separate green card test for any year they hold lawful permanent resident status, whatever their day count. The Substantial Presence Test is for everyone else who is not a US citizen.
Can a tax treaty override the test?
Sometimes. If you are a resident of both the US and a treaty country, the treaty's tie-breaker rules (permanent home, centre of vital interests, habitual abode, nationality) may treat you as a resident of the other country only. Claiming it has its own filing requirements, so take advice from an international tax professional.
Is there an app that tracks the Substantial Presence Test?
Yes. iReside counts your US days automatically from your phone's location and keeps the weighted three-year total live, with an alert before you reach 183. It is a record of where you were, not tax advice.

Official sources

Track your days automatically

Stop counting manually. iReside uses GPS to log your state every day in the background. Get alerts before you hit thresholds. Generate audit-ready reports with one click.

Download free on the App Store

$44.99/year after free trial. Cancel anytime.