U.S. Substantial Presence
Test Calculator

IRS — Internal Revenue Service

IRC §7701(b) · 31-Day & 183-Day Tests
📋

A non-U.S. citizen becomes a U.S. resident alien for tax purposes when they meet both the 31-day test and the weighted 183-day test under IRC §7701(b)(3). Any portion of a day counts as a full day. Days as an exempt individual (F/J/M/Q students, J/Q teachers and trainees, foreign-government personnel, certain medical situations) are excluded from the count.

The 183-day formula
1 × days in test year + ⅓ × days in prior year + ⅙ × days in 2 years prior — combined total must reach 183 to be a U.S. tax resident — AND at least 31 days in test year
The IRS evaluates your status one year at a time. Pick the calendar year you want tested — the formula uses that year plus the two before it.
Your Trips to the United States
Entry date Exit date Days Exempt
No trips added yet — click below to begin
When to mark a trip "exempt" Tick the Exempt box for any period during which you were an exempt individual under IRC §7701(b)(5) — i.e. an F-1, J-1, M-1 or Q student in your first 5 calendar years; a J-1 or Q teacher/trainee in 2 of the prior 6 years; foreign-government personnel on an A or G visa; or a professional athlete competing in a charitable sports event. Days marked exempt are excluded from the SPT day count entirely. If you are unsure, leave it unchecked — the calculator will treat the days as counted, which is the conservative assumption.
Verdict
?
31-Day Test
0 weighted days 183-day threshold
U.S. Immigration & Visa Strategy

Concerned a visa change could trigger U.S. tax residency?

The Substantial Presence Test interacts directly with visa choices for non-immigrants (B-1/B-2, L-1, E-2, O-1, H-1B). Choosing the wrong category — or staying on the right one too long — can convert worldwide income into a U.S. tax problem. Speak with a U.S. immigration attorney before the threshold is reached, not after.

Contact Simone Bertollini, Esq. →
Background

How the U.S. Substantial Presence Test Actually Works

Most non-U.S. citizens become U.S. tax residents not by getting a green card, but by accidentally crossing the Substantial Presence Test. The rule is mechanical, the math is unforgiving, and it operates without regard to your visa category.

The Substantial Presence Test (SPT) is set out in Internal Revenue Code §7701(b)(3). It has two prongs and you must meet both to be classified as a U.S. resident alien for a given calendar year. The first is a simple minimum: at least 31 days of physical presence in the United States during that calendar year. The second is the weighted three-year formula that gives this test its name.

The weighted 183-day formula

Add together: all of your days in the test year, one-third of your days in the year immediately before, and one-sixth of your days in the year before that. If the sum reaches 183, you have met the second prong. The fractions matter — they are why someone who spends 120 days in the U.S. in each of three consecutive years does not become a tax resident: 120 + 40 + 20 = 180, which is below 183.

What counts as a "day"

Any portion of a day spent inside the United States is treated as a full day. Arriving at JFK at 11:55 p.m. counts as one day. Leaving at 12:01 a.m. counts as another. There are narrow exceptions: regular commuters from Canada or Mexico, days you were unable to leave because of a medical condition that arose while you were here, and time spent in transit between two foreign points if you were in the U.S. for less than 24 hours. The Treasury Regulations at §301.7701(b)-3 spell out the details.

Exempt individuals

Days you spent in the U.S. as an exempt individual are excluded from the day count entirely. The principal categories are F-1, J-1, M-1 and Q students (exempt for five calendar years, lifetime); J-1 and Q teachers, researchers and trainees (exempt for two calendar years out of any rolling six); foreign-government personnel and their immediate family on A or G visas; and professional athletes temporarily in the U.S. to compete in a charitable sports event. Exempt status is not automatic — it requires filing Form 8843 annually with the IRS, even if no income is earned.

The closer-connection exception

Even if the formula puts you over 183, you can still be treated as a non-resident under the closer-connection exception in IRC §7701(b)(3)(B). To qualify, you must (i) have been present in the U.S. for fewer than 183 days in the test year itself, (ii) maintain a tax home in a foreign country during the year, and (iii) have a closer connection to that country than to the U.S. The exception is claimed on Form 8840 filed with your Form 1040-NR. It is not available to anyone who has already applied for, or taken steps toward, lawful permanent resident status.

Treaty tie-breakers

The U.S. has income-tax treaties with most major economies, and most of those treaties contain a tie-breaker rule that overrides domestic residency where a person is a tax resident of both countries simultaneously. The hierarchy is typically: permanent home, then center of vital interests, then habitual abode, then nationality, then mutual agreement. Treaty positions must be disclosed on Form 8833. The U.S. does not have an income-tax treaty with Colombia — a meaningful gap for anyone splitting time between the two.

Why this matters for visa strategy

The SPT is one of the most important inputs into U.S. visa planning that almost no immigration website discusses. Choosing between a B-1 visitor visa, an L-1 intracompany transferee visa, an E-2 treaty investor visa, an O-1 extraordinary-ability visa or an H-1B specialty-occupation visa is partly an immigration-law decision — but it is also a tax decision, because each one implies a different physical-presence pattern and a different relationship with the SPT. Once you cross the threshold, you owe U.S. tax on your worldwide income, you become subject to FBAR and FATCA reporting on foreign bank and financial accounts, and you can find yourself filing Forms 8938, 5471, 8865 and 3520 depending on the structures you hold abroad.

The right time to model this is before the visa application is filed, not after the 183rd day has been crossed. If you are weighing a U.S. visa option and want to understand the SPT implications alongside the immigration strategy, consult a qualified U.S. immigration attorney early.

Related

Other tax-residency tools

Colombia Tax Residency Calculator — the 183-day rolling rule under Article 10 of the Estatuto Tributario, with last-possible-exit calculation and per-year breakdown.

Colombian Digital Nomad Visa — Pros, Cons & Tax Reality — first-hand walk-through of the Visa V, why it does not change tax residency, and how a Bancolombia account triggered a DIAN inquiry that turned out to be a templated mass-gestion action.