The substantial presence test
If you are not a US citizen or green card holder, the substantial presence test decides whether the US taxes you as a resident on your worldwide income. You meet it if you were physically present in the United States on at least 31 days this year and at least 183 days across three years, counting every day this year, a third of last year's days, and a sixth of the days from the year before that.
The three-year figure is a weighted total, not days in a single year. That is the most common misreading, and it is why someone who spends about 122 days a year in the US can meet a test that looks like it needs 183.
Run the substantial presence test
Which days do not count?
Not every day you are physically in the country is a day of presence. These are excluded, and excluding some of them requires a form.
How the count works
- The first half of the test. You must be physically present in the United States on at least 31 days during the current calendar year. Fail this and the test is over, no matter how many days you were here in the two prior years. IRC 7701(b)(3)(A)(i)
- The second half of the test. Add all your days in the current year, plus one third of your days in the year before, plus one sixth of your days in the year before that. If the weighted total equals or exceeds 183 days, and you also had 31 days in the current year, you meet the test. IRC 7701(b)(3)(A)(ii)
- The three multipliers that build the 183 day total. A day in the current year counts as a full day, a day in the first preceding year counts as one third of a day, and a day in the second preceding year counts as one sixth of a day. These are multipliers fixed by statute, not percentages and not rounded. IRC 7701(b)(3)(A)(ii), applicable multiplier table
- For this test the United States means the 50 states and the District of Columbia, the territorial waters, and the seabed and subsoil of adjacent submarine areas the US has exclusive rights to exploit. It does not include US territories or US airspace, so flying over does not create a day. Pub. 519 (2025), chapter 1, Substantial Presence Test
- You are treated as present on any day you are physically in the country at any time during that day. A few minutes counts as a whole day unless one of the exceptions below applies. IRC 7701(b)(7)(A)
Student, teacher and diplomatic visas
- Days you are an exempt individual do not count. Exempt individual does not mean exempt from US tax. It means you fall into one of four categories: a foreign government related individual on an A or G visa, a teacher or trainee on a J or Q visa, a student on an F, J, M or Q visa, or a professional athlete competing in a charitable sports event. IRC 7701(b)(3)(D)(i) and 7701(b)(5)
- An individual temporarily present on an A or G visa, other than A-3 or G-5, is a foreign government related individual and none of their days count. The category covers a full time employee of an international organization, someone present by reason of diplomatic status, and someone on a visa the Treasury treats as full time diplomatic or consular status, so long as the visa does not itself grant lawful permanent residence. There is no year limit, and the amount of time actually spent here does not change it. IRC 7701(b)(5)(B); Reg. 301.7701(b)-3(b)(2); Pub. 519 (2025), Foreign government-related individuals
- A personal employee, attendant or domestic worker present on an A-3 or G-5 visa is not a foreign government related individual and must count every day of presence. Pub. 519 (2025), Household staff exception
- Immediate family of an exempt individual are exempt individuals themselves, in the foreign government related, teacher and trainee, and student categories alike. Immediate family means the spouse and unmarried children whose visa status derives from and depends on the exempt individual's, and unmarried children count only if they are under 21, live regularly in the household, and are not members of another household. Attendants, servants and personal employees are never immediate family. Reg. 301.7701(b)-3(b)(8); Pub. 519 (2025), Foreign government-related individuals, Teachers and trainees, Students
- A teacher or trainee on a J or Q visa is not an exempt individual for the current year if they were exempt as a teacher, trainee or student for any part of 2 of the 6 preceding calendar years. Relief exists, and it needs all four of these: they were exempt for 3 or fewer of the 6 preceding years, a foreign employer paid all their compensation this year, they were present as a teacher or trainee in any of the 6 prior years, and a foreign employer paid all their compensation in each of those prior years they were here as a teacher or trainee. IRC 7701(b)(5)(E)(i); Reg. 301.7701(b)-3(b)(7)(i) and (ii); Pub. 519 (2025), Teachers and trainees
- A student on an F, J, M or Q visa is not an exempt individual if they have been exempt as a teacher, trainee or student for any part of more than 5 calendar years. Unlike the teacher rule, which looks back only 6 years, the student rule names no lookback period at all, so exempt years from any earlier stay still count, and years exempt as a teacher or trainee count toward the 5. They can keep the exemption past 5 years only by establishing both that they do not intend to reside permanently in the US and that they have substantially complied with their visa. IRC 7701(b)(5)(E)(ii); Reg. 301.7701(b)-3(b)(7)(iii); Pub. 519 (2025), Students
- A professional athlete temporarily in the US to compete in a charitable sports event can exclude only the days they actually competed. Days spent practising, doing promotional work, or travelling between events all count. The event must mainly benefit a qualified charity, send all net proceeds to it, and use volunteers for substantially all the work. IRC 7701(b)(5)(A)(iv); Reg. 301.7701(b)-3(b)(5) for the days actually competed limit; Pub. 519 (2025), Professional athletes
Other days that do not count
- Days you commute to work in the US from a residence in Canada or Mexico do not count, if you commute regularly. Regularly means on more than 75 percent of the workdays in your working period, and commute means travelling to work and back home inside a 24 hour period. Workdays are the days you work in the United States or in Canada or Mexico, so days worked at home sit in the denominator and pull the percentage down. IRC 7701(b)(7)(B); Reg. 301.7701(b)-3(e) for the 75 percent test; Pub. 519 (2025), Regular commuters from Canada or Mexico
- Days you are in the US for less than 24 hours while in transit between two places outside the US do not count. Changing planes counts as transit. Attending a business meeting does not, even if the meeting is held inside the airport. IRC 7701(b)(7)(C); Reg. 301.7701(b)-3(d); Pub. 519 (2025), Days in transit
- Days you are temporarily in the US as a regular crew member of a foreign vessel engaged in transport between the US and a foreign country or a US territory do not count. The exception is lost for any day you otherwise carry on a trade or business in the US. IRC 7701(b)(7)(D); Pub. 519 (2025), Crew members
- Days you intended to leave but could not, because of a medical condition or problem that arose while you were in the US, do not count. It must have arisen here: a condition that existed before you arrived and that you knew about never qualifies, and neither does returning to the US for treatment of a condition from an earlier stay, or staying on past a reasonable period once you were able to leave. Whether you intended to leave on a particular day is decided on all the facts and circumstances. IRC 7701(b)(3)(D)(ii); Reg. 301.7701(b)-3(c); Pub. 519 (2025), Medical condition
- Days you are in the US under a NATO visa as a member of a force or civilian component do not count. A dependent family member present on a NATO visa gets no exception and must count every day. Pub. 519 (2025), chapter 1, Days of Presence in the United States; Instructions for Form 8843 (2025), Days of presence in the United States, item 5
Form 8843, and what a late one costs
- If you exclude days as a teacher or trainee, as a student, as a professional athlete at a charitable sports event, or because a medical condition kept you here, you must file a fully completed Form 8843. Attach it to your income tax return, or if you do not have to file a return, mail it on its own to the IRS service center in Austin, Texas by the Form 1040-NR due date. Someone present on an A or G visa other than A-3 or G-5 is an exempt individual but is not required to file Form 8843. Pub. 519 (2025), Form 8843; Instructions for Form 8843 (2025), Who Must File, When and Where To File
- If you were required to file Form 8843 and did not file it on time, you cannot exclude the days you were present as a professional athlete or because of a medical condition that arose while you were in the US. Publication 519 and the Form 8843 instructions both limit the penalty to those two categories. You are not penalized if you can show by clear and convincing evidence that you took reasonable actions to become aware of the filing requirement and significant steps to comply with it. Reg. 301.7701(b)-8(d); Pub. 519 (2025), Form 8843; Instructions for Form 8843 (2025), Penalty for Not Filing Form 8843
When your US residency starts and ends
- Meet the test and you are a US resident for tax purposes for that calendar year, and in your first year of residency from your residency starting date onward. Your worldwide income is subject to US income tax the same way a citizen's is, at the same graduated rates, reported on Form 1040 with the same filing statuses and deductions. IRC 7701(b)(1)(A)(ii); Pub. 519 (2025), chapter 4, Resident Aliens
- If you meet the test for a calendar year and were not a US resident at any time in the year before, your residency starts on the first day you were present in the US during that year, and you are a nonresident for the part of the year before that date. IRC 7701(b)(2)(A)(i) and (iii); Pub. 519 (2025), Residency starting date under substantial presence test
- If you meet both the substantial presence test and the green card test, residency starts on the earlier of the first day present under the substantial presence test and the first day present as a lawful permanent resident. Pub. 519 (2025), Residency starting date under green card test
- If you were a US resident during any part of the preceding calendar year and are a resident for any part of the current year, you are treated as a resident from January 1 of the current year. There is no fresh start date in that situation. Pub. 519 (2025), Residency during the preceding year
- If you were a US resident this year but are not a resident during any part of next year, residency ends on December 31 unless you qualify for an earlier date. The earlier date, where you met the substantial presence test, is the last day you were physically present in the US. IRC 7701(b)(2)(B); Pub. 519 (2025), Last Year of Residency
- The earlier termination date is available only if, for the rest of the year, your tax home was in a foreign country and you had a closer connection to that country than to the US, and you are not a US resident at any time in the following year. You must file a signed statement under penalties of perjury to establish the date. IRC 7701(b)(2)(B)(ii) and (iii); Pub. 519 (2025), Statement required to establish your residency termination date
- If you are a US resident during any part of next year and a resident during any part of this year, you are treated as a resident through the end of this year, whatever your closer connection was. Pub. 519 (2025), Residency during the next year
- Up to 10 days of actual presence can be disregarded when fixing your residency starting date or your residency termination date, for days in a period where you had a closer connection to a foreign country and your tax home was there. The 10 days can be spread across more than one period, but a period counts only if every day in it can be excluded. Claiming it at the start of residency requires a signed statement filed by the Form 1040-NR due date. IRC 7701(b)(2)(C); Pub. 519 (2025), De minimis presence
- The 10 de minimis days move your residency start or end date only. Pub. 519 states twice that you must still include those days when working out whether you meet the substantial presence test. IRC 7701(b)(2)(C), which applies only to the residency date rules; Pub. 519 (2025), Residency starting date and De minimis presence
What people get wrong about the substantial presence test
- The 183 is a weighted three-year total, not days in one year. You can be under 183 days in the current year, every year, and still meet the test: 122 days a year for three running years weights to exactly 183, and the statute says equals or exceeds. This is the single most common misreading of the rule. IRS source
- The 31 day requirement is a separate gate, not a lower alternative. The IRS worked example of 120 days in each of three years fails the test at 180 weighted days even though the 31 days is easily met, and both conditions must hold in the same year. IRS source
- A day is any day you were physically in the US at any time during that day. Landing at 11pm and leaving the next morning is two days, not one, unless the under 24 hour transit exception applies. IRS source
- Exempt individual does not mean exempt from US tax. It means the day does not count toward the presence total. An exempt individual can still owe US tax on US source income. IRS source
- The student and teacher exemptions run out. A teacher or trainee loses it once they were exempt for any part of 2 of the 6 preceding calendar years, and a student loses it after more than 5 calendar years. Students often cross the test in year six without noticing that their days started counting. IRS source
- The 5 year student limit counts calendar years, not 12 month periods, and any part of a year counts as a whole year. Arriving in December burns a full year. It also has no lookback window, so exempt years from an earlier stay, and years exempt as a teacher or trainee, still count toward the 5. IRS source
- An F-2 or J-2 dependent is an exempt individual in their own right. The spouse and the under 21 unmarried children of an exempt student, teacher or trainee are covered when their visa status derives from the exempt individual's, so their days do not count either. IRS source
- An A-3 or G-5 visa holder is not a foreign government related individual. Domestic staff of a diplomat count every single day, while the diplomat counts none. IRS source
- The medical exception only covers a condition that arose while you were in the US. A flare-up of something you already had and knew about before you arrived does not exclude a single day, and neither does coming back for treatment of a condition from an earlier trip. IRS source
- The late filing penalty for Form 8843 is narrower than the IRS website suggests. Publication 519 and the Form 8843 instructions both say a late form costs you only the professional athlete days and the medical condition days. The IRS substantial presence test web page states it more broadly, as exempt individual days generally. File on time either way, because the form is required whichever reading is right. IRS source
- Meeting the test is not the end of the road. The closer connection exception can still keep you a nonresident if you were present fewer than 183 days in the current year, had a tax home abroad and a closer connection to that country, but it is claimed on Form 8840, a different form from the 8843. IRS source
- The de minimis 10 days is not a free allowance against the test. It moves your residency start or end date only, and Pub. 519 says plainly that those same days must still be included when you check whether you meet the substantial presence test. IRS source
- Residency does not restart each January. If you were a US resident during any part of the previous calendar year and are a resident for any part of this one, you are treated as a resident from January 1, so a mid-year arrival gets no partial year. IRS source
- The regular commuter exception has a threshold most readers miss. Commuting from Canada or Mexico excludes days only if you commute on more than 75 percent of the workdays in your working period, and only where the round trip fits inside 24 hours. IRS source
- Being in transit is narrow. Changing planes on the way to a foreign destination is transit, but attending a business meeting is not, even if the meeting is inside the airport terminal, and that turns the stopover into a counted day. IRS source
- A charitable event athlete excludes only days actually competed. Practice days, promotional appearances and travel between events all count toward the test. IRS source
- US territories and US airspace are outside the definition of the United States for this test, so a day in Puerto Rico or Guam, or a flight passing overhead, is not a day of presence. IRS source
What happens if you meet it?
You are taxed as a US resident: worldwide income on Form 1040, the same rules as a citizen, for the whole year, or from your residency starting date onward if this is your first year of residency. Meeting the test is not the end of the question though. Two separate escapes exist, and they are different things:
- The closer connection exception is US domestic law. If you were here fewer than 183 actual days this year and kept a tax home and closer ties to one foreign country, Form 8840 can keep you a nonresident.
- A tax treaty tie-breaker is separate, uses different tests, and is claimed on a different form. See US tax treaties by country for the country-by-country rules.
Which forms does this involve?
| Form | What it does |
|---|---|
| Form 8843 | Statement for Exempt Individuals and Individuals With a Medical Condition: the form that explains why you are excluding days of presence, required for teacher and trainee days, student days, charitable sports event days and medical days. |
| Form 1040 | The return you file once you meet the test, because you are then taxed as a US resident on worldwide income. |
| Form 1040-NR | The nonresident return, and the form whose due date sets the deadline for a standalone Form 8843 and for the residency start and end date statements. |
| Form 8840 | Closer Connection Exception Statement for Aliens: the separate claim that keeps you a nonresident even though you met the substantial presence test. Form 8843 does not make that claim. |
Counting after the fact is the hard part, because the answer depends on days you have to remember months later. Spyglass Beacon is a paid app that keeps the running count and warns you before you cross a line. We link it because it is a sister site, not because we are paid for the click.
Sources
Every rule and figure on this page was read on an IRS page or in an IRS document, and checked a second time by a separate review, on September 16, 2026.
- irs.gov/individuals/international-taxpayers/substantial-presence-test
- irs.gov/publications/p519
- irs.gov/individuals/international-taxpayers/exempt-individual-who-is-a-student
- irs.gov/pub/irs-pdf/f8843.pdf
- irs.gov/individuals/international-taxpayers/resident-aliens
- irs.gov/individuals/international-taxpayers/closer-connection-exception-to-the-substantial-presence-test
- irs.gov/forms-pubs/about-form-8843