Substantial Presence Test Calculator
Last updated: September 2026 | By the Domicile365 Editorial Team
Check the 31-day and 183-day Substantial Presence Test thresholds. Select a tax year and enter your countable US days to calculate your weighted total and remaining days. No signup required.
Enter US Presence Days
Weighted Results
Both thresholds must be met. The bar above shows only the weighted-day threshold.
60-day free trial · No credit card required
Do boating and cruise days count?
Being offshore does not automatically exclude a day from SPT. US territorial waters are included in the geographic definition of the United States; specific day exclusions may apply. See Treas. Reg. § 301.7701(b)-1(c)(2) (PDF).
Read counting days on the water before entering boating or cruise totals. For day exclusions and other residency rules, see our Substantial Presence Test guide.
Disclaimer: This calculator is for informational purposes only and does not constitute immigration or tax advice. US federal tax rules are complex and vary by individual circumstances. Consult a qualified CPA or tax attorney for guidance specific to your situation.
Track Your US Days Automatically
This calculator checks the SPT thresholds using the days you enter. The Domicile365 App records your locations and helps organize day counts and supporting records for review with your advisor.
Understanding the US Substantial Presence Test (SPT)
The United States uses the Substantial Presence Test (SPT) to determine whether non-US citizens (who do not hold Green Cards) are considered resident aliens for federal income tax purposes.
1. The Weighted Day Count Formula
The Substantial Presence Test is not a simple calculation of spending 183 days in a single year. Instead, it utilizes a weighted day-count formula looking at your presence over a three-year period.
To meet the test, you must be physically present in the United States for at least 31 days during the current calendar year, and the sum of your weighted days over the three-year period must equal at least 183 days.
The formula is calculated as follows:
Weighted Days Formula:
Weighted Days = (Days in Current Year × 1) + (Days in Last Year × 1/3) + (Days in Two Years Prior × 1/6)
Statutory basis: IRC § 7701(b)(3)(A) (PDF).
Worked Example:
Suppose you spend time in the US as follows:
- Current Year: 120 days
- Last Year: 120 days (weighted: 120 × 1/3 = 40 days)
- Two Years Prior: 120 days (weighted: 120 × 1/6 = 20 days)
Your total weighted days would be: 120 + 40 + 20 = 180 days. Since 180 is less than 183, you do not meet the SPT day-count thresholds. Other residency rules are separate. However, if you spent just 3 more days in the current year, you would reach 183 days and meet the test.
SPT boundary examples
| Selected / prior / two years prior | Weighted total | SPT thresholds |
|---|---|---|
| 122 / 120 / 120 | 182 | Not met; one additional selected-year day reaches 183. |
| 123 / 120 / 120 | 183 | Met; both thresholds are satisfied. |
| 30 / 365 / 365 | 212.5 | Not met; the selected year has fewer than 31 days. |
| 31 / 365 / 365 | 213.5 | Met; the 31-day minimum is now satisfied. |
For example, 10 selected-year days and 365 in each prior year allow 20 additional countable days before reaching 30. The next day, bringing the selected-year total to 31, meets both thresholds.
2. Who Does the Substantial Presence Test Apply To?
SPT is a day-count route to US tax residency for non-US citizens. Green Card status provides a separate residency test.
- US Citizens and Green Card Holders: A below-threshold SPT result does not remove tax obligations arising from citizenship or Green Card status. Residency dates and treaty rules may require separate analysis.
- Other residency rules: This calculator does not evaluate the Green Card Test, residency elections, treaty positions, or the dates a period of residency begins or ends.
- Federal vs. State Residency: The SPT is a federal tax test. Individual states (like California, New York, or Florida) have entirely separate rules for state income tax residency. It is common to be classified as a US resident at the federal level while remaining a nonresident at the state level, or vice versa.
3. The Closer Connection Exception (Form 8840)
Even if your weighted day count equals or exceeds 183 days, you may still be treated as a nonresident alien if you qualify for the Closer Connection Exception.
To qualify for the Closer Connection Exception under IRS rules, you must meet the following:
- You are physically present in the US for fewer than 183 days during the current calendar year.
- You maintain a tax home in a foreign country throughout the year (special rules can apply to a move between two foreign countries).
- You establish that you have a closer connection to that foreign country than to the US (evaluated based on housing, family, vehicle registration, driver's licenses, and social ties).
- You have not taken disqualifying steps toward lawful permanent residence or had a Green Card application pending.
- You file IRS Form 8840 (Closer Connection Exception Statement for Aliens) by the annual filing deadline.
4. Consequences of Meeting the Substantial Presence Test
Meeting the day-count thresholds generally leads to resident-alien treatment unless an exception or applicable treaty provision changes the outcome. Residency dates and individual circumstances determine the resulting obligations, which may include:
- Worldwide Income: Resident-alien treatment generally brings worldwide income into the US tax system, subject to applicable exclusions, credits, and treaty rules.
- FBAR & FATCA Disclosure: Foreign accounts and assets can trigger separate reporting obligations. FBAR and Form 8938 each have their own definitions, thresholds, and filing rules.
- Tax Forms: Resident, nonresident, and dual-status filing requirements differ; this calculator does not determine which return you must file.
5. The First-Year Choice Election
If you do not meet the SPT in your year of arrival but expect to meet it in the following year, you may elect to be treated as a US resident alien for a portion of the arrival year. This is known as the "First-Year Choice". Specific rules require you to be present in the US for at least 31 consecutive days and meet other criteria to qualify.
Substantial Presence Test FAQs
- Transit days where you pass through the US between two foreign points (for less than 24 hours).
- Commuter days for residents of Canada or Mexico who regularly commute to work in the US.
- Days you were unable to leave the US due to a medical condition that arose while in the US.
- Days you are considered an "exempt individual" (like students or scholars).
Leaving the US: Section 877 and the Exit Tax
Meeting SPT alone does not make departure subject to the expatriation exit tax. The expatriation rules concern US citizens relinquishing citizenship and qualifying long-term Green Card holders ending that status. SPT-only years do not count toward the long-term Green Card residency test.
IRC § 877 (PDF) sets out the older regime. For expatriations on or after June 17, 2008, § 877A provides the modern framework, including a deemed sale of most property for covered expatriates, subject to exclusions and special rules. Section 877 remains relevant through definitions and tests incorporated into § 877A.
This calculator does not evaluate expatriation or Form 8854 obligations. See who may face the US exit tax for the long-term residency and covered-expatriate distinctions.
Authority and calculation method
Internal Revenue Code § 7701 (PDF): subsection (b)(3)(A) establishes the 31-day minimum and weighted 183-day test; (b)(3)(B)–(D) addresses exceptions and restrictions, and (b)(7) addresses days of presence.
Treas. Reg. § 301.7701(b)-1 (PDF): paragraph (c)(1) covers the three-year weights, (c)(2) covers physical presence and territorial waters, and (c)(4) addresses the 31-day minimum.
The calculation uses whole countable days and compares the exact weighted total with 183; displayed totals are rounded to two decimals. It does not determine eligibility for exclusions or exceptions. IRS Publication 519 and Forms 8840 and 8843 provide additional guidance.
Related Tax & Residency Tools
Passively Track Your Global Tax Exposure
Avoid accidentally triggering US tax residency or state tax audits. Let the Domicile365 App passively count your days in the background.
Sign up for a free 60-day trial.