Staytill

Substantial presence test: the IRS 183‑day formula

US 183 weighted days

Tax days
183weighted days over 3 years, with 31 this year

You are a US tax resident for a calendar year if you were in the US at least 31 days that year and 183 weighted days over the 3-year period that includes it.1234

Weights
The 183 is a weighted total: every day this year, plus 1/3 of the days last year, plus 1/6 of the days in the year before that.536
A day is
A day counts if you are in the US at any time during it. Under 24 hours in transit between two places outside the US, and regular commuting from Canada or Mexico, do not count.78910
Exempt days
Days as an exempt individual do not count, for example a student on an F, J, M or Q visa who substantially complies with the requirements of the visa.1112
Exception
The closer connection exception can keep you a nonresident: fewer than 183 days in the US that year, a foreign tax home and a closer connection to that country. Claim it on Form 8840.13141516
Example
With 122 days in the US in each of three years, the weighted total is 122 + 40.67 + 20.33 = 183, which reaches the 183 line.53How we count: 122 days x 1 (this year) + 122 x 1/3 (last year) + 122 x 1/6 (the year before) = 122 x 1.5 = 183, using the IRS weights of 1, 1/3 and 1/6.

Questions people ask

How does the substantial presence test work?

You are a US tax resident for a calendar year if you were in the US at least 31 days that year and 183 weighted days over the 3-year period that includes it.1234 The 183 is a weighted total: every day this year, plus 1/3 of the days last year, plus 1/6 of the days in the year before that.536

What counts as a day in the US?

A day counts if you are in the US at any time during it. Under 24 hours in transit between two places outside the US, and regular commuting from Canada or Mexico, do not count.78910

Which days are exempt?

Days as an exempt individual do not count, for example a student on an F, J, M or Q visa who substantially complies with the requirements of the visa.1112

What is the closer connection exception?

The closer connection exception can keep you a nonresident: fewer than 183 days in the US that year, a foreign tax home and a closer connection to that country. Claim it on Form 8840.13141516

How many days a year reach the 183 line if I stay the same each year?

With 122 days in the US in each of three years, the weighted total is 122 + 40.67 + 20.33 = 183, which reaches the 183 line.53How we count: 122 days x 1 (this year) + 122 x 1/3 (last year) + 122 x 1/6 (the year before) = 122 x 1.5 = 183, using the IRS weights of 1, 1/3 and 1/6. The 183 is a weighted total: every day this year, plus 1/3 of the days last year, plus 1/6 of the days in the year before that.536

Sources

4 laws and 12 official pages, each with its exact words
  1. IRS, substantial presence test · Internal Revenue Service · read 26 Oct 2026
    Exact words 31 days during the current year, and 183 days during the 3-year period that includes the current year and the 2 years immediately before that
  2. 26 U.S.C. § 7701(b)(3)(A)(i) · Legal Information Institute, Cornell Law School (text of the US Code and CFR) · read 26 Oct 2026
    Exact words such individual was present in the United States on at least 31 days during the calendar year
  3. 26 U.S.C. § 7701(b)(3)(A)(ii) · Legal Information Institute, Cornell Law School (text of the US Code and CFR) · read 26 Oct 2026
    Exact words equals or exceeds 183 days
  4. IRS, substantial presence test · Internal Revenue Service · read 26 Oct 2026
    Exact words You will be considered a United States resident for tax purposes if you meet the substantial presence test for the calendar year.
  5. IRS, substantial presence test · Internal Revenue Service · read 26 Oct 2026
    Exact words All the days you were present in the current year, and 1/3 of the days you were present in the first year before the current year, and 1/6 of the days you were present in the second year before the current year
  6. IRS, substantial presence test · Internal Revenue Service · read 26 Oct 2026
    Exact words To determine if you meet the substantial presence test for 2025, count the full 120 days of presence in 2025, 40 days in 2024 (1/3 of 120), and 20 days in 2023 (1/6 of 120).
  7. IRS, substantial presence test · Internal Revenue Service · read 26 Oct 2026
    Exact words You are treated as present in the U.S. on any day you are physically present in the country, at any time during the day.
  8. 26 U.S.C. § 7701(b)(7)(A) · Legal Information Institute, Cornell Law School (text of the US Code and CFR) · read 26 Oct 2026
    Exact words an individual shall be treated as present in the United States on any day if such individual is physically present in the United States at any time during such day
  9. IRS, substantial presence test · Internal Revenue Service · read 26 Oct 2026
    Exact words Days you are in the U.S. for less than 24 hours, when you are in transit between two places outside the United States.
  10. IRS, substantial presence test · Internal Revenue Service · read 26 Oct 2026
    Exact words Days you commute to work in the U.S. from a residence in Canada or Mexico if you regularly commute from Canada or Mexico.
  11. IRS, substantial presence test · Internal Revenue Service · read 26 Oct 2026
    Exact words Do not count days for which you are an exempt individual.
  12. IRS, substantial presence test · Internal Revenue Service · read 26 Oct 2026
    Exact words A student temporarily present in the U.S. under an "F," "J," "M," or "Q" visa, who substantially complies with the requirements of the visa.
  13. 26 U.S.C. § 7701(b)(3)(B) · Legal Information Institute, Cornell Law School (text of the US Code and CFR) · read 26 Oct 2026
    Exact words it is established that for the current year such individual has a tax home (as defined in section 911(d)(3) without regard to the second sentence thereof) in a foreign country and has a closer connection to such foreign country than to the United States
  14. IRS, substantial presence test · Internal Revenue Service · read 26 Oct 2026
    Exact words Even if you met the substantial presence test you can still be treated as a nonresident of the United States for U.S. tax purposes if you qualify for one of the following exceptions
  15. IRS, closer connection exception · Internal Revenue Service · read 26 Oct 2026
    Exact words Were present in the United States less than 183 days during the year
  16. IRS, closer connection exception · Internal Revenue Service · read 26 Oct 2026
    Exact words You must file Form 8840, Closer Connection Exception Statement for Aliens, to claim the Closer Connection Exception.
Checked against 26 U.S.C. § 7701(b) on 26 Oct 2026 Updated 26 Oct 2026

Know a rule that changed, or a line we got wrong? Send us the source. We fix the page and log it.

Report a mistake