The Substantial Presence Test for Indians in the US, Explained with Day Counts (2026)

Vishveshwar Rao · IRS Enrolled Agent
15 min read
Quick answer: The substantial presence test makes you a US tax resident if you were in the US at least 31 days this year and at least 183 days over three years, counting all of this year's days, one third of last year's and one sixth of the year before. Any part of a day counts. Exempt F, J, M or Q student days (within the 5-calendar-year limit) are not counted. Staying under 183 days this year is not enough: carryover can still push you over.
Key takeaways
- The test needs both 31 days in the current year and 183 weighted days: current year x 1, prior year x 1/3, year before x 1/6 (IRS).
- You are present on any day you are in the US at any time during the day, so arrival and departure days both count (IRS Pub 519).
- F-1 and J-1 student days are excluded until you have been exempt for any part of more than 5 calendar years, and you must file Form 8843 for each year you exclude them (IRS).
- 120 days a year for three years gives 180 weighted days and keeps you a nonresident (Pub 519); 122 days every year lands exactly on 183.
- Under 183 days this year, a tax home in India all year and no green card steps: Form 8840 can keep you a nonresident (IRS).

What is the substantial presence test?
It is the IRS day-count test for whether someone without a green card is a US tax resident. You meet it for a calendar year if you were physically present in the US on at least 31 days that year and 183 days during the three-year period made up of that year and the two before it (IRS).
The 183 is weighted:
- All the days you were present in the current year
- One third of the days you were present in the prior year
- One sixth of the days you were present in the year before that
IRS Publication 519 (2025 edition) gives the standard example: 120 days in each of 2023, 2024 and 2025 counts as 120 + 40 + 20 = 180, so that person is not a resident for 2025 (Pub 519).
This page covers the counting. What residency changes is in our guide to resident alien vs nonresident alien status.
What counts as a day in the US?
Any part of a day is a full day. Pub 519 says you are "treated as present in the United States on any day you are physically present in the country at any time during the day." Land in San Francisco at 11:40 pm on March 2 and March 2 counts. Fly out of Newark to Mumbai at 9 pm on December 18 and December 18 counts too. For this test the US means the 50 states, DC and US territorial waters, not US territories or US airspace (Pub 519).
Days you do not count:
| Days not counted | Condition | Form |
|---|---|---|
| Commuting from Canada or Mexico | You live there and commute to US work on more than 75% of workdays in your working period | None |
| Transit | Under 24 hours in the US while travelling between two places outside the US. A business meeting, even at the airport, breaks this | None |
| Crew of a foreign vessel | Regular crew between the US and a foreign country or US territory, not otherwise doing business here | None |
| Medical condition | You intended to leave but could not, because of a condition that arose while you were here | Form 8843 |
| NATO visa | Member of a NATO force or civilian component (family members count every day) | None |
| Exempt individual | F, J, M, Q students and J, Q teachers or trainees within their limits, most A and G visa holders, athletes at charity events | Form 8843 (not most A and G holders) |
Sources: Pub 519 and the Form 8843 instructions.
Do F1 student days count toward the substantial presence test?
Not while you are an exempt individual. A student temporarily here on an F, J, M or Q visa who substantially complies with it is exempt, and exempt days are not counted (IRS). "Exempt" only means exempt from counting days, not from US tax.
The limit: you stop being an exempt student once you have been exempt as a teacher, trainee or student for any part of more than 5 calendar years, unless you establish you do not intend to reside permanently in the US and have substantially complied with your visa. The IRS looks at whether you kept a closer connection to a foreign country and whether you took steps toward a green card (Pub 519).
Two details make this bite:
- Any part of a calendar year counts as a year. Land for your MS in August and that year is year one.
- Spouses and unmarried children under 21 whose status derives from yours (F-2, J-2) are also exempt (Pub 519). H-4 is not on the exempt list, so H-4 days count from day one.
J or Q teachers, trainees and research scholars have a shorter clock: you are not exempt if you were exempt as a teacher, trainee or student for any part of 2 of the 6 preceding calendar years. An exception stretches that to 3 of 6 if a foreign employer paid all your compensation this year and in each earlier year you were here as a teacher or trainee (IRS).
What is Form 8843 and when is it due?
Form 8843 is the statement explaining why you are excluding days. Every exempt student, teacher or trainee, and anyone excluding medical days, must file a fully completed one (Pub 519). Attach it to Form 1040-NR, or if you have no return to file, mail it to the Internal Revenue Service Center, Austin, TX 73301-0215, by the 1040-NR due date (Form 8843 instructions). For tax year 2025 that is April 15, 2026 if you had wages subject to withholding, June 15, 2026 if not (Pub 519). Line 12 asks directly whether you have been exempt for any part of more than 5 calendar years.
When do you become a resident? Five worked examples
Each example tests 2026, counts arrival and departure days as US days, and has no excluded days unless stated.
| Scenario | 2026 days | 2025 days x 1/3 | 2024 days x 1/6 | Weighted total | Result for 2026 |
|---|---|---|---|---|---|
| (a) H-1B: B-1 trip Jan 12-16, moves Mar 2, flies home Dec 18 | 297 | 0 | 0 | 297 | Resident. Start Jan 12, or Mar 2 with a 10-day statement |
| (b) F-1 from Aug 2021, OPT, H-1B from Oct 1, 2026 | 365 (none exempt) | 0 (exempt) | 0 (exempt) | 365 | Resident from Jan 1, 2026 |
| (c) H-1B arrived Oct 6, 2025, in India Apr 2 to Oct 23, 2026 | 160 | 87 / 3 = 29 | 0 | 189 | Resident despite 160 days in 2026 |
| (d) Consultant, 120 days a year | 120 | 120 / 3 = 40 | 120 / 6 = 20 | 180 | Nonresident |
| (d2) Same consultant, 126 days in 2026 | 126 | 40 | 20 | 186 | Resident unless Form 8840 applies |
| (e) H-4 spouse arrives Jul 20, 2026 | 165 | 0 | 0 | 165 | Nonresident under the test; elections available |
(a) H-1B arriving in March 2026
Rohit, a backend engineer from Pune, visits on a B-1 for a client kickoff January 12 to 16, 2026 (5 days), goes back, and moves on his H-1B on March 2. He flies to India for the holidays on December 18. March 2 to December 18 is 292 days; add 5 and he has 297. He clears 31 and 183 on 2026 days alone.
The start date is generally the first day present in the year: January 12. But you can ignore up to 10 days of presence when fixing the start date if on those days your tax home was abroad and you had a closer connection there, and you attach a signed statement to your return (Pub 519). Rohit still lived and worked in Pune in January, so his start date can be March 2. The 5 days still count toward 183. Since he was not a resident in 2025, 2026 is a dual-status year; see how the dual-status return works in your move year.
(b) F-1 from 2021, OPT, then H-1B in 2026
Sneha arrived for her MS in August 2021 on an F-1 and stayed on F-1 through OPT, with H-1B status from October 1, 2026. Her exempt years are 2021 to 2025: five calendar years. 2026 would be a sixth, so unless she can establish she does not intend to reside permanently, none of her 2026 days are exempt, including January to September on F-1.
Her exempt 2024 and 2025 days count as zero; 2026 alone gives 365, so she is a resident for all of 2026. The H-1B date decides nothing here; the 5-year clock does. The IRS's own example is the same: an F-1 student who arrived in August 2020, was exempt 2020 through 2024, and is resident from January 1, 2025 (IRS examples).
Had she arrived in August 2022, 2026 would be exempt year five: only October 1 to December 31 (92 days) would count, and she would be a nonresident for 2026.
(c) Arrived October 2025: the one-third carryover
Arjun arrived on an H-1B on October 6, 2025 and stayed: 87 days in 2025, so a nonresident for 2025 under the test.
In 2026 he is in the US January 1 to April 1 (91 days, April 1 being his departure day), works from Bengaluru, and returns October 24 (69 days to December 31). That is 160 days, and he assumes he is a nonresident. He is not: 160 + (87 / 3 = 29) = 189. He crosses 183 on his 154th US day of 2026, December 25. His tax home stayed with his US H-1B job, so the closer connection exception is not open to him.
(d) The consultant and the 120-day trap
Priya works for an IT services firm in Hyderabad and visits US clients on a B-1, about 120 days a year. At 120 days in 2024, 2025 and 2026 she gets 120 + 40 + 20 = 180: nonresident.
In 2026 a project runs long and she spends 126 days: 126 + 40 + 20 = 186, and she meets the test. The steady-state line is 122 days a year, since 122 x (1 + 1/3 + 1/6) = 122 x 1.5 = 183. At 121 a year the total is 181.5. Because she was under 183 days in 2026 itself, the closer connection exception may still save her (below).
(e) H-4 spouse arriving with an H-1B
An H-4 spouse counts every day. Had Rohit's wife Kavya travelled with him from March 2 to December 18, she would have 292 days and be a resident in her own right. If she joins on July 20, 2026 and stays through December 31, she has 165 days and is a nonresident for 2026 under the test. She can still become a resident through the first-year choice (below) or, because Rohit is a resident at year-end, the election to treat a nonresident spouse as a resident and file jointly under IRC section 6013(g) (IRS examples). The ITIN and joint-filing mechanics are in our H-4 spouse ITIN guide.
Is the 183-day rule the same as the substantial presence test?
No. The US test is two thresholds, 31 days this year and 183 weighted days over three years, so you can be under 183 days this year and still be a resident (example c). A flat 183 current-year days matters in one place: at 183 or more, the closer connection exception is unavailable (Form 8840 instructions).
Can you stay a nonresident with the closer connection exception (Form 8840)?
Yes, if every condition holds. Even if you meet the test, you are a nonresident if you were present fewer than 183 days in the year, kept a tax home in a foreign country for the entire year, and had a closer connection to that country than to the US (IRS).
Your tax home is where your main place of work is, wherever your family lives (Form 8840 instructions). Closer connection turns on significant contacts such as home, family, banks, driver's licence and the residence you declare on forms like W-8BEN (Pub 519). Priya, with a Hyderabad employer, flat and family, is the typical fit.
Who cannot use it:
- Anyone present 183 days or more in the year.
- Green card holders.
- Anyone who applied for, or took other steps toward, a green card during the year or had an adjustment application pending. The IRS lists Forms I-485, I-130, I-140, ETA-750 and OF-230 (IRS). An H-1B holder with an I-140 filed is out.
- Anyone with a US tax home at any time in the year (Form 8840 instructions), which rules out most H-1B employees working here.
Attach Form 8840 to your 1040-NR, or mail it alone to the Austin address above by the 1040-NR due date. File late and you lose the exception unless you show by clear and convincing evidence that you took reasonable steps to learn and meet the requirement (Form 8840 instructions).
What if India also treats you as a resident?
Then you may be a dual resident, and the India-US treaty's tie-breaker decides. US residency rules do not override treaty definitions: if the treaty makes you a resident of the other country, you figure your US tax as a nonresident alien (Pub 519).
Article 4(2) of the India-US treaty applies these tests in order (treaty text):
- Where you have a permanent home available to you.
- If in both, where your personal and economic relations are closer (centre of vital interests).
- If that cannot be determined, or you have a permanent home in neither, where you have a habitual abode.
- If habitual abode in both or neither, the country you are a national of.
- Otherwise, the two tax authorities settle it by mutual agreement.
You claim it on Form 1040-NR with Form 8833 attached, the treaty-based return position disclosure (Pub 519; About Form 8833). This is a facts-heavy call for a CPA. Pub 519 also warns that in certain cases a tie-breaker claim can trigger the section 877A expatriation tax, so green card holders should read our exit tax guide first.
When does your residency start and end?
In your first year, if you were not a resident at any time in the prior year, you are a resident only from your residency starting date: generally the first day you are present that year, subject to the 10-day rule in example (a). If you were a resident for any part of the prior year, you are a resident from January 1 (Pub 519).
First-year choice. If you do not meet the test this year, were not a resident last year, and will meet the test next year, you can choose to be a resident for part of this year. You need 31 days in a row in the US this year and presence on at least 75% of the days from the start of that period to December 31, with up to 5 days of absence treated as presence. Residency starts on the first day of the 31-day period (Pub 519). You attach a statement to Form 1040, cannot file until you meet next year's test, can use Form 4868 to extend to October 15, and cannot revoke the choice without IRS approval (IRS). Kavya, present continuously from July 20, qualifies for 2026 if she meets the test in 2027. Arjun only meets the 2026 test on December 25, 2026, after that extension date, so his 2025 choice needs a CPA's view.
Leaving. If you are a resident this year and not at any point next year, residency ends December 31, unless you qualify for an earlier date: your last day of physical presence, if for the rest of the year your tax home was abroad and you had a closer connection there. You claim it with a signed statement (IRS).
Substantial presence test calculator: how do you count your days?
There is no official IRS calculator. The arithmetic is easy; the dates are the work.
- Pull your history from the CBP I-94 website (i94.cbp.dhs.gov) using its arrival/departure history lookup with your name, date of birth and passport details (CBP).
- Cross-check against passport stamps, boarding passes and your I-797. CBP says the history does not reflect changes of status or extensions granted by USCIS, so an F-1 to H-1B change will not show.
- For each of the three years, list every date in the US, counting arrival and departure days.
- Remove excluded days: exempt student or teacher days within the limits, transit under 24 hours, qualifying medical days.
- Check the current year has at least 31 days. If not, you do not meet the test.
- Compute current days + prior-year days / 3 + year-before days / 6. At 183 or more, you meet it.
- Under 183 current-year days? Check the closer connection exception. Resident in India too? Check the tie-breaker. Then list the forms you owe.
FAQ
Does the substantial presence test apply to F1 students?
Yes, but exempt student days are not counted. That exemption ends once you have been exempt for any part of more than 5 calendar years, unless you establish you do not intend to reside permanently in the US. File Form 8843 for each year you exclude days.
Do OPT days count for the substantial presence test?
OPT is time in F-1 status, so it follows the F-1 rule: excluded while you are within your exempt calendar years and file Form 8843, counted once the 5-year limit is used. The calendar, not your job start date, moves you into counting.
Is an H-1B holder automatically a resident alien?
No. You are a resident only if you meet the day count. Arrive by July 2 and stay, and you reach exactly 183 that year; arrive in October and you cannot.
What happens if I forget to file Form 8840?
You cannot claim the closer connection exception and may be treated as a US resident. A late claim is accepted only if you show by clear and convincing evidence that you took reasonable steps to learn about and comply with the requirement.
Does my H-4 spouse count days separately from me?
Yes. Each person runs their own test, and H-4 is not an exempt category, so an H-4 spouse counts every day from arrival. If your spouse arrives late in the year and falls short, the first-year choice or the nonresident spouse election can still let you file jointly.