KinLedger Tools › US Substantial Presence Test Calculator
US Substantial Presence Test Calculator – free online
Enter your stays in the United States and see your days for the year and the two years before it, with the 1, 1/3 and 1/6 weighting and the 183-day test.
Everything is worked out in your browser. Nothing you type is sent anywhere or saved.
Count your days
Your stays in the United States
One row per stay, covering the year to test and the two years before it. The arrival day and the departure day both count. Leave the departure date blank if you are still there. Tick the box only for days you have checked against the IRS rules for days that are not counted. Dates are year-month-day, and the date is shown below each box in the form 15 Oct 2026.
Worked example
This example uses the same day counts as the IRS's own example: 120 days in the US in each of three years. Here the years are 2024, 2025 and 2026, and the year tested is 2026.
| Year | Stay | Days | Counted as |
|---|---|---|---|
| 2026 | 1 Jan to 30 Apr 2026 | 120 | 120 (all days) |
| 2025 | 1 Jan to 30 Apr 2025 | 120 | 40 (one-third) |
| 2024 | 1 Jan to 29 Apr 2024 | 120 | 20 (one-sixth) |
| Weighted total | 180 | ||
- Test 1: 120 days in 2026 is at least 31. Met.
- Test 2: 180 is below 183. Not met. The substantial presence test is not met on these numbers.
- Three more days in 2026 (123 days) would give 123 + 40 + 20 = 183, and both tests would be met.
Press "Load the example" above to see the calculator give the same numbers.
How it works
The rule, from the IRS
- You meet the substantial presence test for a year if you were physically present in the U.S. on at least 31 days during that year, and on at least 183 days during the 3-year period made of that year and the 2 years before it.
- For the 183-day count, all the days of the current year count, one-third of the days of the first year before count, and one-sixth of the days of the second year before count.
- A day counts if you are physically in the U.S. at any time during that day.
- Some days are not counted (for example days as an exempt individual, a medical condition, commuting from Canada or Mexico, short transit stops and some crew days), and a closer connection exception can apply.
Sources: IRS, Substantial presence test (the page shows a last review date of 14 Mar 2026) and Publication 519, U.S. Tax Guide for Aliens (the 2025 edition, for 2025 returns). Date checked: 26 October 2026.
How this calculator applies the rule
- It counts each calendar day once, even if two rows overlap. Days are grouped by calendar year.
- The weighted total is calculated in sixths, so there are no rounding errors: a total of exactly 183 passes, and a total just under 183, such as 182.83, does not.
- "Days needed" is the smallest number of days in the year tested that meets both tests, keeping the earlier two years as entered.
- A stay with no departure date is counted up to the date you choose in "Count stays with no departure date until".
What this calculator does not do
- Exceptions are not computed. It does not decide whether you are an exempt individual, whether a medical condition applies, whether you qualify as a commuter, or whether the closer connection exception applies. It also does not cover other choices and treaty rules in Publication 519. If an exception applies to some of your days, check the IRS pages and use the tick box for those days only.
- It does not prepare Forms 8843 or 8840 or any tax return.
Frequently asked questions
What is the substantial presence test?
It is an IRS test that decides whether a person who is not a U.S. citizen is a resident for tax purposes in a given year. You meet the test if you were physically present in the United States on at least 31 days during the current year and on at least 183 days during the 3-year period that includes the current year and the 2 years before it, counting all the days in the current year, one-third of the days in the first year before, and one-sixth of the days in the second year before.
What counts as a day in the United States?
You count as present on any day you are physically in the United States at any time during that day. That means the day you arrive and the day you leave both count, even if you are there only for part of the day.
Which days do not count?
The IRS says these days are not counted: days you commute to work in the U.S. from a home in Canada or Mexico (Publication 519 says this applies if you commute on more than 75% of your workdays), days of less than 24 hours spent in the U.S. in transit between two places outside the U.S., days as a regular crew member of a foreign vessel (with a condition in Publication 519), days you intended to leave but could not because of a medical condition that arose while you were in the U.S., and days as an exempt individual.
Who is an exempt individual?
On the IRS page, "exempt individual" is a defined term, and it does not mean someone who is exempt from U.S. tax. It covers certain foreign government-related individuals (A or G visas, with some exclusions), teachers and trainees (J or Q visas), students (F, J, M or Q visas) who substantially comply with their visa requirements, and professional athletes competing in a charitable sports event. Form 8843 must be filed to exclude days as an exempt individual or because of a medical condition; if it is not filed on time, the IRS says you cannot exclude those days unless you show by clear and convincing evidence that you took reasonable actions to learn the filing requirements and significant steps to comply.
Can I meet the test and still be treated as a nonresident?
Yes, if you qualify for the closer connection exception. Publication 519 says you must be present in the U.S. fewer than 183 days during the year, maintain a tax home in a foreign country during the year, and have a closer connection to that country than to the U.S. You claim it with Form 8840 attached to your return. You cannot claim it if you took steps during the year to become a permanent resident or had an adjustment of status application pending. There is a separate version for foreign students.
Which years does the test look at?
The year you are testing and the two years before it. The IRS gives this example: a person present 120 days in each of 2023, 2024 and 2025 has, for 2025, 120 + 40 (one-third of 120) + 20 (one-sixth of 120) = 180 days. That is below 183, so the person does not meet the test for 2025.
Sources read and checked on 26 October 2026. Tax rules and forms change, so check the IRS pages before you file. This tool is independent and is not affiliated with the IRS or any government. See the disclaimer.