Substantial presence test calculator: count your US days the way the IRS does
You are a US tax resident for a year if you were in the US on at least 31 days that year and on 183 days over three years, counting every day this year, a third of last year's days and a sixth of the days the year before.
A day counts if you were in the US for any part of it, so the day you land and the day you fly out are both days.
It usually starts with a booking. A trade show in Las Vegas in March, a client in Miami in June, a long summer with family in Texas. Each trip feels short. The IRS doesn't look at trips. It looks at days, across three calendar years, and it counts a day the moment you set foot on US soil. Put your stays in below and you'll see the exact count, how many days you have left this year, and which exceptions could still keep you a nonresident.
Key takeaways
- The test is 31 days this year and 183 weighted days: all of this year, 1/3 of last year, 1/6 of the year before.
- Any part of a day in the US is a full day, so a short hop can cost two or three days.
- Students, teachers, trainees and diplomats on certain visas are exempt individuals whose days don't count while the exemption lasts.
- Under 183 days this year with a tax home abroad? The closer connection exception on Form 8840 can keep you a nonresident.
- A tax treaty tie-breaker (Form 8833) can override the result for figuring your US tax.
- For a foreign owner of a US LLC, becoming resident means worldwide income on a US return and a different set of filings for the company.
Substantial presence test calculator
Pick the year you want to test. Then add each stay in the US with the day you arrived and the day you left; both are counted. Overlapping trips are merged, a stay over New Year is split between the two years, and days you mark as excluded are left out of the total. If you already know your totals, switch to typing them.
Only part of a stay excluded, such as the days a medical problem kept you from flying home? Enter that part as its own trip and mark it.
Nothing you type is sent anywhere. Trips are kept in this browser only, so they're still here when you come back; "Clear all trips" removes them.
The verdict turns on one number: weighted days of 183 or more, with at least 31 this year.
What counts as a day of presence in the US
IRS Publication 519 treats you as present on any day you are physically in the US at any time during that day.
There is no hour threshold. Land at 11.40 pm and that whole calendar day is in your count; take the first flight out at 6 am and that day is in too. "The United States" here means the 50 states, the District of Columbia and US territorial waters. It does not include Puerto Rico, Guam or the other US territories, and it does not include US airspace, so overflying the country costs nothing.
Six kinds of days you leave out
Everything else counts: holidays, family visits, medical treatment you came for, days you worked remotely for a foreign employer, days spent house hunting. Your I-94 travel history from US Customs and Border Protection lists your recorded arrivals and departures, which is a good starting point for the trip list above.
Count calendar days touched, not nights slept or hours spent.
How to calculate the substantial presence test: three worked examples
The weights make old days cheap and this year's days expensive. A day two years back is worth a sixth of a day; a day last year, a third. The receipts show how that plays out.
The IRS's own example
Say you stay 30 days longer
The third pattern catches frequent visitors: 121 days every year is the steady state that never trips the test, because 121 + 40.33 + 20.17 = 181.5. At 122 days a year the total reaches 183 from the third year on. Our rule of thumb for a regular visitor is to plan around 120 days a year and keep the receipts.
Your safe number this year depends on the last two; the calculator gives it to you exactly.
Exempt individuals: whose days don't count
"Exempt individual" doesn't mean exempt from tax. It means the days don't count toward the test while you hold that status. There are four groups, each with its own time limit.
| Who | Visa | How long the days stay excluded | Form 8843 |
|---|---|---|---|
| Foreign government-related individuals | A or G (not A-3 or G-5 household staff), plus full-time staff of designated international organisations | For as long as the status lasts | Not required |
| Teachers and trainees | J or Q, substantially complying | Not exempt if you were an exempt teacher, trainee or student in any part of 2 of the 6 previous calendar years, with an exception when a foreign employer paid you | Required |
| Students | F, J, M or Q, substantially complying | 5 calendar years; longer only if you show no intention to reside permanently | Required |
| Professional athletes | Any, at a charitable sports event | Only the days you actually compete | Required |
For diplomats, teachers, trainees and students, a spouse and unmarried children under 21 in the household whose visas depend on yours share the exemption. A business visitor on a B-1 or B-2 visa or under the Visa Waiver Program is not an exempt individual, which is the group most foreign company owners fall into. Mark exempt periods in the calculator with "Exempt individual days".
Business and tourist visits are never exempt; every day is counted.
The closer connection exception and Form 8840
Meeting the test isn't always the end of the story. You can still be treated as a nonresident for the year if all three of these hold:
- Fewer than 183 daysin the US in the year itself (actual days, not weighted).
- A tax home abroadfor the whole year: your main place of business or work, or where you regularly live if you have none.
- A closer connectionto that country than to the US, judged on your permanent home, family, belongings, affiliations, business, driving licence, voting and the residence you state on forms such as W-8BEN.
You claim it by attaching Form 8840 to your return, or by sending it alone if you don't have to file, by the Form 1040-NR due date: 15 June of the following year if you had no US wages with withholding, 15 April if you did. Miss it and the exception is lost unless you can show clear and convincing evidence that you tried to comply.
If during the year you applied for a green card, took other steps toward permanent residence, or had an adjustment of status pending, you cannot claim a closer connection. A two-country version exists for people who moved their tax home from one foreign country to another during the year.
Under 183 real days and a life clearly based abroad: file Form 8840 on time and stay nonresident.
Tax treaty tie-breaker: resident in two countries
The substantial presence test doesn't override a tax treaty. If you are a resident of the US under the test and of another country under its own law, and the two have an income tax treaty with a residence tie-breaker, the treaty can decide that you are resident in the other country. You then figure your US tax as a nonresident, filing Form 1040-NR with Form 8833 attached, while still counting as a US resident for other purposes such as your residency dates.
Most US treaties follow the order in the OECD Model's residence article: where you have a permanent home, then where your personal and economic ties are closer, then where you habitually live, then nationality. Read the residence article of your own treaty from the IRS treaty list. Long-term green card holders should take advice first: Publication 519 warns that a tie-breaker claim can trigger the expatriation tax.
No treaty, no tie-breaker: then the closer connection exception is your only way back.
Dual-status years: the year you arrive and the year you leave
Residence under the test doesn't always cover the full calendar year. You can be a nonresident for part of a year and a resident for the rest, which the IRS calls a dual-status year.
Arriving
If you weren't a resident the year before, your residency starts on the first day you were in the US in the year you meet the test. Up to 10 days of earlier short visits can be left out of that date if you had a closer connection abroad on those days, though they still count toward the test itself. A signed statement goes with your return. The calculator above shows your first counted day for the year.
Leaving
In your last year, residence normally runs to 31 December. It can end earlier, on the last day you were in the US, if you keep a tax home abroad and a closer connection to it for the rest of the year and you aren't resident the next year. Up to 10 days of later visits can again be ignored for this date.
The first-year choice
If you don't meet the test this year but will next year, you can choose to be treated as resident from part of this year, provided you were in the US for 31 days in a row and for at least 75% of the days from the start of that run to 31 December, with up to 5 days away counted as present. People usually do it to file jointly or claim resident deductions.
Residence starts on a date, not on 1 January; that date decides which income is taxed as a resident's.
The 183 day rule elsewhere: the UK and tax treaties
"183 days" turns up in three different rules, and people mix them up. The US test is a weighted count over three calendar years. The UK test is a single tax year with its own way of counting days. And the treaty rule decides where an employee's salary is taxed, not where the person lives.
The UK statutory residence test, in brief
The UK tax year runs from 6 April to 5 April, and HMRC counts a day only if you are in the UK at midnight. The test runs in three steps, set out in HMRC's RDR3 guidance:
- Step 1: automatic overseas testsNon-resident if any appliesFewer than 16 days in the UK if you were resident in one of the 3 previous tax years; fewer than 46 days if you were resident in none; or full-time work abroad with fewer than 91 UK days, of which fewer than 31 with more than 3 hours of work.
- Step 2: automatic UK testsResident if any applies183 days or more in the UK; your only home in the UK for 91 days in a row, at least 30 of them in the tax year; or full-time work in the UK over a 365 day period.
- Step 3: sufficient ties testDays and ties togetherFamily, accommodation, work and 90 day ties, plus a country tie if you were resident in any of the previous 3 years. The more ties, the fewer days it takes.
- 16 to 45 days
- 4 ties
- 46 to 90 days
- 3 ties
- 91 to 120 days
- 2 ties
- Over 120 days
- 1 tie
- 46 to 90 days
- All 4 ties
- 91 to 120 days
- 3 ties
- Over 120 days
- 2 ties
One catch: under HMRC's deeming rule, someone resident in one of the previous three years with at least three ties who is in the UK on more than 30 days without staying to midnight has every such day after the 30th counted anyway. Leaving at 11 pm every time doesn't work for long.
The 183 day rule in tax treaties
Most income tax treaties have an employment article built on Article 15 of the OECD Model Tax Convention. It lets an employee work in another treaty country and be taxed only at home if all three conditions hold:
- present there for no more than 183 days in any 12-month period starting or ending in the tax year (some older treaties use the calendar or fiscal year);
- paid by, or on behalf of, an employer that is not resident in that country;
- the pay is not borne by a permanent establishment the employer has there.
Publication 519 sets out the same three conditions for people working in the US, and notes that some treaties differ. Two things the rule is not: it is not a residence test, and it doesn't cover the self-employed or business profits, which most treaties handle under a separate article that looks for a fixed base or permanent establishment instead of a day count.
Three different 183s: a weighted US count, a UK midnight count, and a treaty limit on taxing salaries.
Why the count matters if you own a US LLC and visit the US
Plenty of people who own a US LLC from abroad never think about this test, because they rarely set foot in the US. The ones who should are the owners who go for conferences, meet clients, spend winters in Florida or move there in stages. Three things change.
A resident alien is taxed like a citizen on income from everywhere, on Form 1040, and a single-member LLC's profit shows up on that return. You also stop being a "foreign person", so the LLC is no longer the foreign-owned disregarded entity that files Form 5472; the filings become the ones a US owner makes.
Publication 519 sources pay for services by where you perform them, and says that performing personal services in the US at any time in the year usually means you are engaged in a US trade or business. A month of working for your clients from a rented flat in Miami can create income that is taxable in the US, with no 183 day threshold. The small exception, 90 days and US$3,000 for an employee of a foreign business, rarely fits an owner.
Keep your trip list, your I-94 history and boarding passes for at least the three years the test looks back over. If you get close to 183, decide before the trip, not after, whether Form 8840 or a treaty claim will apply to you, and see our guides to the ITIN and the W-8BEN-E that your LLC's bank and payment platforms ask for.
None of this stops you running a US company from abroad, and an owner who visits a few weeks a year stays far from the line. It just means the calendar belongs in the same folder as the company papers.
The LLC doesn't make you resident; your days do. Count them before you book a long stay.
Substantial presence test questions, answered
How do you calculate the substantial presence test?
Does a partial day count as a day for the substantial presence test?
Is the substantial presence test the same as the 183 day rule?
Can I meet the substantial presence test and still be a nonresident?
Do F-1 students count their days?
When is Form 8840 due?
Does owning a US LLC make me a US tax resident?
Changelog
- 13 November 2026: first published, with the rules of IRS Publication 519 (2025) for 2025 returns, the IRS list of income tax treaties (last reviewed 3 January 2026), HMRC's RDR3 notes (updated 11 June 2026) and the residence manual pages RFIG20710 and RFIG20720. The calculator reproduces the Publication 519 example (120 days a year gives 180).
A US company doesn't need you in the US.
We form your LLC, keep its filings on time and set up the bank account with you, all without a flight. Your days stay yours.