Immigrants and international students

Substantial presence test calculator

You are a US resident for tax purposes if you pass the substantial presence test: at least 31 days in the United States this year, and at least 183 days over three years when you count every day this year, a third of last year’s days and a sixth of the days from the year before. Enter your countable days below to see where you stand and how many days you have left.

Calculate your days

Enter only the days that count. Leave out days as an exempt individual (most F-1 and J-1 students and scholars) and the other excluded days described below. The result is for the substantial presence test alone; a green card makes you a resident whatever your day count.

Weighted days for 2026

180

2026, all days
120
2025, one third
40
2024, one sixth
20

You do not meet the test for 2026.

You would meet it at 123 countable days in 2026, 2 more than you entered.

The test only. It ignores the green card test, the first-year choice and your visa history, and it takes the days you enter as countable. Not sure which days count? We can work it out from your travel dates.

How the test works

Both conditions must hold: 31 days or more in the year you are testing, and a weighted total of 183 days or more. The fractions are not rounded. The Treasury regulation says fractional days are kept, so a third of 100 days is 33.33, not 33, and a total of 182.83 falls short.

The test runs year by year. Meeting it in 2026 makes you a resident for 2026 only; you test again for 2027 with that year’s days and the two before it.

The first row is the IRS’s own example. The others show that fractions are kept.
This yearLast year (÷3)Two years ago (÷6)TotalResult
120120 → 40120 → 20180Does not meet the test
150100 → 33.330 → 0183.33Meets the test
149100 → 33.330 → 0182.33Does not meet the test
30365 → 121.67365 → 60.83212.50Does not meet the test: under 31 days this year

2027 tax season · $25 off for new clients

Get $25 off your 2026 tax return

Not ready to file yet? Leave your details and we’ll reach out in January, when the season opens. New clients take $25 off our preparation fee.

Federal and state returns for all 50 states, online or in Naperville

We use these details only to contact you about the 2027 tax season: by email, and by phone or text if you add a number. Ask us to stop at any time. See the offer terms and our privacy policy.

Which days count

A day counts if you were physically in the United States at any time during it, so the days you arrive and leave both count. These days do not:

  • Commuting days from a home in Canada or Mexico, if you commute to work in the US on more than 75% of your workdays.
  • Days in the US for less than 24 hours while in transit between two places outside it. Doing business here, even a meeting at the airport, makes the day count.
  • Days as a regular crew member of a foreign vessel, unless you do other business in the US that day.
  • Days you could not leave because of a medical condition that arose while you were here. A condition you had before you arrived does not qualify.
  • Days as an exempt individual: foreign-government staff in A or G status (other than A-3 and G-5), teachers and trainees in J or Q status, students in F, J, M or Q status, and professional athletes on the days they compete in a charitable sports event.

How long F-1 and J-1 days stay exempt

Students: you stop being an exempt individual once you have been exempt as a student, teacher or trainee for any part of more than five calendar years. A calendar year with even one day in F-1 status uses up one of the five. After that your days count, unless you can show you do not intend to live in the US permanently and have complied with your visa.

Teachers and trainees: you are not exempt for the year if you were exempt as a teacher, trainee or student in any part of two of the six preceding calendar years. A longer limit applies when a foreign employer paid all of your compensation.

Excluding the days takes Form 8843, filed for each year. Attach it to Form 1040-NR. With no return to file, mail it by the 1040-NR due date, which is April 15 if you had wages subject to withholding and June 15 if not, to the Internal Revenue Service Center, Austin, TX 73301-0215.

If you meet the test: the two ways out

The closer connection exception. If you were in the US fewer than 183 days in the year, kept a tax home in a foreign country for the whole year and had a closer connection to that country than to the US, you can be treated as a nonresident. You claim it on Form 8840, attached to Form 1040-NR or filed by its due date. It is not open to anyone who has applied for, or taken other steps toward, a green card, or who is a lawful permanent resident.

A tax treaty tie-breaker. If you are also a resident of a treaty country under its own rules, the treaty may make you a resident of that country only. You then file Form 1040-NR with Form 8833 attached and are treated as a nonresident for figuring your US income tax, but not for other purposes.

When residency starts and the dual-status year

In the first year you meet the test, residency generally starts on the first day you were in the US that year. You can leave out up to 10 days of presence at the start if you had a closer connection to a foreign country on those days, though you still count them when checking whether you meet the test.

The days before your residency starting date are a nonresident period, so the year is a dual-status year. If you are a resident at the end of the year you file Form 1040 and show the nonresident part on a statement; if you are a nonresident at the end, you file Form 1040-NR. If you do not meet the test this year but will next year, the first-year choice can let you be treated as a resident for part of this year. It needs at least 31 days in a row in the US, and presence on at least 75% of the days from the start of that period to the end of the year.

Want your status worked out from your travel dates?

We count your days, check the exemptions and exceptions that apply, and prepare Form 1040-NR, Form 8843, Form 8840 or a dual-status return. In person in Naperville, IL, by phone or by Zoom.

Questions people ask

How do you calculate the substantial presence test?

Add every countable day in the US this year, a third of last year’s days and a sixth of the days from the year before. If the total is 183 or more and you were here at least 31 days this year, you meet the test and are a resident alien for the year unless an exception applies.

Do partial days count for the substantial presence test?

Yes. Any day you were in the US at any time counts, including the days you arrive and leave, unless it falls under an exclusion such as transit of less than 24 hours.

Are fractions rounded in the substantial presence test?

No. Treasury regulation §301.7701(b)-1(c) keeps fractional days, so 100 days last year count as 33.33. A total of 182.83 does not meet the 183-day threshold.

Do F-1 student days count toward the substantial presence test?

Not during the first five calendar years in which a student is exempt, as long as they file Form 8843 each year. From the sixth calendar year their days generally count.

I meet the test but was here fewer than 183 days this year. Am I a resident?

Not necessarily. The closer connection exception can make you a nonresident if your tax home was in a foreign country all year and you had a closer connection to that country, and you have not taken steps toward a green card. You claim it on Form 8840.

Does the substantial presence test apply to green card holders?

A green card holder does not need it: being a lawful permanent resident at any time in the year makes you a resident alien under the green card test, whatever your day count.

Where these rules come from

General information, current when written, not advice about your situation. Fees and forms change; the official pages above are the authority.

Read next

USTAXX app

Upload docs securely

Get the app
Substantial Presence Test Calculator for 2026 | USTAXX