IRS substantial presence test
For 2026, the IRS treats a foreign national as a US resident after 31 days here that year and 183 weighted days over three years. In that weighting, the IRS counts earlier years at a fraction.
Send the visa type and travel dates for a confidential CPA or EA reply.
- 3000+ five star reviews
- Trusted in 27 countries
- All 50 States
Resident. The IRS taxes worldwide income, reported on Form 1040.
Nonresident. Nonresidents report taxable US source income and certain foreign source income effectively connected with a US trade or business. They file Form 1040-NR when the IRS requires a return.
Green card holder. A lawful permanent resident at any point in 2026 meets the green card test for 2026, whatever the day count.

Counting days for the IRS substantial presence test
The IRS counts any day of physical presence, even part of a day.
Count 2026 in full.
Under 31 days in 2026, a person cannot meet the test.
Add one third of 2025.
Divide the 2025 days by three.
Add one sixth of 2024.
Divide the 2024 days by six.
Compare the total with 183.
At 183 or more, the person meets the test for 2026.
For three more worked cases, see our substantial presence test calculation guide.
Substantial presence test example
A foreign business owner with 82 US days in 2026 assumed that was too few to meet the substantial presence test.
| Year | Days in the US | Days counted |
|---|---|---|
| 2026 | 82 | 82, all days |
| 2025 | 174 | 58, one third |
| 2024 | 264 | 44, one sixth |
| Total | 520 | 184 |
With 184 weighted days, the owner meets the test for 2026.
Illustrative figures with no excluded days, closer connection or treaty claim.
Days that do not count toward the substantial presence test
The IRS leaves these days out:
F, J, M or Q students. A student excludes days for up to 5 calendar years, longer only with substantial visa compliance and no intent to reside permanently.
J and Q teachers and trainees. Teachers and trainees lose the exclusion after exempt time in 2 of the prior 6 calendar years. Those paid by a foreign employer keep it only under extra IRS conditions.
Canada and Mexico commuters. Regular commuters from a home there do not count those workdays.
Transit and medical days. The IRS skips stays under 24 hours in transit between two places outside the US. It also skips days a person could not leave because of a medical condition that arose here.
Each person excluding student, teacher or medical days files Form 8843 by the return due date, including extensions.
We cover the substantial presence test F1 student rules and Form 8843 deadlines in our F1 and J1 visa taxes guide.
Substantial presence test H1B and dual status years
The IRS gives H1B workers no exemption from the count, so they count each day from first entry.
An H1B worker who first arrives on July 2, 2026 and stays through December 31 has 183 days of presence.
Without excluded days, a treaty claim or an election to be a resident for the whole year, the worker has a dual status year: part nonresident, part resident.
For a person who meets the test, the IRS treats residency as starting on the first day of presence that year. With a tax home and closer ties abroad, a person can ignore up to 10 early days in setting that date. The person files a statement on time to do so. The IRS still counts those days toward the test.
A first-time arrival who misses the test in 2026 can elect part-year resident status under the first-year choice. The IRS requires 31 consecutive days here, presence on 75% of the days from then through December 31, and meeting the test in 2027.
A student who switches from F1 to H1B counts days from the change of status, if the student days were within the exempt years.
Meeting the test and still filing as a nonresident
Closer connection exception.
With under 183 days in 2026, a tax home abroad all year and closer ties there, a person can claim nonresident status on Form 8840. The person must not have applied for a green card or taken other steps toward one. The IRS can refuse the claim when the form is late.
Treaty tie breaker.
A person treated as a resident of another country under a treaty tie breaker can file as a nonresident, using Form 1040-NR with Form 8833.
Tax residency determination with Dimov Tax
A CPA or EA at Dimov Tax checks each IRS substantial presence test count before preparing the return for that status.
I-94 day count.
We check the I-94 travel history from US Customs and Border Protection against passport stamps and travel records, so we can back each counted day.
Exempt year check.
We match student and teacher years to the visa history before excluding a day.
Forms 8843 and 8840.
We prepare the statements behind excluded days and closer connection claims.
FIRPTA substantial presence test check.
For US property sellers, we confirm whether the IRS treats the seller as a foreign person. If so, the buyer withholds tax from the sale.
Being an international student with jobs and investment accounts had never made the tax season easy for me. At least not until I discovered Dimov 3 years ago.
Residency review cost factors
Dimov Tax gives a flat fee quote from three factors before starting any work:
Years in the count. Three years of dates, or more when a client's exempt years started earlier.
A change of status. After an arrival, departure or visa switch, we check whether 2026 is a dual status year.
Foreign items. We quote treaty disclosures and foreign account reports when a client needs them.
Am I a resident alien for tax purposes?
A foreign national who meets the IRS substantial presence test or the green card test is a resident alien for that year. We confirm the status in one review and can amend a return filed under the wrong status.
Call (866) 681-2140 or send the I-94 travel history. Handled in confidence.

