🟢 Live
days
Must be at least 31 days to pass Enter 0–366 days
days
Counted at 1/3 weight (÷3) Enter 0–366 days
days
Counted at 1/6 weight (÷6) Enter 0–366 days
Exempt days are excluded from the count
Result

How the Substantial Presence Test Works

The IRS uses the Substantial Presence Test to determine whether a foreign national is a US resident alien for tax purposes. Passing the test means you are taxed on your worldwide income just like a US citizen — it does not affect your immigration status.

The test has two requirements that must both be met: you must have been present in the US for at least 31 days in the current calendar year, and your weighted day count across three years must reach 183 or more.

The IRS Weighted Day Formula
Weighted Days = (Days Year 0 × 1) + (Days Year −1 × 1/3) + (Days Year −2 × 1/6)
Example: 120 days this year + 90 days one year ago + 60 days two years ago = 120 + 30 + 10 = 160 weighted days → FAILS (below 183). Change current year to 160 → 160 + 30 + 10 = 200 → PASSES.
💡 Pro tip: Even if you pass the test, you may be able to avoid US resident alien status by filing Form 8840 (Closer Connection Exception) before the tax deadline. Consult a tax professional if you are close to the threshold.
Popular Calculators
Related Calculators
Frequently Asked Questions
The Substantial Presence Test is an IRS formula to determine if a non-US citizen qualifies as a US resident alien for tax purposes. You pass if you were present in the US for at least 31 days in the current year AND your weighted 3-year total is at least 183 days.
The IRS uses a weighted formula: current year days count as 1 each, one-year-ago days count as 1/3, and two-years-ago days count as 1/6. Sum all three — if it reaches 183 and you had 31+ days this year, you pass.
Exempt days include time spent as a diplomat, student on F/J/M/Q visa, teacher/trainee on J/Q visa, professional athlete competing in a charity event, and days you could not leave due to a medical condition.
Even if you pass the test, you can file Form 8840 to claim a closer connection to a foreign country if you maintained a tax home abroad and had stronger personal/economic ties there. Not available if you have applied for a green card.
If you pass the test, file Form 1040 and report worldwide income. If you fail, file Form 1040-NR if you have US-source income. Consult a tax professional if you are borderline or have treaty considerations.
Exempt days not counted toward SPT: (1) F, J, M, Q visa students (up to 5 years); J/Q teachers/trainees (up to 2 years); foreign government officials; (2) Days unable to leave due to a medical condition arising in the US; (3) Days commuting from Canada or Mexico for work. File Form 8843 annually to claim exempt status — failure to file can trigger tax residency.