US Substantial Presence Test Calculator
Check whether your US days meet the IRS 183-day weighted test across three years, whether you pass the 31-day gate, and whether the closer-connection exception is still open to you. The weighting is done in exact arithmetic — no rounding that puts you on the wrong side of the line.
How this calculator counts
From IRS Publication 519, you are a US resident for tax purposes in a year if both gates pass: you were present in the US at least 31 days during that year, and your weighted total reaches 183 — every day of the current year, ⅓ of each day in the prior year, and ⅙ of each day in the year before that.
- Any part of a day counts — arriving at 11 pm is a full day.
- Weighted total — the fractions are kept exact: 122 days a year for three years is 122 + 40.67 + 20.33 = 183.0, which meets the test by a fraction.
- Days until 183 — how many more current-year days you can be present before the weighted total crosses the line.
Days that do not count
Publication 519 excludes certain days of presence: regular commuters from Canada or Mexico, transit under 24 hours between two foreign points, crew of a foreign vessel, days you could not leave because of a medical condition that arose in the US, and days as an exempt individual (certain teachers, trainees and students on F, J, M or Q visas). This page counts every day you enter; the Dwelltime app lets you mark each excluded period with its reason so the audit trail shows why a day was dropped.
Frequently asked questions
I met the test — am I definitely a resident?
Not necessarily. If you were present fewer than 183 days in the current year and can show a tax home in and closer connection to another country, Form 8840 may let you remain a non-resident. The result above tells you whether that door is still open. Tax treaties can also change the answer. This is a counting tool, not tax advice.
Which years do I enter?
The tax year you are testing and the two calendar years before it. Days outside those three years have no effect.
Do Puerto Rico, Guam or the USVI count?
No. Presence in US territories is not US presence for this test; only the 50 states and DC count.
Where does the rule come from?
IRS Publication 519, "U.S. Tax Guide for Aliens", and IRC §7701(b)(3). The result links to the IRS page for the test.
This rule is tracked in
Dwelltime
- Counts your days for this rule from the trips you record
- Shows the last safe day, or the days still needed, before you book
- Explains every counted day and every uncounted one
- Runs alongside your other visa, tax and residency rules
Sources
For information only. This calculator is a planning aid based on publicly available rules, not tax, legal or immigration advice. Always confirm with the official sources linked above and a qualified professional before acting.