Home › Finance › Substantial Presence Test Calculator
✦ Finance Calculator
Substantial Presence Test
Use this IRS Substantial Presence Test calculator to determine whether you are a US resident alien for tax purposes. Enter days present in the US over the current and prior two years to get an instant pass/fail result.
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.
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.