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 F-1 students get special treatment. An F-1 student is generally exempt from counting days for their first five calendar years in the US. A J-1 student is exempt for their first two calendar years. J-1 teachers/researchers are exempt for two of the last six calendar years.
"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 start counting and may become a resident alien mid-year.
Becoming a Resident Alien Mid-Year
When someone crosses the substantial presence threshold mid-year, they're considered a dual-status alien. They're an NRA for the part of the year before they met the test, and a resident alien for the rest. Payroll withholding must switch at the transition 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.
