7 minute guide

The US substantial presence test day-count formula explained

Understand the separate 31-day and weighted 183-day gates, the exact three-year arithmetic, and why the result cannot settle a person's final US tax position.

Last updated:

Two arithmetic gates, not one total

The IRS substantial presence test page describes two day-count conditions for a calendar year. The first asks whether there are at least 31 countable days in the current year. The second asks whether the weighted total for the current year and two immediately preceding years reaches 183 days. Both arithmetic gates must be considered; a large prior-year total cannot replace the 31 current-year days.

Roam Window reports these gates separately. That separation matters when, for example, a person records 30 current-year days and many days in both earlier years. The three-year arithmetic may exceed 183, while the current-year gate remains below 31. The output describes that formula state based on the entered countable days and makes no broader determination.

The three years carry different weights

For the selected current calendar year, each countable day contributes one full day. Each countable day in the first preceding year contributes one third, and each countable day in the second preceding year contributes one sixth. Publication 519 uses the IRS example of 120 days in each year: 120 plus 40 plus 20 equals 180, which is below the weighted gate.

The Treasury regulation at 26 CFR §301.7701(b)-1(c)(1) says fractional days produced by these calculations are not rounded to the nearest whole number. The estimator therefore stores the weighted value as exact sixths. A prior-year count that produces a third and a second-prior count that produces a sixth remain exact through the comparison with 183; no displayed decimal can push the total across the line.

Countable days come before weighting

The estimator asks for physical-presence days and excluded days for each year, then subtracts the excluded total before applying that year's weight. This is an arithmetic convenience, not an eligibility interview. The IRS lists distinct situations in which a day may not count, and some categories are connected to Form 8843 or other facts the calculator does not collect.

Only enter an excluded-day total after independently reviewing the relevant IRS material. Roam Window does not request visa class, medical facts, immigration steps, tax home, family contacts, or treaty facts. Those omissions are deliberate privacy and product boundaries: the tool can calculate from a countable input without pretending it has enough information to classify the day.

What the formula result leaves open

The IRS materials discuss other rules alongside the day count, including green-card status, closer connection, treaty positions, and procedural requirements for particular exclusions or claims. Those questions can change how a person's circumstances are treated even when the arithmetic itself is accurate. A formula result is therefore a useful worksheet answer, not a final conclusion about residency, filing, or liability.

Keep the source date with the scenario, retain the underlying travel record, and revisit official guidance when facts change. If an exclusion, Form 8843, Form 8840, a treaty, or immigration action may matter, use the linked IRS publications and seek qualified advice. The estimator's job ends after showing the two gates, the exact contributions, and the total generated from the supplied inputs.

  • Gate one: at least 31 countable current-year days.
  • Gate two: at least 183 exact weighted days across three years.
  • Every displayed fraction remains exact rather than being rounded upward.

Official sources

Sources were checked on . Linked institutions may update their guidance after that date.

← Back to Roam Window