A resident alien pays U.S. tax on worldwide income and files the same Form 1040 as a U.S. citizen; a nonresident alien pays U.S. tax only on U.S.-source income, files Form 1040-NR, and faces different withholding rates and tight limits on deductions and credits. Which category you fall into is decided by two IRS tests, not by your visa. The comparison of resident alien vs nonresident alien matters because getting it wrong means overpaying, missing credits you qualify for, or filing the wrong form and drawing a notice.
How the IRS Decides Which One You Are
You are a resident alien for tax purposes if you pass either the Green Card Test or the Substantial Presence Test. One is enough.
The Green Card Test
If you hold a lawful permanent resident card (Form I-551), you are a resident alien regardless of how many days you actually spent in the country. Residency starts the first day you are physically present in the U.S. as a green card holder, or the first day you enter after USCIS approves the card if you were abroad at approval.1Internal Revenue Service. Residency Starting and Ending Dates You keep that status until you surrender the card, or it is administratively or judicially revoked.2Internal Revenue Service. U.S. Tax Residency – Green Card Test
The Substantial Presence Test
Without a green card, you still become a resident alien if you were physically in the U.S. at least 31 days during the current year and at least 183 days over a three-year lookback. The 183 figure is weighted: all days in the current year, plus one-third of days in the prior year, plus one-sixth of days the year before that.3Internal Revenue Service. Determining an Individual’s Tax Residency Status
Some categories of people do not count their days at all, even while physically present: diplomats and employees of international organizations on A or G visas, teachers and trainees on J or Q visas, students on F, J, M, or Q visas, and anyone unable to leave because of a medical condition that arose while in the U.S.3Internal Revenue Service. Determining an Individual’s Tax Residency Status
Those student and teacher exemptions run out. F-1 students are generally treated as nonresident aliens only for their first five calendar years in the country, and J-1 non-students only for their first two. After that, the days start counting and many long-staying students find themselves resident aliens by default.3Internal Revenue Service. Determining an Individual’s Tax Residency Status
What Each Status Means for Your Taxes
What Income Is Taxed
Resident aliens report worldwide income: U.S. wages, foreign wages, foreign bank interest, overseas rental property, investments held anywhere. Nonresident aliens owe U.S. tax only on U.S.-source income and on income effectively connected with a U.S. trade or business.4Internal Revenue Service. Publication 519 (2025), U.S. Tax Guide for Aliens A nonresident’s foreign bank interest and overseas properties are generally outside the U.S. system entirely.
Forms, Deductions, and Credits
Resident aliens use Form 1040 and qualify for the same deductions and credits a citizen does. Nonresident aliens use Form 1040-NR.5Internal Revenue Service. Alien Taxation – Certain Essential Concepts
The gap in what you can claim is where classification really shows up on the bottom line. Nonresident aliens generally cannot take the standard deduction. The exceptions are narrow: a nonresident alien who elects to file jointly with a U.S. citizen or resident spouse, and students or business apprentices from India covered by the U.S.-India tax treaty.6Internal Revenue Service. Topic No. 551, Standard Deduction Itemized deductions are available to nonresident aliens only to the extent they connect to income effectively connected with a U.S. trade or business.4Internal Revenue Service. Publication 519 (2025), U.S. Tax Guide for Aliens
Credits are similarly restricted. Nonresident aliens are generally ineligible for education credits and the earned income credit, and the child and dependent care credit is available only when the nonresident alien files jointly with a citizen or resident spouse.4Internal Revenue Service. Publication 519 (2025), U.S. Tax Guide for Aliens
Withholding
Most U.S.-source income paid to a nonresident alien that is not connected with a U.S. trade or business is subject to a flat 30% withholding rate. That covers interest, dividends, rents, royalties, and other fixed or periodic payments.7Internal Revenue Service. NRA Withholding A tax treaty can reduce or eliminate that rate for specific income types. Resident aliens have wage withholding handled the same way a citizen’s is, through Form W-4.
Capital Gains
Capital gains are one place a nonresident alien can end up better off. If you are a nonresident alien without a U.S. tax home and you were present fewer than 183 days during the tax year, gains from U.S. stocks and securities are generally treated as foreign-source and not taxed by the U.S. at all. Cross 183 days in the tax year and a flat 30% applies to U.S.-source capital gains. This 183-day count is separate from the substantial presence test and uses different rules.8Internal Revenue Service. The Taxation of Capital Gains of Nonresident Students, Scholars, and Employees of Foreign Governments Resident aliens pay capital gains tax on gains worldwide at the regular graduated rates, with preferential rates for long-term holdings.
Social Security and Medicare for Students
Nonresident alien students on F-1, J-1, or M-1 visas are generally exempt from Social Security and Medicare taxes on wages earned in the U.S., provided they have been in the country fewer than five calendar years and the work is authorized by USCIS and connected to the purpose of the visa. The exemption covers on-campus employment and USCIS-authorized practical training. It does not extend to spouses and dependents on F-2, J-2, or M-2 visas, and it ends when the student becomes a resident alien or changes to a non-exempt status.9Internal Revenue Service. Foreign Student Liability for Social Security and Medicare Taxes
Tax Treaty Benefits
Nonresident aliens from countries with U.S. income tax treaties can often reduce or eliminate U.S. tax on specific income. Treaties commonly cut withholding rates on interest, dividends, rents, and royalties, and some exempt or reduce tax on personal service income, pensions, social security benefits, and income earned by students, teachers, and researchers.10Internal Revenue Service. Claiming Tax Treaty Benefits Resident aliens generally cannot claim treaty benefits as a resident of a foreign country, and a nonresident spouse who elects resident status usually forfeits treaty benefits for both spouses.11Internal Revenue Service. Nonresident Spouse
Estate Tax
The estate tax gap is dramatic. U.S. citizens and resident aliens have a basic exclusion of $15,000,000 for 2026, so no estate tax is owed unless the estate exceeds that amount.12Internal Revenue Service. What’s New – Estate and Gift Tax Nonresident aliens who are not U.S. citizens get only a $60,000 exemption on U.S.-situated assets, and their estate must file Form 706-NA if those assets exceed that threshold.13Internal Revenue Service. Some Nonresidents With U.S. Assets Must File Estate Tax Returns U.S.-situated assets include U.S. real estate, tangible personal property located in the U.S., and shares in U.S. corporations. For a nonresident alien holding significant U.S. investments, almost everything above $60,000 is exposed.
Foreign Account Reporting
Becoming a resident alien turns on a set of reporting obligations that do not exist for nonresidents. If your foreign bank and financial accounts together exceed $10,000 at any point in the year, you must file FinCEN Form 114 (the FBAR). Nonresident aliens are not U.S. persons for FBAR purposes and are not required to file. Resident aliens may also need to file Form 8938 if their foreign financial assets exceed separate, higher thresholds.14Internal Revenue Service. Comparison of Form 8938 and FBAR Requirements Penalties for missing these are steep, and they catch new resident aliens who never had to disclose foreign holdings before.
Two Edge Cases Worth Knowing
The Closer Connection Exception
Passing the substantial presence test does not always lock in resident status. If you were in the U.S. fewer than 183 days during the current year, kept a tax home in a foreign country for the entire year, and had not applied for a green card or otherwise taken steps toward permanent residency, you can claim a closer connection to that foreign country and remain a nonresident alien. The IRS weighs where your permanent home, family, belongings, bank accounts, social ties, driver’s license, and voting registration are. You claim the exception by filing Form 8840 with your return.15Internal Revenue Service. Closer Connection Exception to the Substantial Presence Test
Dual-Status Years
You can be both in a single year. The switch happens when you receive a green card mid-year, or when you leave permanently and give up the card. During the resident portion, you are taxed on worldwide income; during the nonresident portion, only on U.S.-source income. The form you file depends on your status on December 31, with the other year attached as a statement. Dual-status filers cannot claim the standard deduction, file as head of household, or claim education credits or the earned income credit, unless married to a citizen or resident and electing to file jointly.16Internal Revenue Service. Taxation of Dual-Status Individuals
Choosing to Treat a Nonresident Spouse as a Resident
If you are a U.S. citizen or resident alien married to a nonresident alien, the two of you can jointly elect to treat the nonresident spouse as a resident. That opens the door to a joint return, the standard deduction, lower joint brackets, and credits that would otherwise be off-limits. You make the election by attaching a signed statement to a joint return declaring that one spouse was a nonresident at year’s end and that both choose full-year resident treatment.11Internal Revenue Service. Nonresident Spouse
The trade-offs are real. The nonresident spouse now reports worldwide income. Neither spouse can claim treaty benefits as a foreign resident while the election is in place. And it is a once-in-a-lifetime election: revoke it and neither spouse can ever make it again, even with a different partner.11Internal Revenue Service. Nonresident Spouse The nonresident spouse needs a Social Security number or an ITIN.
Your Visa Does Not Determine Your Tax Status
The most common mistake is assuming a visa answers the question. It does not. An H-1B worker on a temporary visa easily passes the substantial presence test and becomes a resident alien within a year. An F-1 student who has been in the U.S. for six years shifts from nonresident to resident once the five-year exempt period expires. The immigration paperwork may say “nonimmigrant” while the IRS treats you as a resident.3Internal Revenue Service. Determining an Individual’s Tax Residency Status
Run the two tests before you pick a form. Getting the classification right decides which return you file, what income you report, what deductions and credits you can claim, whether FICA comes out of your paycheck, and whether you owe disclosure on your foreign accounts.