Calculation rules: Jan 1, 2026
NRA_WITHHOLDINGMarch 5, 2026Last reviewed October 7, 20266 min read

Substantial Presence Test: Resident Alien or Not?

The substantial presence test decides whether a foreign national is a resident alien for US tax purposes. Here is how the day count works.

Run a simplified substantial presence check in the NRA Tax Wizard
Open Calculator →

Why This Test Matters for Payroll

How you withhold federal income tax from a foreign employee depends fundamentally on whether they're a resident alien or a nonresident alien (NRA) for tax purposes. Resident aliens are taxed like US citizens — standard W-4, full tax bracket rates, no special withholding rules. NRAs face different rules: no personal exemptions, specific withholding rates, and potential treaty application.

The immigration visa alone doesn't determine tax status. An F-1 student can become a resident alien. A green card holder is automatically a resident alien. A business visa holder might qualify after enough time in the US. Payroll teams must track this independently of immigration status.

The Substantial Presence Test Formula

An individual meets the substantial presence test for a calendar year if they were present in the US for:

  • At least 31 days during the current year, AND
  • At least 183 days during the three-year period counting the current year, prior year, and the year before that — using a weighted formula

The weighted formula: count all days present in the current year, plus 1/3 of days in the prior year, plus 1/6 of days two years ago. If that total equals 183 or more, the test is met (assuming 31+ days in the current year).

Example

Employee was present: 2024: 120 days, 2025: 150 days, 2026: 100 days.

Weighted count for 2026: 100 + (150 × 1/3) + (120 × 1/6) = 100 + 50 + 20 = 170. Less than 183 — NRA status for 2026.

Exempt Individuals — Days That Don't Count

Certain categories of individuals have "exempt" days that are excluded from the substantial presence count. This is where students get special treatment. F-1 and J-1 students are generally exempt from counting days for their first five calendar years in the US. J-1 non-students (teachers, researchers, trainees) are exempt for two of the last six calendar years — a different and much shorter window. Mixing these two rules up is one of the most common errors in NRA payroll.

"Exempt" doesn't mean tax-exempt — it means exempt from counting those days toward substantial presence. An F-1 student in year five still doesn't count US days toward substantial presence. In year six, they generally start counting (unless they can show they do not intend to reside permanently in the US) and may become a resident alien.

Days excluded as an exempt individual are reported on Form 8843. A separate closer-connection exception, claimed on Form 8840, can apply to some people who meet the substantial presence test but keep a tax home in, and a closer connection to, a foreign country. Check it before treating an employee as a resident alien, and see IRS Publication 519 for the exact conditions.

Becoming a Resident Alien Mid-Year

A dual-status year usually arises in the year someone arrives in or leaves the US. When the substantial presence test is met, residency generally starts on the first day the person is present in the US that calendar year, not on the day the count reaches 183, and they are a nonresident alien only for the part of the year before that date.

Dual-status years create additional complexity at tax filing time — the individual files a dual-status return with different rules applying to each period. Your job as payroll is to apply the correct withholding rules for each period and issue a W-2 that reflects the full year's wages.

Practical Record Keeping

Track entry and exit dates for any employee who might be subject to the substantial presence test. US Customs records, travel records, and employee-provided documentation all work. The burden of proving exempt days falls on the employee — they must maintain records to demonstrate they qualify for the exemption.

For employees approaching the five-year exemption period end, build a flag into your payroll system to review their status before the year begins. An employee who becomes a resident alien January 1 needs a W-4 on file, not a Form 8233.

Related reading

Residency status decides whether treaty benefits apply at all. See which treaties exempt student wages, by country, and Form 8233 vs W-8BEN for which form claims the treaty benefit once an employee is a nonresident.

Sources

Related articles

Need to run the numbers?

Free payroll calculators — no account required.

Browse Calculators →