US Substantial Presence Test calculator
Find out whether you meet the IRS Substantial Presence Test: at least 31 days in the US this year and 183 weighted days across this year (×1), last year (×⅓) and the year before (×⅙). Enter day counts, or your actual stays and let Raven count.
Results
Updates as you type. Nothing is sent to a server.
Not legal or tax advice. This calculator is an informational tool based on published rules as we understand them on 2026-09-25. Rules change and your facts matter; confirm your position with a qualified adviser or the authority before relying on it.
How the rule works
Under Internal Revenue Code §7701(b), a non-citizen who is not a lawful permanent resident is treated as a US resident for a calendar year if they meet the Substantial Presence Test:
- present in the United States on at least 31 days during the current year, and
- present on at least 183 days during the three-year period counting all days in the current year, one third of the days in the first preceding year and one sixth of the days in the second preceding year.
Any part of a day counts, so arrival and departure days are both days of presence. Days as an exempt individual, commuter days, transit days under 24 hours, crew days and medical-condition days are excluded (IRS Publication 519). Meeting the test can still be overridden by the closer-connection exception or a treaty tie-breaker, which this calculator does not evaluate.
Worked example
Chloé is a French consultant who has spent 120 days in the US in each of 2024, 2025 and 2026 so far. Testing 2026: 120 × 1 + 120 × ⅓ + 120 × ⅙ = 120 + 40 + 20 = 180 weighted days. She passes the 31-day minimum but is below 183, so the test is not met. The calculator shows she can spend only 2 more days in the US in 2026; on the 123rd day the total reaches 183 and she becomes a US tax resident for 2026 unless the closer-connection exception applies. Press "Load worked example".
Frequently asked questions
How is the Substantial Presence Test calculated?
You meet the test for a calendar year if you were physically present in the United States on at least 31 days during that year and on at least 183 "weighted" days over three years: all the days in the current year, one third of the days in the previous year, and one sixth of the days in the year before that.
Does a partial day count?
Yes. You are treated as present on any day you are physically in the US at any time, including arrival and departure days. Exceptions: days in transit between two foreign points for under 24 hours, regular commuters from Canada or Mexico, crew members, days you could not leave because of a medical condition that arose in the US, and days as an "exempt individual" (students on F, J, M or Q visas, teachers and trainees on J or Q visas, foreign-government-related individuals on A or G visas, certain athletes).
What happens if I meet the test?
You are a US resident for tax purposes for that year and generally taxed on worldwide income, unless you qualify for the closer connection exception (fewer than 183 actual days in the current year, a tax home in a foreign country and a closer connection to it, claimed on Form 8840) or a treaty tie-breaker (Form 8833).
Why does the calculator keep fractions like ⅓?
The IRS formula produces fractions (for example 120 + 40 + 20 = 180 with 120 days in each of three years). Rounding early can move you across the line, so the calculator keeps the exact value in sixths and only displays it as a fraction.
How many more days can I spend in the US this year?
The results show the number of additional days you can be present this year before the test is met, given your prior-year counts. If the prior years alone contribute more than 152 weighted days, only the 31-day minimum protects you.