VOLUME 1 · CHAPTER 2 OF 8

Counting Days: the Substantial Presence Test and Form 8843

How to count days of presence, which days never count, how long F, J, M and Q students and J-1 scholars stay exempt, when Form 8843 is due even with no income, and the closer connection exception.

6 min readFoundations2 worked examplesupdated 2026-10-01
TRY IT WITH YOUR NUMBERSOpen the full calculator →
Loading the US tax residency checker…
Same formula and engine as the full calculator. Your numbers stay in this browser.

The substantial presence test decides whether most visa holders are taxed as residents or nonresidents, and it turns entirely on counting days. Counting looks simple until you meet the exceptions: days that do not count, people whose days do not count for years at a time, and a short form, Form 8843, that students and scholars must send even when they earned nothing. This chapter shows how to count, who is exempt from counting and for how long, and what to file to prove it.

What counts as a day

Publication 519 treats you as present in the United States on any day you are physically here at any time during the day. Landing at 11 p.m. counts as a full day. So does leaving at 6 a.m.

A few kinds of days are left out of the count:

  • days you commute to work in the US from a home in Canada or Mexico, if you do so regularly;
  • days you are in the US for less than 24 hours while in transit between two places outside the US;
  • days as a regular crew member of a foreign vessel;
  • days you intended to leave but could not because of a medical condition that arose while you were here;
  • days you are an exempt individual, which is the exception that matters most for students and exchange visitors.

The weighted count, worked through

The test needs at least 31 days this year, and at least 183 days when you add all of this year's days, one-third of last year's and one-sixth of the year before. The weighting means a long stay two years ago still counts, just less.

SOMEONE WHO SPENDS ABOUT FOUR MONTHS A YEAR IN THE US, THREE YEARS RUNNING
Days this year
120
Days last year
120
Days the year before
120
Weighted days
180 days
Meets the test
no
Most days this year and stay under
122 days
Computed by the same engine as the calculators. Change the inputs there to see your own.

At 120 days in each of three years, the weighted total is 180 days, so the test is met: no. Staying no more than 122 days this year keeps this person under the line. A business visitor, a remote worker visiting family or a parent on a long visit can cross it without ever living here. Someone who crosses it but stayed fewer than 183 days this year may still be treated as a nonresident under the closer connection exception, described below.

Exempt individuals: when your days do not count

"Exempt" here does not mean exempt from tax. It means your days of presence are not counted for the substantial presence test. The main groups are:

  • Students in F, J, M or Q status who substantially comply with the terms of their visa. Practical training such as OPT and CPT is part of F-1 status.
  • Teachers and trainees in J or Q status, which covers many J-1 researchers, scholars and professors.
  • Their immediate family: a spouse and unmarried children whose status derives from the exempt person's visa, such as F-2 and J-2 dependents.
  • Foreign government-related people in A or G status (other than A-3 and G-5), and professional athletes at a charitable sports event.

The exemption does not last forever, and the way the years are counted surprises people.

Students: five calendar years. You stop being exempt as a student once you have been exempt as a student, teacher or trainee for any part of more than five calendar years. Any part means any part: arriving in late August uses up that whole calendar year. Someone who arrives on an F-1 in August of one year is generally exempt for that year and the next four, and their days start counting on January 1 of the sixth calendar year. Publication 519 allows a longer exemption only if you show you do not intend to live in the US permanently and have substantially complied with your visa.

AN F-1 STUDENT IN THE SIXTH CALENDAR YEAR: ONLY THIS YEAR'S DAYS COUNT, BECAUSE THE EARLIER YEARS WERE EXEMPT
Days this year
330
Days last year
0
Days the year before
0
Weighted days
330 days
Meets the test
yes
Most days this year and stay under
182 days
Computed by the same engine as the calculators. Change the inputs there to see your own.

In that sixth year the earlier years add nothing, because those days were exempt. Even so, 330 days this year alone gives 330 weighted days. Meets the test: yes. The student is now a resident alien for tax while still on an F-1, and chapter 4 explains why that also starts Social Security and Medicare tax on their pay.

Teachers and trainees: two of the previous six. You are not exempt as a J or Q teacher or trainee if you were exempt as a teacher, trainee or student for any part of two of the six preceding calendar years. In practice many J-1 researchers are exempt for two calendar years, and their days count from the third. Publication 519 has a narrow exception when a foreign employer paid all of the compensation.

People who are never exempt. H-1B, H-4, L-1, L-2, O-1, E and TN holders count every day from arrival. Family members follow their own status, not the household's: a spouse in F-2 or J-2 status shares the student's or scholar's exemption, while a spouse in H-4 or L-2 status counts every day.

A change of status changes the count on the day it happens. A student who moves from F-1 to H-1B, for example, starts counting days from the day the H-1B status begins.

Form 8843: the form for people with no income

If you exclude days because you were an exempt individual (or because of a medical condition), you must file Form 8843, Statement for Exempt Individuals and Individuals With a Medical Condition. The form explains why those days should not count. Each exempt person files one, including a spouse and children in F-2 or J-2 status.

The form is required whether or not you had any income. An F-1 student with no job still files it.

  • If you file Form 1040-NR, attach Form 8843 to it.
  • If you do not have to file a return, mail Form 8843 on its own to the Department of the Treasury, Internal Revenue Service Center, Austin, TX 73301-0215, by the due date for Form 1040-NR. That is April 15 of the next year if you had wages subject to withholding, and June 15 if you did not.

The instructions set no fine for a late form. Their stated penalty is narrower: someone who files late may lose the right to exclude days spent here as a professional athlete or because of a medical condition, and counting those days could make them a US resident under the test. They also say no penalty applies if you can show, by clear and convincing evidence, that you took reasonable steps to learn of the requirement and comply with it. For students and scholars the form is still required, so file it on time and keep a copy rather than relying on that relief.

The closer connection exception

Someone who meets the test without being exempt may still be treated as a nonresident if all three of these hold for the year:

  1. they were present in the US for fewer than 183 days during the year;
  2. their tax home (broadly, their main place of work) was in a foreign country;
  3. they had a closer connection to that country than to the US, judged by things such as where their permanent home, family, belongings, bank accounts and driver's license are.

The claim is made on Form 8840, filed by the 1040-NR due date. Publication 519 adds an important limit for visa holders on the path to a green card: you cannot claim a closer connection for any year in which you applied, or took other steps, to become a permanent resident, or had an adjustment of status application pending.

YOUR NEXT STEPSDo this now
  1. List your days for this year and the two before it from your I-94 travel history, then mark which of those days you were an exempt individual and why.
  2. Enter only the days that count in the substantial presence test calculator and note the most days you can spend this year and stay under the line.
  3. If you are or were an F, J, M or Q student, teacher or trainee, write down each calendar year you held that status to see when your exemption ends.
  4. If anyone in your household was an exempt individual last year, file Form 8843 for each of them by the 1040-NR due date, even with no income. Keep a copy.
  5. If you are unsure whether your activities kept you in valid status, ask your school's designated official or an immigration attorney before you rely on the exemption.

This chapter describes IRS Publication 519 and the Form 8843 instructions in general terms. It is not personal tax advice; your exact days and visa history decide your status.

KEY TERMS
Substantial presence testResident and nonresident alien (for tax)Exempt individual (substantial presence test)Form 8843
SOURCES
Saved in this browser. Sign in to keep it on every device.
WORK IT OUT WITH YOUR NUMBERS
Nonresident spouse: §6013(g) election vs MFS/HoH →Should my nonresident spouse and I file jointly or separately?
QUICK ANSWERS
What is the substantial presence test? →