Substantial Presence Test Calculator
CalculatorWork out whether you meet the IRS substantial presence test and count as a US tax resident for the year, using the official 31-day and weighted 183-day rules.
Want to get an ITIN fast?
IRS-Certified Acceptance Agent to provide you with premium service to help you get ITIN quickly and securely.
Exempt individuals
- Foreign government-related individuals on A or G visas (except A-3 and G-5)
- Teachers or trainees present under a J or Q visa
- Students present under an F, J, M, or Q visa
- Professional athletes temporarily present to compete in a charitable sports event
Days that don't count as presence
- Commuting to work in the US from a residence in Canada or Mexico
- Days in the US for less than 24 hours while in transit between two other countries
- Days as a crew member of a foreign vessel engaged in transportation between the US and a foreign country
- Days you were unable to leave the US because of a medical condition that arose while you were present
Closer Connection Exception: Even if you meet the substantial presence test, you may still be treated as a nonresident if you were present fewer than 183 days in the current year, maintain a tax home in a foreign country, and have a closer connection to that country — claimed on Form 8840. Most people who meet the test must also file Form 8843.
This calculator implements the day-count arithmetic of the IRS substantial presence test. It is not tax advice, does not account for exempt-individual status, tax treaties, the closer connection exception, or first-year elections, and should not be relied on to determine your filing position. Consult a qualified tax professional. All input stays in your browser — nothing is transmitted.
About this tool
About Substantial Presence Test Calculator
The Substantial Presence Test is the day-counting rule the IRS uses to determine whether a foreign national is a US tax resident for a given year. You meet the test if you were present in the US at least 31 days during the current year, and at least 183 days across a weighted 3-year window: all of the current year's days, plus 1/3 of the days from the year before, plus 1/6 of the days from two years before. This calculator applies both prongs exactly as the IRS defines them.
The calculator computes the weighted 3-year total using exact sixths arithmetic (not rounded decimals) so the 183-day threshold is checked precisely, then evaluates the 31-day and 183-day prongs independently — both must pass for the test to be met. It also flags the common mistake of assuming a large weighted total is enough on its own: the 31-day requirement for the current year applies regardless of how many days you accumulated in prior years.
Use this before determining your US tax filing status for the year, when a visa holder, remote worker, or frequent traveler needs to know if they've crossed into US tax residency, or alongside the ITIN tools on this site when preparing a nonresident or dual-status return.
Instant, fully client-side calculation — no data ever leaves your browser. The tool surfaces the exempt-individual categories and excluded-day rules that are easy to miss, and points to the Closer Connection Exception (Form 8840) and Form 8843 for further reading, but does not itself determine your final residency status — that depends on facts this calculator cannot see.
Key Features
- Implements the official IRS 31-day and weighted 183-day tests
- Exact sixths arithmetic — no rounding drift on the 183-day threshold
- Flags the case where a high weighted total still fails the 31-day prong
- Lists exempt-individual categories and excluded days
- Points to the Closer Connection Exception and Form 8843
- 100% browser-based, no data ever transmitted
- Not tax advice — for day-count guidance only
FAQ
Substantial Presence Test Calculator — Frequently Asked Questions
What is the Substantial Presence Test?
It's the IRS day-counting rule used to determine if a non-US-citizen is treated as a US tax resident for a given year. You meet it if you were physically present in the US at least 31 days during the current year, and at least 183 days across a weighted formula: all of this year's days, plus 1/3 of last year's days, plus 1/6 of the days from two years ago.
Why did I fail the test even though my weighted total is over 183 days?
The test has two independent requirements, and both must be met. If you were present fewer than 31 days in the current year, you fail the test regardless of how large your weighted 3-year total is — prior years' presence cannot substitute for the current-year minimum.
Who is exempt from counting days toward this test?
Certain visa categories are treated as "exempt individuals" and their days generally don't count toward the test: most foreign government-related individuals (A or G visas, except A-3 and G-5), teachers and trainees on J or Q visas, students on F, J, M, or Q visas, and professional athletes temporarily in the US for a charitable sports event. Exempt status is usually time-limited and has its own rules.
What is the Closer Connection Exception?
Even if you meet the substantial presence test, you may still be able to be treated as a nonresident for the year if you were present fewer than 183 days in the current year, you maintained a tax home in a foreign country for the year, and you had a closer connection to that country than to the US. This is claimed on Form 8840 and has its own eligibility rules and deadlines.
Does meeting this test mean I owe more US tax?
Not necessarily — it changes how you file (as a resident rather than nonresident alien) and what worldwide income you report, but your actual tax liability depends on your income, deductions, and any applicable tax treaty. This calculator only answers the residency-status question, not the tax-owed question.
Tips
- Count physical presence days, not calendar days you were technically a resident of anywhere — being in the US any part of a day generally counts as a full day, with specific exceptions
- F, J, M, and Q visa holders should check whether they're still within their exempt-individual window before assuming this test applies to them
- If you're close to the 183-day threshold, small differences in day-counting (transit days, medical exceptions) can change the outcome — review the excluded-days list carefully
- This tool never transmits your data — the whole calculation runs in your browser
Explore more
Related Tools
Other tools that might be useful for your workflow