US Substantial Presence Test calculator
Enter your U.S. presence days or exact entry and exit dates to verify the IRS 31-day and 183-day weighted rules without rounding errors — and see how many safe days remain this year.
FREE TO USE / NO ACCOUNTStarting 2027, your prior two years will carry forward 56.67 weighted days. Keep a 5–7 day buffer for flight delays.
01 / Guide
Exact IRS Publication 519 math without rounding errors
To meet the Substantial Presence Test (SPT) for a given tax year, a non-U.S. citizen must be physically present in the United States on at least 31 days during the current year AND accumulate at least 183 weighted days across a 3-year lookback: all days in the current year (×1), one-third of days in the first prior year (×1/3), and one-sixth of days in the second prior year (×1/6). Crucially, the IRS does not round fractional results — 182.33 weighted days does not trigger residency, whereas 183.33 does. This calculator performs exact rational arithmetic with denominator 6.
02 / Guide
How the 31-day floor, exempt visas, and Form 8840 work
Even if your prior two years carry heavy weight, spending 30 days or fewer in the United States during the current calendar year keeps you below the 31-day threshold. Additionally, days spent as an Exempt Individual — such as F, J, M, or Q students during their first 5 calendar years (when filing Form 8843) — are excluded from day counts. If you exceed 183 weighted days solely because of prior years while spending fewer than 183 physical days in the current year, you may still qualify for the Closer Connection Exception via IRS Form 8840.
03 / Guide
Planning ahead with the safe remaining days counter
Frequent travelers, Canadian snowbirds, and remote founders often accidentally cross 183 weighted days late in the year. Every partial calendar day in the U.S. (including arrival and departure days, except brief airport transits under 24 hours) counts as 1 full day. Use the safe remaining days counter and next-year rolling outlook above to maintain a 5-to-7 day buffer against unexpected flight cancellations.
FAQ
Frequently asked questions
Does the IRS round 1/3 and 1/6 day fractions up or down?
Neither. The IRS adds exact unrounded fractions. For example, 177 days this year plus 16 days last year (16 × 1/3 = 5.333...) equals 182.333 days, which is below 183 and does not meet the Substantial Presence Test.
Do my arrival and departure days both count as full days in the U.S.?
Yes. Being physically present in the United States for even one minute on a calendar date counts as a full day for SPT purposes, except for specific IRS exclusions such as international transit under 24 hours without leaving the airport or regular commuting from Canada or Mexico.
What is the Form 8840 Closer Connection Exception?
If you meet the 183-day weighted formula but were physically in the U.S. for fewer than 183 days in the current year, maintained a tax home in a foreign country, and had a closer connection to that country, filing Form 8840 on time can allow you to remain treated as a nonresident alien.