Substantial Presence Test Calculator

About this site

What it does

The calculator counts days in the United States and applies the 31-day test and the 183-day weighted total: all days in the current year, one-third of the days in the first year before, and one-sixth of the days in the second year before. It can also count days from trips entered as dates and find the date in the current year on which the test is met. The calculation runs in your browser.

Rules used

The rules follow the IRS substantial presence test page and Publication 519, chapter 1. The guides cover exempt individuals, days that are not counted, the closer connection exception, Forms 8843 and 8840, and dual-status years. If the IRS changes a rule, the pages are updated and the update date at the bottom of each page changes.

Updated: November 4, 2026