IRS Substantial Presence Test (3-Year Weighted Formula) Calculator
The IRS Substantial Presence Test makes a non-US citizen a US tax resident if they spend at least 31 days in the US during the current year and their 3-year weighted total—100% of current-year days plus one-third of prior-year days plus one-sixth of second-prior-year days—equals 183 days or more.
Configure Your Scenario
Count all calendar days present in the US this year (Jan 1 – Dec 31), including planned future trips.
Total days spent in the US last calendar year (multiplied by 1/3 in IRS formula).
Total days spent in the US two calendar years ago (multiplied by 1/6 in IRS formula).
Allows you to stay up to 182 days in the current year even if the 3-year weighted formula hits 183+.
Your IRS weighted count is 150.0 days — safely below the 183-day Substantial Presence threshold.
With 95 current-year days + 40.0 (1/3 of 120) + 15.0 (1/6 of 90) = 150.0 weighted days, you do not trigger US tax residency this year. You can spend up to 127 total days in the US this year before hitting 183 weighted days.
Recommended Action Plan & Compliance Steps
- 1Keep your total current-year US stay at or below 127 days (32 additional days available this year without triggering Form 8840).
- 2Remember the "121-Day Golden Rule": if you visit the US every single year for the same duration, spending 121 days/year equals 121 + 40.33 + 20.17 = 181.5 weighted days (always safe without paperwork).
- 3Download your official CBP I-94 Travel History at i94.cbp.dhs.gov to verify the exact entry and exit dates recorded by US Customs and Border Protection.
- 4Carry a verifiable onward flight reservation departing the United States before your B1/B2 or ESTA admission stamp expires, and keep a copy for your IRS day-count audit file.
Real Amadeus/Sabre GDS flight reservations from $7 (2–20 min Instant or 14h Standard delivery) and official Proof of Accommodation.
Understanding the IRS 3-Year Substantial Presence Formula & Form 8840
Many Canadian snowbirds, European founders, and international investors believe they can spend 180 days every year in the United States on a B1/B2 visa without tax consequences. Because the IRS uses a 3-year weighted lookback formula, spending more than 121 days per year in the US triggers the Substantial Presence Test.
How the 121-Day Annual Limit & Fractional Days Work
- • The Exact IRS Formula: The IRS adds 100% of your days in the current calendar year + 1/3 of your days in the first preceding year + 1/6 of your days in the second preceding year. If the sum is 183.0 or higher (and current-year days >= 31), you pass the Substantial Presence Test.
- • Fractional Days Are NOT Rounded Down: If 122 days each year gives 122 + 40.67 + 20.33 = 183.0 days, you trigger US tax residency! That is why 121 days/year (181.5 weighted days) is the universal safe ceiling for annual visitors.
- • Commuters & Transit Exceptions: Regular commuters from Canada or Mexico who commute to work in the US on >75% of workdays, or travelers in continuous international airport transit (<24 hours between two foreign points), may exclude those specific days.
- • Exempt Individuals (F-1, J-1, A, G Visas): International students (typically first 5 calendar years on F-1), teachers/trainees (J-1), and diplomats exclude their days by filing IRS Form 8843.
How Form 8840 (Closer Connection Exception) Saves Snowbirds & Nomads
- • Who Qualifies for Form 8840: If your 3-year weighted total is 183 or more, you can STILL avoid US tax residency if (1) you spent fewer than 183 actual days in the US in the current year, (2) you maintained a "tax home" in a foreign country all year, and (3) you had a closer connection to that single foreign country than to the US.
- • Why Digital Nomads Often Fail Form 8840: Form 8840 requires a closer connection to ONE specific foreign country where you maintain a permanent home, bank accounts, driver’s license, and tax registration. Perpetual travelers hopping across 8 countries with no fixed tax home may not qualify.
- • Strict Filing Deadline: Form 8840 must be mailed to the IRS by June 15 of the following year (or April 15 if you also file Form 1040-NR). Missing the deadline can void the exception and trigger FBAR / FATCA penalties on foreign bank accounts.
- • Immigration vs. Tax Rules: Even if a CBP officer stamps your B1/B2 visa for 6 months (180 days), CBP enforces immigration law while the IRS enforces tax law—staying the full 180 days for two years in a row triggers the IRS threshold.
IRS Substantial Presence Test: Scenarios & Filing Requirements
How current-year days and 3-year weighted totals interact with IRS forms and tax residency
| Current-Year US Days | 3-Year Weighted Total | IRS Tax Status | Required IRS Action |
|---|---|---|---|
| 0 – 30 Days | Any number (even >183) | Non-Resident Alien (Safe) | None — automatically exempt under 31-day rule |
| 31 – 121 Days (Every Year) | Up to 181.5 Weighted Days | Non-Resident Alien (Safe) | None — stays below 183 weighted threshold |
| 122 – 182 Days | 183.0+ Weighted Days | Conditionally Exempt if Closer Connection | Must file IRS Form 8840 by June 15 to avoid US tax |
| 122 – 182 Days (No Tax Home) | 183.0+ Weighted Days | US Resident Alien (Taxable Worldwide) | Subject to Form 1040, FBAR & FATCA unless treaty applies |
| 183+ Days in Current Year | 183.0+ Weighted Days | US Resident Alien (Form 8840 Disqualified) | Worldwide US tax unless Treaty Tie-Breaker Form 8833 filed |
Frequently Asked Questions — US Substantial Presence Calculator
If my ESTA allows 90 days per trip and I visit twice a year (180 days), am I a US tax resident?
Yes, unless you qualify for and file Form 8840 or a tax treaty tie-breaker. Spending 180 days in a single calendar year already puts you within 3 days of automatic residency, and if you spent even 9 days in the US the previous year (9 ÷ 3 = 3), your weighted total hits 183 days.
Does the IRS round down fractional days from the 1/3 and 1/6 calculation?
No. The IRS only excludes fractional days if the final sum of the 1/3 and 1/6 fractions leaves a fraction below 183 (for example, 182.67 days is under 183). When adding the 1/3 and 1/6 components together, you must keep the exact fractions before checking whether the total equals or exceeds 183.0.
What happens if I accidentally trigger the Substantial Presence Test without filing Form 8840?
If you become a US tax resident under the Substantial Presence Test, you are taxed on your worldwide income just like a US citizen or Green Card holder. Even worse, you become subject to FinCEN Form 114 (FBAR) on foreign bank accounts exceeding $10,000 and IRS information returns (Forms 5471, 8938, 3520) for foreign companies or trusts, which carry $10,000+ civil penalties per unfiled form.
Can a day spent flying through a US airport between Canada/Latin America and Europe be excluded?
Under the IRS international transit exception, if you are travelling between two foreign points and are physically present in the United States for less than 24 hours solely for the purpose of catching a connecting flight, that transit day does not count toward the Substantial Presence Test.
Related Travel & Visa Calculators
Explore more free interactive compliance calculators and travel planners.
Schengen 90/180-Day Calculator
Calculate your exact remaining legal days in the Schengen Area under the rolling 180-day lookback window, including Bulgaria & Romania inclusion and EES automated tracking rules.
Visa Run & Border Hop Planner
Evaluate your immigration red-flag risk before executing a same-day or weekend visa run in Thailand, Vietnam, Bali, Colombia, or the Balkans, and find the safest neighbor reset hub.
183-Day Tax Residency Tracker
Track your cumulative days in any country against the statutory 183-day tax residency threshold and check whether a long-term apartment lease triggers earlier "Center of Vital Interests" tax liability.
Visa Overstay Fine Calculator
Calculate your exact daily visa overstay fine in local currency and USD, compare voluntary airport surrender vs. checkpoint arrest penalties, and check whether your overstay triggers a re-entry blacklist ban.
Extension vs. Border Run Calculator
Compare total cash cost, immigration queue hours, and extra stay days gained between an in-country visa extension and a weekend regional flight hop.
Passport Stamp Space Forecaster
Calculate how many months and trips remain before your passport hits the critical 2-blank-page airline denial threshold, factoring in full-page sticker visas and biometric e-Gates.
