Tool · Runs entirely in your browser · Updated August 2026

Substantial presence test calculator.

Enter your US days for three years. See the weighted math worked out step by step — the 31-day minimum and the 183-day total, shown separately. On a student or teacher visa? The calculator zeroes out your exempt years too. Nothing you type leaves this page or is saved.

Not sure of the numbers? Rebuild your day counts from your photos with the Flags app.

Exempt individual? · Students, teachers, and trainees
Worked breakdown · Fractions shown, not silently rounded
Current year (2026)
0 × 1 = 0
Prior year (2025)
0 × 1/3 = 0
Year before (2024)
0 × 1/6 = 0
Weighted total
0 of 183

Convention: the one-third and one-sixth weights are kept as fractions (shown to two decimals) and added before comparing with 183 — intermediate values are not rounded to whole days.

31-day current-year minimumNot met · 0 of 31
183 weighted-day thresholdNot met · 0 of 183
On these numbers the test is generally not met
Subject to IRS exceptions. This tells you whether the arithmetic crosses the line — it does not decide whether you are a US tax resident.

Nothing you type leaves this page or is saved. The calculation runs entirely in your browser, and a result link keeps your numbers after the # — a part of the URL the browser never sends to any server. Share it only with people you want to see them.

Before you rely on a number · Exceptions that change the result

The arithmetic is only half the test. The calculator models the common exempt individual cases (students, teachers, and trainees) and flags when the closer connection exception is worth checking, but diplomats, medical conditions, commuter and transit days, and tax treaties can all change the outcome. Confirm what counts and which exceptions apply against the IRS substantial presence test page and Publication 519.

This is a tool, not tax advice; confirm with a qualified adviser.

Want the reasoning behind the formula? Read the explainer on what the substantial presence test is and how the weighting works, the guide to Form 8843 for exempt individuals, or start from the tax-residency tracker overview.

To keep the private, dated day record this calculation depends on — rebuilt from your photo dates, on device — install Flags: Tax Residency Tracker for iPhone.

Download on the App Store
Common questions · About the substantial presence test

How do I calculate the substantial presence test?

Add every US day in the current year, plus one third of the prior year's days, plus one sixth of the days from the year before that. If that weighted total reaches 183 and you were present at least 31 days in the current year, the test is generally met — subject to IRS exceptions.

What counts as a US day?

A US day generally means any day you were physically present in the United States, but the IRS excludes certain days — for example some days for exempt individuals. Whether a day is counted at all can matter as much as the arithmetic, so check the current IRS guidance.

Do F-1 student days count toward the substantial presence test?

Generally not during your first 5 calendar years in the US: as a student on an F, J, M, or Q visa you're an exempt individual, and exempt days don't count. Any part of a calendar year counts as a whole year, and the 5-year limit is a lifetime total. You still report those years on Form 8843. Select the student option in the calculator to see the effect on your numbers.

What is the closer connection exception?

It can let you avoid US residency even if you meet the day count, when you were in the US fewer than 183 days in the current year and can show a tax home and closer ties to another country. Claim it on Form 8840; see the IRS substantial presence test page and Publication 519 for the conditions. The calculator flags when your numbers make it worth checking.

Does this store my data?

No. The calculator runs entirely in your browser. Nothing you type leaves this page or is saved. A result link keeps your numbers in the part of the URL after the #, which the browser never sends to a server.