Rulebook  /  Calculators

US Substantial Presence Test Calculator

The Dwelltime engine · Free calculator · September 2026

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.

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

Get the app

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.

Know where you stand

Every limit tracked, every day counted, every uncounted day explained. Export ready when you need it. Private by design.

Get the app