Many people believe they only have to pay taxes to a foreign government if they are legal citizens or permanent residents. However, this isn’t always the case. According to the IRS Substantial Presence Test, workers without U.S. citizenship or permanent residency may have to pay taxes if they have been in the country for a certain number of days over the past three years.
Consider working with a financial advisor who specializes in taxes to help lower future tax liability.
What Is the IRS Substantial Presence Test for U.S. Residents?
The Internal Revenue Service (IRS) Substantial Presence Test is the United States government’s standard for determining how much tax you are to pay based on the last three years spent in the United States. The rule applies to individuals living or working in the United States without U.S. citizenship or permanent residency status.
The test calculates days spent in the United States with the following two criteria:
- Being physically in the United States for at least 31 days in the current year
- Being physically in the United States for 183 days or more, counting back from the past three years
However, the IRS counts each year differently. The current year has all its days counted. The year before has one-third of its days counted, and the year prior has one-sixth of its days counted.
If this formula shows you’ve been in the United States at least 183 days in the last three years, you have resident status for tax purposes. This means you will owe taxes to the IRS on all income, no matter the country in which you earned money. A result of fewer than 183 days means you are a nonresident for tax purposes and will owe the IRS for the income earned in the United States but not elsewhere.
U.S. citizens and lawful permanent residents are exempt from this rule.
How to Determine an Individuals Tax Residency Status
Several factors help determine your tax residency status.
Specifically, there are certain days that do not count toward the Substantial Presence Test.
- Workdays where you commute to the U.S. for work at least 75% of the year from Canada or Mexico, where you hold the primary residence
- Days in which you spent less than 24 hours in the United States while traveling from one foreign country to another
- If you visit the United States as a crew member of a foreign vessel
- If you have to spend time in the United States because you get sick while visiting and can’t leave
- If you’re from a foreign government on an A or G visa
- If you’re a teacher or intern with a J or Q visa
- If you’re a student with an F, J, M or Q visa
- If you’re a professional athlete competing in a charity event
Tax Residency Examples
The Substantial Presence Rule can be complex, and examples can help make it concrete.
Case Study #1
Let’s say you are a teacher who is a citizen and resident of a country other than the United States. On January 1, 2025, you entered the U.S. for the first time to work as a teacher with a J-1 three-year visa. You followed the rules of your visa and did not seek a change in your immigrant status. Your J-1 visa exempts you from resident tax status until it expires on January 1, 2028.
You have continued living in the United States without J-1 status. As of October 1, 2028, you sit down to determine your tax status based on your continued presence in the United States. You have been in the United States for over 31 days in 2028
To determine the number of days eligible under the IRS Substantial Presence Test, you caculate the following:
- Qualifying days of physical presence in the current year (2028): 273
- Qualifying days from last year (2027): 0 x 1/3 = 0
- Qualifying days from two years ago (2026): 0 x 1/6 = 0 days
- Total qualifying days: 273 + 0 + 0 = 273
273 qualifying days in the last three years means you are over the 183-day threshold and will owe the IRS taxes as a resident. Remember, you do not owe these taxes from 2027 or 2028, only the current year.
Case Study #2

This next example is a little more complicated.
Let’s say you brought your spouse with you. Your spouse entered the United States through your J-1 visa on January 1, 2025. However, your spouse quickly shed their visa status and started the process to become a U.S. citizen on January 1, 2027.
They also obtained the Employment Authorization Document needed to begin working for a U.S.-based company on the same date. Your spouse became a lawful permanent resident of the U.S. on June 1, 2028.
As of October 1, 2028, you would determine your spouse’s tax status for the current year this way:
- Your spouse spent more than 31 days in the United States in 2022.
- Qualifying days of physical presence in the current year (2022): 151 (the days after June 1 don’t count, as your spouse received lawful resident status).
- Qualifying days from last year (2021): 365 x 1/3 = 121
- Qualifying days from two years ago (2020): 0 x 1/6 = 0 (your spouse was still on your visa at that time, so these days don’t qualify).
- Total qualifying days: 151 + 121 + 0 = 272
272 qualifying days in the last three years means your spouse exceeds the 183-day threshold and will owe the IRS taxes as a resident. However, they do not owe these taxes from 2027 or 2026, only the current year.
What Happens When You Don’t Meet the IRS Substantial Presence Test?
If you don’t meet the IRS Substantial Presence Test for the current year but are sure you will stay over the 183-day limit next year, you have options for how the IRS handles your tax status.
You can decide to take resident status for part of the current year and be a dual-status alien for the current year, as well. To qualify, you must be present in the U.S. for at least 31 days in a row in the current year. Plus, you must be present in the U.S. for 75% or more of the remaining days of the year, including the 31-day allotment. You can count up to five days out of the U.S. as days of presence.
For example, assume an individual enters the U.S. on September 1 and remains in the country through December 31, accumulating 122 days of presence. The individual does not meet the 183-day test for the year and is treated as a nonresident alien by default.
However, if that same individual remains in the U.S. for all of the following year and expects to exceed 183 days, they may elect dual-status treatment for the first year. Under dual-status treatment, income earned before September 1 is treated under nonresident rules, while income earned after September 1 is treated under resident rules.
Dual-status treatment affects which income is taxable. During the nonresident portion of the year, only U.S.-sourced income is taxable. During the resident portion of the year, worldwide income is taxable. This can change the amount of income reported and which tax deductions or credits are available.
However, if you’re not a U.S. citizen or a resident alien for any period of time, you hold nonresident alien status for that same duration. As such, you’ll file a Form 1040-NR for income earned while you held nonresident alien status.
For instance, suppose an individual spends 120 days in the U.S. during the year and earns $50,000 from a U.S. employer and $40,000 from a foreign employer. If the individual does not qualify for or does not elect dual-status treatment, only the $50,000 of U.S.-sourced income is reported on Form 1040-NR. The $40,000 of foreign income is not taxable by the U.S. for that year.
U.S. Tax Treaties and Double Taxation
The United States’ tax treaties with other countries prevent you from paying more taxes than you owe. If you’re a U.S. citizen living in another country, your U.S. tax burden is reduced, even for money earned in the U.S. The laws in place keep double taxation from occurring. As a result, the bulk of your taxes might go to the country you take primary residence in, and your tax responsibility in the U.S. is reduced.
For example, assume a U.S. citizen lives and works in a treaty country and earns $90,000 in wages there. The foreign country taxes that income first. When filing a U.S. tax return, the individual still reports the $90,000 but may claim a foreign tax credit for the taxes paid abroad. That credit can offset some or all of the U.S. tax that would otherwise apply to the same income.
Tax treaties can also lower withholding taxes on certain types of income. For instance, a nonresident alien who lives in a treaty country and receives U.S. dividends might face a reduced withholding rate, such as 15%, instead of the standard 30%. This means less tax is taken out at the source.
Another common situation involves pensions or retirement income. Some treaties specify that pension income is taxed only by the country of residence. In that case, an individual receiving a foreign pension while living in the U.S. may owe U.S. tax but not foreign tax, or vice versa, depending on the treaty terms.
Treaty benefits usually require proper reporting and documentation. Claiming a treaty position incorrectly can result in additional tax, interest and penalties, which is why taxpayers with cross-border income often review treaty rules carefully or work with a tax professional.
How the Substantial Presence Test Changes Your U.S. Tax Filing Obligations
Meeting the Substantial Presence Test generally places you in the same tax category as a U.S. resident for the year, even if you are not a citizen or permanent resident. This means your tax return is structured around resident filing rules rather than nonresident rules.
Resident tax status requires reporting worldwide income. Several types of income, including wages, self-employment income, investment income and other earnings from both U.S. and foreign sources, are included on a single federal return.
Failing the Substantial Presence Test limits U.S. taxation to income that is sourced to the United States. Foreign wages, foreign investment income and other non-U.S. earnings are excluded from the federal return.
The test also determines which tax form you file. Residents generally file Form 1040, while nonresidents file Form 1040-NR, with different schedules, deductions and reporting frameworks.
Some individuals qualify as dual-status aliens during a transition year. In that case, part of the year is treated as resident and part as nonresident, and income must be allocated between the two periods.
Tax status under the Substantial Presence Test can trigger additional compliance duties, including reporting certain foreign financial accounts and assets, depending on balances and account types.
Bottom Line

The IRS Substantial Presence Test helps the U.S. government decide how to tax your income. Your physical presence over the past three years ultimately determines your tax status. Specific conditions, such as routinely commuting from Canada or Mexico or holding a student visa, exempt you from the rule. However, it’s crucial to understand the rule if you don’t hold U.S. citizenship or permanent residency, as you might owe more taxes than you realize.
IRS Substantial Presence Test Tips
- Taxes are daunting no matter your citizenship status. Luckily, a financial advisor can help you clarify your tax status, deductions and more. Finding a qualified financial advisor doesn’t have to be hard. SmartAsset’s free tool matches you with financial advisors who serve your area, and you can interview your advisor matches at no cost to decide which one is right for you. If you’re ready to find an advisor who can help you achieve your financial goals, get started now.
- If you live in a U.S. Territory, your tax situation can be challenging to decipher. Tax deductions can help you avoid double taxation. Learn more about qualifying for the Foreign Tax Credit.
Photo credit: ©iStock.com/Charday Penn, ©iStock.com/OlekStock, ©iStock.com/ilkerelik
