You are a U.S. resident for tax purposes if you meet either of two IRS tests: the green card test or the substantial presence test.1Internal Revenue Service. Introduction to Residency Under U.S. Tax Law These rules run on their own track, separate from immigration law, so your visa category does not automatically decide how you are taxed. Pass either test and the IRS treats you as a resident alien, taxing your worldwide income the same way it taxes a U.S. citizen. Fail both and you are a nonresident alien, generally taxed only on income from U.S. sources.
The Green Card Test
If USCIS has granted you lawful permanent resident status, you are a resident alien for tax purposes. Your residency begins on the first day during the calendar year that you are physically in the United States as a green card holder. If you received the card while abroad, the clock starts the first day you set foot in the country afterward.2Internal Revenue Service. Residency Starting and Ending Dates
Once residency starts, only three things end it: you formally renounce and abandon the status in writing to USCIS, USCIS administratively terminates it, or a federal court terminates it.3Internal Revenue Service. U.S. Tax Residency – Green Card Test Leaving the country does not end it. Letting the card expire does not end it. People who move abroad while still technically holding a green card often discover years later that the IRS still expected returns.
The Substantial Presence Test
Without a green card, you can still become a tax resident by spending enough time in the country. The substantial presence test uses a weighted three-year formula. You pass if both of these are true:4Internal Revenue Service. Substantial Presence Test
- You were physically present in the U.S. at least 31 days during the current calendar year.
- Your weighted day count across three years reaches 183. Count every day in the current year at full value, one-third of the days in the prior year, and one-sixth of the days from two years back.
An example makes the math concrete. Suppose you spent 120 days in the U.S. in each of the last three years. The current year contributes 120. The prior year contributes 40 (120 × ⅓). Two years back contributes 20 (120 × ⅙). Your weighted total is 180, just short. Bump the current-year count to 125 and the total hits 185, crossing the line.
If you pass, your residency start date is generally the first day you were present during the year you crossed the threshold.2Internal Revenue Service. Residency Starting and Ending Dates
Days That Do Not Count
Two common categories of days are excluded from the count. Time in the U.S. of less than 24 hours while traveling between two points outside the country does not count. Neither do days you commute to work from a home in Canada or Mexico, as long as you commute regularly.4Internal Revenue Service. Substantial Presence Test
Exempt Individuals: Whose Days Do Not Count
Certain visa holders can exclude every day of presence from the substantial presence formula. The IRS calls them “exempt individuals,” which is misleading. The label does not mean you owe no U.S. tax. It only means your days do not count toward the 183-day calculation, and you may still owe tax on U.S.-source income.5Internal Revenue Service. Exempt Individuals: Foreign Government-Related Individuals
- Foreign government personnel on A or G visas with full diplomatic or consular status exclude all days. Personal employees and domestic workers on A-3 or G-5 visas do not qualify.
- Teachers and trainees on J or Q visas can generally exclude days for up to two calendar years. Under specified conditions this can extend to four, and this limit can reset after a break.6Internal Revenue Service. Taxation of Alien Individuals by Immigration Status – J-1
- Students on F, J, M, or Q visas can exclude days for up to five calendar years. This is a lifetime limit and does not reset.
- Professional athletes temporarily in the U.S. to compete in a charitable sporting event can exclude those days.
To claim exempt-individual status, you file Form 8843 for the year.
Exceptions When You Would Otherwise Be a Resident
Even if you meet the substantial presence test on paper, three exceptions can pull you back to nonresident status.
The Closer Connection Exception
You can still be treated as a nonresident if you can show a closer connection to a foreign country. All of the following must be true:7Internal Revenue Service. Closer Connection Exception to the Substantial Presence Test
- You were present in the U.S. fewer than 183 actual days during the year (not the weighted count).
- You maintained a tax home in a foreign country for the entire year.
- Your connection to that country was closer than your connection to the United States.
- You have not applied for or taken steps toward a green card.
That last condition disqualifies more people than they expect. Filing Form I-485, having an employer file an I-140 petition on your behalf, or filing a labor certification all count as steps toward permanent residency.8eCFR. 26 CFR 301.7701(b)-2 Closer Connection Exception
The IRS looks at where your permanent home, family, and personal belongings are located, where you hold a driver’s license and vote, where you bank, where your social and professional ties are, and which charitable organizations you support. You claim the exception on Form 8840, and filing late can forfeit it unless you can show by clear and convincing evidence that you took reasonable steps to comply.9Internal Revenue Service. Form 8840 – Closer Connection Exception Statement for Aliens
The Medical Condition Exception
If a medical condition prevented you from leaving on your intended departure date, those extra days do not have to count. The condition must have arisen while you were already in the country. Entering the U.S. for treatment and then citing complications does not qualify. You file Form 8843 with a physician’s certification that you were unable to leave and that the condition was not preexisting. Missing the filing deadline can cost you the exclusion.10Internal Revenue Service. Form 8843 – Statement for Exempt Individuals and Individuals With a Medical Condition
Tax Treaty Tie-Breaker Rules
A treaty between the U.S. and your home country can override a residency result. If both countries consider you a tax resident under their own rules, tie-breaker provisions assign you to one country based on where your permanent home, center of vital interests, or habitual abode is.11Internal Revenue Service. Taxation of Alien Individuals by Immigration Status – H-1B If the tie-breaker assigns you to the foreign country, the IRS treats you as a nonresident for income tax purposes even though you passed the green card or substantial presence test. You disclose this on Form 8833.12Internal Revenue Service. About Form 8833, Treaty-Based Return Position Disclosure Under Section 6114 or 7701(b) Not every country has a treaty with the U.S., and not every treaty contains tie-breaker language, so this route depends on the specific agreement.
Choosing Residency Early: The First-Year Election
The exceptions above pull you toward nonresident status. The first-year choice pushes the other direction. If you arrive mid-year and do not meet the substantial presence test for the arrival year, you can elect to be treated as a resident starting on a specific date in that year instead of waiting for the next one. To qualify:13Internal Revenue Service. Tax Residency Status – First-Year Choice
- You were present at least 31 consecutive days during the arrival year.
- You were present at least 75% of the days from the start of that 31-day period through year-end, with up to five absence days counted as presence.
- You were not a U.S. resident in the prior year.
- You meet the substantial presence test in the following year.
You elect by attaching a statement to your Form 1040. The choice is most useful for people who want to file jointly with a citizen or resident spouse, or who want access to the standard deduction sooner.
When Status Changes Mid-Year
If your residency starts or ends partway through the year, you have a dual-status year. For the resident portion, you are taxed on worldwide income. For the nonresident portion, only on U.S.-source income.14Internal Revenue Service. Taxation of Dual-Status Individuals
Which form leads depends on your status on December 31. If you are a resident at year-end, Form 1040 is the primary return, marked “Dual-Status Return,” with a Form 1040-NR attached as a “Dual-Status Statement” for the nonresident period. If you are a nonresident at year-end, the order flips.
A dual-status filer cannot claim the standard deduction and is limited to itemized deductions. For many taxpayers that alone makes a dual-status year more expensive than a full year of either status.
What Residency Status Means for Your Return
The practical stakes come down to what income is taxed, what deductions you can take, and which form you file.
If You Are a Resident Alien
You report worldwide income on Form 1040, exactly as a citizen would. Foreign wages, foreign rental income, interest from overseas accounts, and dividends from foreign corporations all go on the return.15Internal Revenue Service. Alien Taxation – Certain Essential Concepts You get the standard deduction, itemized deductions, and most credits available to citizens.16Internal Revenue Service. Publication 519 (2025), U.S. Tax Guide for Aliens
If your spouse is a nonresident alien, the two of you can jointly elect to treat them as a resident for the entire year, opening the door to a joint return.17Internal Revenue Service. Nonresident Spouse The tradeoff is that your spouse’s worldwide income becomes reportable, and the election applies for every future year until formally revoked.
If You Are a Nonresident Alien
You file Form 1040-NR and generally owe U.S. tax only on U.S.-source income. Income effectively connected with a U.S. trade or business is taxed at the graduated rates that apply to citizens. Other U.S.-source income such as dividends, interest, and royalties is generally taxed at a flat 30%, though a treaty may lower that rate.18Internal Revenue Service. Taxation of Nonresident Aliens
Nonresident aliens cannot claim the standard deduction.19Internal Revenue Service. Nonresident – Figuring Your Tax A narrow exception applies to students and business apprentices from India under that country’s treaty. Everyone else is limited to itemized deductions connected with U.S. income.
Foreign Account Reporting Once You Are a Resident
Becoming a U.S. tax resident triggers reporting duties for foreign accounts and assets that many people do not anticipate until a penalty arrives.
If the combined value of your foreign financial accounts exceeds $10,000 at any point in the year, you must file a Report of Foreign Bank and Financial Accounts (FBAR, FinCEN Form 114) through FinCEN’s BSA E-Filing System.20Internal Revenue Service. Report of Foreign Bank and Financial Accounts (FBAR) The threshold is aggregate, not per account. A $6,000 checking account and a $5,000 savings account puts you over. Penalties for failing to file can be severe even for non-willful violations.
Separately, resident aliens with specified foreign financial assets above certain thresholds file Form 8938 with the tax return. For taxpayers living in the United States, the thresholds are:21Internal Revenue Service. Summary of FATCA Reporting for U.S. Taxpayers
- Single filers: total value over $50,000 on the last day of the year, or over $75,000 at any point during the year.
- Married filing jointly: total value over $100,000 on the last day of the year, or over $150,000 at any point during the year.
The thresholds rise for taxpayers living abroad to $200,000 on the last day of the year, or $400,000 for joint filers. Form 8938 covers a broader range of assets than the FBAR, including foreign stock, securities, and interests in foreign entities. The two filings overlap but do not substitute for each other, so meeting the threshold for one does not excuse you from the other.