The substantial presence test is a counting rule. It counts the days you were physically inside the United States, and if the total is high enough, the IRS stops treating you as a foreign visitor and starts treating you as a resident. A resident pays U.S. tax on income earned anywhere in the world.
Two things make this rule dangerous for founders. The first is that it looks at three years at once, not one. You can spend a modest number of days in the country every year, never feel like you moved there, and still cross the line in year three. The second is that nothing happens when you cross it. No border officer says anything, no notice arrives in the post, and the count is yours to run.
If you are visiting American customers, attending conferences, or spending part of the year near your U.S. company, this is the rule that decides whether that travel has a tax price.
What the rule actually counts
The IRS says you meet the test for a calendar year if you were physically present in the United States on both of the following:
- 31 days during the current year, and
- 183 days during the three-year period made up of the current year and the two years before it.
Those 183 days are not plain days. You add up three years, and each year is weighted differently.
| Year | How many of those days you count |
|---|---|
| This year | All of them |
| Last year | One third of them |
| The year before that | One sixth of them |
Here is the arithmetic on real numbers.
Say you spend 120 days in the United States every year, and you have done so for three years. The count is 120 + (120 ÷ 3 = 40) + (120 ÷ 6 = 20) = 180 days. That is below 183, so you do not meet the test.
Now say you spend 130 days a year instead. The count is 130 + (130 ÷ 3 = 43) + (130 ÷ 6 = 22) = 195 days. That is above 183, and you were there more than 31 days this year, so you meet the test. Ten extra days a year is the whole difference between the two examples.
A day counts if you were physically present in the country at any time during that day. A three-hour connection through Newark is a day, unless one of the exceptions below applies to it.
Days that do not count
The IRS leaves five kinds of days out of the count.
- Days you commute to work in the United States from a home in Canada or Mexico, if you commute regularly.
- Days you are in the United States for less than 24 hours while in transit between two places outside the United States.
- Days you are in the United States as a crew member of a foreign vessel.
- Days you could not leave because of a medical condition that developed while you were in the United States.
- Days you were in the United States as an exempt individual.
"Exempt individual" is a misleading name. It does not mean you pay no tax. It means the IRS does not count your days at all. The category is defined by visa status:
- Foreign government-related individuals on an A or G visa, but not on an A-3 or G-5 visa.
- Teachers and trainees on a J or Q visa, if they comply with the conditions of the visa.
- Students on an F, J, M or Q visa, if they comply with the conditions of the visa.
- Professional athletes competing in a charitable sports event.
The student and teacher categories run out, which is the part people miss. You are not an exempt individual as a student if you have been exempt as a student, teacher or trainee on an F, J, M or Q visa for any part of more than 5 calendar years — unless you show the IRS that you do not intend to live in the United States permanently and that you have complied with the terms of your visa. You are not an exempt individual as a teacher or trainee if you were exempt as a teacher, trainee or student for any part of 2 of the 6 calendar years before this one, with a narrow exception where a foreign employer paid all of your compensation. Once the exemption runs out, your days count like anyone else's.
There is a second step people forget. To have exempt days or medical-condition days left out of your count, you have to file Form 8843. Qualifying is not enough on its own. If the form is not filed, the days go back into the count, and the count is what decides your status. This is the most common way a student or a researcher becomes a U.S. tax resident without intending to.
The one way out after you meet the test
You can meet the substantial presence test and still be treated as a nonresident. The route is called the closer connection exception, and the IRS sets four conditions. You must meet all of them:
- You were present in the United States for fewer than 183 days during the year.
- You maintained a tax home in one foreign country for the entire year.
- You had a closer connection to that country than to the United States.
- You had not taken steps toward lawful permanent resident status (a green card).
You claim it by filing Form 8840.
Read condition 1 again, because it does not say what people assume. The exception is only available if this year alone was under 183 days. It is aimed at the person who fails on the three-year weighted total, not at the person who spent 200 days in the country this year. Someone who was there 200 days this year cannot use it at all.
Condition 4 closes the door completely for green card applicants. The IRS says you cannot claim the exception if you personally applied, or took other steps during the year, to change your status to lawful permanent resident, or if you had an application for adjustment of status pending during the year. The IRS names the filings that count, including Form I-485, I-130 and I-140.
🇺🇸 If the IRS counts you as a U.S. person
If you are a U.S. citizen, or you hold a green card, this test does not apply to you. You are already a resident for tax purposes, and you already pay U.S. tax on income earned anywhere in the world. Counting your days will not change that, and spending the year abroad will not change it either.
The test still matters to you for one reason: other people in your company.
If you have a co-founder, a spouse or a senior employee who is a foreign national and travels to the United States often, that person's day count decides their tax status. Two things change when they cross the line. Their worldwide income becomes taxable in the United States, not only their U.S. income. And their eligibility as a shareholder changes, which matters if your company is an S-corporation. Under 26 U.S.C. § 1361(b)(1)(C), an S-corporation may not have a nonresident alien as a shareholder. A resident alien may hold shares. The dividing line there is tax residence, not nationality, and the substantial presence test is what draws it.
So the practical job on this side is not to count your own days. It is to know whether anyone connected to your company is about to change status without noticing.
🌏 If it does not
You are the person this rule is written about, and running the count is your job. Nobody runs it for you.
Do these four things.
- Keep a record of your U.S. days as you go. Passport stamps are unreliable and airline emails get deleted. Keep one list, with the arrival and departure date of every trip. You will need it if the IRS asks, and reconstructing it three years later is painful.
- Do the three-year sum before you book, not after you fly. The count is made of decisions you already took two years ago. By December it is too late to fix.
- File Form 8843 every year if you are an exempt individual. The visa gives you the right to exclude the days. The form is what actually excludes them.
- Check the treaty between the United States and your country separately. A tax treaty can change how you are taxed. It does not change how the IRS counts days.
One more warning. Owning a U.S. company does not put you into this count, and it does not take you out of it. You can own a Wyoming LLC, hold an EIN, and sell to American customers, and remain a nonresident. Your status depends on your body, not on your company.
Where the two lanes split
| 🇺🇸 U.S. person | 🌏 Not a U.S. person | |
|---|---|---|
| Does this test apply to you? | No. You are already a resident for tax | Yes. Every year |
| What decides your status | Citizenship, or the green card test | The day count in this article |
| What the U.S. taxes | Everything you earn, anywhere | Only income connected to the United States |
| What happens if you meet the test | Nothing changes. You were already taxed this way | Your worldwide income becomes taxable in the United States |
| Can you get out of it? | Not by counting days | Only through the closer connection exception, and only if you were under 183 days this year |
| Forms attached to the rule | None | Form 8843 for exempt days, Form 8840 for the closer connection exception |
| S-corporation shares | You can hold them | Not while you are a nonresident alien (26 U.S.C. § 1361(b)(1)(C)) |
Common mistakes
🇺🇸 If the IRS counts you as a U.S. person
- Assuming the test applies to you and that fewer U.S. days will lower your tax. It will not. Citizens and green card holders are taxed on worldwide income regardless of where they spend the year.
- Forgetting that a foreign co-founder can quietly become a U.S. resident by visiting, and that this can break an S-corporation election.
- Mixing up two different questions: whether someone is a resident for immigration, and whether they are a resident for tax. The answers are set by different rules.
🌏 If it does not
- Counting only this year's days. The rule adds one third of last year and one sixth of the year before, and most people who cross the line cross it on the older years.
- Treating a short layover as if it were nothing. A day counts if you were present at any time during that day.
- Qualifying as an exempt individual and never filing Form 8843. Without the form, the days are counted, and the exemption you qualified for does nothing.
- Assuming the closer connection exception is a general escape route. It is closed to anyone who was in the United States 183 days or more this year, and to anyone who applied for a green card during the year.
FAQ
How exactly do I calculate the substantial presence test?
Add all your U.S. days from this year, one third of your U.S. days from last year, and one sixth of your U.S. days from the year before that. If the total is 183 or more, and you were in the United States at least 31 days this year, you meet the test. Example: 130 days a year for three years gives 130 + 43 + 22 = 195 days, which is over the line.
Does a layover in the United States count as a day?
Usually yes. A day counts if you were physically present at any time during the day. There is one exception: a stay of less than 24 hours while you are in transit between two places outside the United States does not count.
I am on an F-1 student visa. Do my days count?
Not for the first few years, as long as you comply with the conditions of the visa. Students on F, J, M and Q visas are exempt individuals, which means the IRS does not count their days. Two limits apply. The student exemption lasts for 5 calendar years in total, after which your days start counting unless you convince the IRS you do not intend to stay permanently. And you must file Form 8843 to have the exempt days left out. If you do not file it, the days are counted like anyone else's.
I met the test but I live abroad. Can I still be treated as a nonresident?
Only through the closer connection exception, and only if you were in the United States for fewer than 183 days this year. You also need a tax home in one foreign country for the whole year, a closer connection to that country than to the United States, and no steps taken toward a green card. You claim it on Form 8840.
Does forming a U.S. LLC put me into the count?
No. Where your company is registered has nothing to do with where you are physically present. Many nonresidents own U.S. companies and never meet the substantial presence test.
Will the IRS tell me when I cross the line?
No. There is no notification. The count is based on your own travel record, and the responsibility to run it is yours.
I am a U.S. citizen living abroad. Do I need to run this test?
No. Citizens and green card holders are U.S. persons for tax regardless of day count, and they are taxed on their worldwide income. The test exists to decide the status of people who are not already U.S. persons.