A walkthrough of the three-year weighted formula

The 183-day lookback is not a simple three-year total. Current-year days count in full; earlier years are reduced to 1/3 and 1/6.

The formula

For a review year, the IRS counts all counted U.S. days in that year, plus 1/3 of counted U.S. days in the prior year, plus 1/6 of counted U.S. days in the year before that. The weighted total must be at least 183, and you must also have at least 31 counted U.S. days in the current year. The official wording is on the Substantial Presence Test page and in Publication 519 (2025).

The official IRS example

Publication 519 (2025) and the IRS substantial presence page use this example. You were physically present in the United States on 120 days in each of the years 2025, 2024, and 2023. To determine if you meet the substantial presence test for 2025, count:

2025: 120 days, counted in full = 120
2024: 1/3 of 120 = 40
2023: 1/6 of 120 = 20
Weighted total = 120 + 40 + 20 = 180

Because 180 is less than 183, you are not considered a resident under the substantial presence test for 2025. The current-year 31-day test would be met (120 is at least 31), but both parts are required. This calculator reproduces that example exactly.

How this tool treats fractions

Not every year divides evenly. If a prior year had 121 counted U.S. days, 1/3 is 40 1/3, not 40. Publication 519 and the IRS substantial presence page do not state a rounding rule for these fractions. This tool keeps exact fractions and treats the 183-day test as met only if the exact total is at least 183. A total of 182 5/6 is not treated as 183.

Another example consistent with the same rules: 182 counted U.S. days in 2025 and 3 counted U.S. days in 2024, with none in 2023, is 182 + 1 + 0 = 183. The current-year 31-day test is met, the weighted test is met, and current-year days are still fewer than 183, so the Form 8840 day-count gate is treated as open. That still does not decide tax home or closer connection. See Form 8840.

If a lookback year has no U.S. days, that year’s contribution is zero. That pattern is common in a first year of U.S. travel; see first-year arrival.

Open the calculator

Enter your travel calendar once. All day-count math runs in your browser.