Make every day count Free money tools for every American household
--:-- …--°

Substantial presence test calculator (IRS 183-day rule)

Count your days in the United States and see whether you meet the IRS substantial presence test (the 183-day rule), which is one way a person who is not a citizen can be treated as a U.S. resident for tax purposes. It applies the IRS formula only. General information, not tax or immigration advice.

Your days in the U.S.

Count each calendar day on which you were physically in the U.S. for any part of the day, from the day you arrive to the day you leave. Do not count the days the IRS says to leave out (see the next box).

Days that are not counted (exempt days)

The IRS does not count some days. Enter your day counts above after taking those days out. Tick a box to read the rule; ticking it does not change the numbers.

Other days that are not counted include days as a holder of an A or G visa (other than A-3 and G-5), days as a regular commuter from Canada or Mexico, days of less than 24 hours in transit between two places outside the U.S., and days as a regular crew member of a foreign vessel. If you exclude days as an exempt individual or for a medical condition, you generally must file Form 8843 by the due date.

The closer connection exception

Even if you meet the substantial presence test, you may still be treated as a nonresident for tax purposes if you were in the U.S. fewer than 183 days in the tax year, kept a tax home in a foreign country for the whole year, and had a closer connection to that country than to the U.S. You cannot use it if you took steps to become a lawful permanent resident or had an application to adjust status pending. You claim it by filing Form 8840 on time. This calculator does not decide it for you.

IRS: Substantial presence test · IRS: Determining an individual's tax residency status · IRS Publication 519, U.S. Tax Guide for Aliens · IRS: Closer connection exception · IRS: Form 8840 · IRS: Form 8843 · IRS: Dual-status aliens

ITIN guide: who needs one and how to apply or renew · Income tax calculator

This is a calculator of the IRS formula only. It is not tax, legal or immigration advice. Tax treaties and exceptions can change the result, and so can the green card test, a first-year choice or a dual-status year. For your situation, see IRS Publication 519 or ask a qualified tax professional. Days in the U.S. can also matter for immigration reasons that this tool does not cover.

Your weighted days

0.00
Days in the tax year
One third of the first prior year
One sixth of the second prior year
Weighted total
At least 31 days in the tax year
Weighted total of 183 or more
Fewest tax-year days that would meet the test

This is the IRS day-count formula only. The green card test, tax treaties, the closer connection exception and a dual-status year can change your status. Not tax or immigration advice.

What the substantial presence test is

The U.S. taxes residents and nonresidents differently. A person who is not a citizen is treated as a resident for a calendar year if they meet the green card test (lawful permanent resident at any time in the year) or the substantial presence test, which counts days of physical presence. This calculator covers only the day count. It is an IRS formula, not an immigration status, and spending many days in the U.S. does not give anyone a visa, a green card or the right to stay.

The two conditions

According to the IRS and Publication 519, you meet the test for the current year when both are true:

The IRS example is 120 days in each of three years: 120 + 40 + 20 = 180, so the test is not met. The 31-day condition is a hard floor: with 30 days this year you do not meet the test, however long your earlier years were.

Another example: 150 days this year, 99 last year and 40 the year before give 150 + 33 + 6.67 = 189.67, so both conditions hold. With 98 days last year and none before, the total is 182.67, just short. The calculator also shows the fewest days this year that would meet the test given your two earlier years.

Which days count

Count each calendar day on which you were in the U.S. for any part of the day, after removing the days the IRS does not count:

Exempt status has limits, for example a general five-calendar-year limit for students. If you exclude days as an exempt individual or for a medical condition, you generally must file Form 8843 by the due date, and filing late can cost you the exclusion.

Exceptions that can change the answer

The closer connection exception can let you be treated as a nonresident if you were here fewer than 183 days in the year, kept a tax home in one foreign country all year, and had a closer connection to it than to the U.S. It is not available if you took steps toward a green card, and it is claimed on Form 8840 filed on time. Tax treaties can also treat you as a resident of the other country, and a first-year choice can start residency early. The year you arrive or leave can be a dual-status year, with part as a nonresident and part as a resident. The calculator does not decide any of these.

What this calculator leaves out

It does not know your visa, immigration history, treaty country, income or what you would owe, and it counts only the days you type. If you are close to the line or have exempt days, an exception or a treaty question, read the IRS pages below or ask a qualified tax professional. For tax numbers see the income tax calculator, and for a taxpayer number without a Social Security number see the ITIN guide.

Frequently asked questions

Is the 183-day rule the same as spending 183 days here this year?

No. The 183 is a weighted total over three years: this year's days, one third of last year's and one sixth of the year before. You can meet the test with fewer than 183 days this year if the earlier years were long, but you still need at least 31 days this year.

If I meet the test, do I owe U.S. tax?

Not automatically. Meeting the test generally makes you a resident for tax purposes for that year, and residents are generally taxed on worldwide income. Whether you owe tax depends on your income, deductions, credits and any treaty, and the closer connection exception or a treaty may change your status.

Do days as an international student count?

Days as an exempt student on an F, J, M or Q visa who substantially complies with the visa are generally not counted, usually for up to five calendar years, and you generally file Form 8843. After that they count unless you show you do not intend to reside permanently in the U.S. Enter your days after taking out the exempt days.

Official sources

Checked on October 17, 2026: IRS, Substantial presence test (last reviewed March 14, 2026), IRS, Determining an individual's tax residency status (February 11, 2026), IRS Publication 519 (2025), U.S. Tax Guide for Aliens, IRS, Closer connection exception (July 16, 2026), IRS, Dual-status aliens (July 23, 2026), IRS, About Form 8843, IRS, About Form 8840.

This page gives general information and arithmetic, not tax, legal or immigration advice. Tax treaties and exceptions may change the result. See IRS Publication 519 or a qualified professional for your situation.

How we calculate

The formula in plain words

You meet the substantial presence test for a calendar year when both conditions hold: (1) you were present in the U.S. on at least 31 days in that year, and (2) the days in that year, plus one third of the days in the year before, plus one sixth of the days in the year before that, add up to 183 or more. The calculator multiplies by 6 so the comparison is exact: 6 × current + 2 × first prior + second prior ≥ 1,098.

Assumptions and limits

Data and sources

Figures and rules used: 2026.

Figures checked against the official sources on October 17, 2026.

Main sources: IRS: Substantial presence test; IRS: Determining an individual's tax residency status; IRS Publication 519: U.S. Tax Guide for Aliens. See all 7 sources under Data sources below.

Methodology last reviewed: October 14, 2026. Methodology, rounding and corrections

Sources

The rates, limits and data on this page are based on these publications:

Markets & investing

Home & mortgage

Taxes & pay

Retirement & savings

Loans & debt

Money & business

Creators

Travel

Money games

Weather & time

Guides