IRS Publication 519: Resident vs Nonresident Alien Tax Rules

IRS Publication 519 is the federal tax guide for people who are not U.S. citizens but earn income from, or spend time in, the United States. Its central job is to sort you into one of two categories: resident alien or nonresident alien. That label decides almost everything that follows, because a resident alien is taxed on worldwide income the same way a U.S. citizen is, while a nonresident alien is generally taxed only on income from U.S. sources.1Internal Revenue Service. Alien Taxation – Certain Essential Concepts

The word “alien” is the IRS’s own term for any non-citizen. It carries no immigration meaning here. The classification you end up with is based on tax tests, not visa stamps.

How the IRS Decides If You Are a Resident or Nonresident Alien

Two mechanical tests do the sorting. Meet either one and you are a resident alien for that calendar year.2Internal Revenue Service. Determining an Individual’s Tax Residency Status

The Green Card Test

If you hold a Permanent Resident Card (Form I-551) at any point in the year, you are a resident alien for the whole year. Your residency begins the first day you are physically present in the United States as a lawful permanent resident. No counting of days is involved.3Internal Revenue Service. U.S. Tax Residency – Green Card Test

The Substantial Presence Test

Without a green card, you can still become a resident alien by spending enough time in the country. The test uses a rolling three-year window and has two parts:4Internal Revenue Service. Substantial Presence Test

  • You were present in the U.S. for at least 31 days in the current year.
  • The weighted total of your days reaches 183 or more, counting all days in the current year, one-third of days in the prior year, and one-sixth of days in the year before that.

The weighting is where people miscalculate. Spend 120 days a year in the U.S. and you stay under the line: 120 + 40 + 20 = 180. Spend 125 and you are over: 125 + 42 + 21 = 188. It often feels like less time than it is.

Days That Don’t Count: Exempt Individuals

Certain people do not count their U.S. days toward the test. The tax code calls them “exempt individuals,” though the label refers only to day-counting, not to tax exemption. Four categories qualify:5Office of the Law Revision Counsel. 26 USC 7701 – Definitions

  • Foreign government-related individuals, including diplomats and employees of international organizations with qualifying visas.
  • Teachers and trainees temporarily present on a J or Q visa (other than as students) who substantially comply with their visa terms. This exemption is lost if you were already exempt as a teacher, trainee, or student for any two years during the previous six calendar years.6Internal Revenue Service. Exempt Individuals – Teachers and Trainees
  • Students on F, J, M, or Q visas, generally for the first five calendar years of U.S. presence. After that, you begin counting days.7Internal Revenue Service. Exempt Individual – Who is a Student
  • Professional athletes temporarily in the U.S. for a charitable sports event in which all net proceeds go to a tax-exempt organization.

The Closer Connection Exception

Even if you pass the substantial presence test, you can be treated as a nonresident alien if your real life is based somewhere else. All of the following must hold:8Internal Revenue Service. Closer Connection Exception to the Substantial Presence Test

  • You were present in the U.S. for fewer than 183 days during the current year.
  • You maintained a tax home in a foreign country for the entire year.
  • You had a closer connection to that foreign country than to the United States.
  • You have not applied for, or taken steps toward, lawful permanent resident status.

The IRS weighs where your permanent home sits, where your family lives, where your personal belongings are kept, and where you hold bank accounts and social ties. You claim the exception on Form 8840, and you must file it on time. Missing the deadline costs you the exception unless you can show by clear and convincing evidence that you made reasonable efforts to comply.

Dual-Status Years

When your status changes partway through the year — arriving and becoming a resident mid-year, or giving up a green card and leaving — you are a dual-status alien. Nonresident rules apply to one part of the year and resident rules to the other.9Internal Revenue Service. Taxation of Dual-Status Individuals

Dual-status years carry restrictions people often miss. You cannot take the standard deduction, though itemizing is still available. You cannot file jointly with a spouse unless you both elect to be treated as full-year residents, which pulls your entire worldwide income for the year into U.S. tax.

What a Nonresident Alien Owes Tax On

If you are classified as a nonresident alien, the U.S. taxes you only on income connected to the country. That income splits into two buckets, each with its own rules.

Effectively Connected Income

Effectively connected income (ECI) is income tied to a U.S. trade or business: wages for work performed in the U.S., income from a U.S. sole proprietorship, profits from selling inventory through a U.S. office. ECI is taxed at the same graduated rates that apply to citizens and resident aliens, and you can claim allowable deductions against it.10Internal Revenue Service. Taxation of Nonresident Aliens You report it on Form 1040-NR.

FDAP Income

The second bucket is fixed, determinable, annual, or periodical income: interest, dividends, rents, royalties, annuities. FDAP income is taxed at a flat 30% on the gross amount, with no deductions.11Internal Revenue Service. Fixed, Determinable, Annual, or Periodical (FDAP) Income The payer withholds the tax before you see the money.

That 30% is the statutory default. Tax treaties often cut it to 15%, 10%, or zero. To claim the lower rate, you generally give the payer a Form W-8BEN.12Internal Revenue Service. Characterization of Income of Nonresident Aliens

Capital Gains

Nonresident aliens generally pay no U.S. tax on capital gains from stocks, bonds, or other personal property, as long as the gain is not effectively connected with a U.S. trade or business. The exception: if you are present in the U.S. for 183 days or more during the tax year and have a tax home here, your net U.S.-source capital gains are hit with a flat 30% tax (or a lower treaty rate).13Internal Revenue Service. The Taxation of Capital Gains of Nonresident Students, Scholars and Employees of Foreign Governments This 183-day rule is separate from the substantial presence test.

Selling U.S. Real Estate (FIRPTA)

Real property gets its own regime. Under the Foreign Investment in Real Property Tax Act, any gain from selling a U.S. real property interest is treated as effectively connected income and taxed at ordinary graduated rates, not the flat 30%.14Internal Revenue Service. Definitions of Terms and Procedures Unique to FIRPTA

To make sure the tax is collected, the buyer must withhold 15% of the amount realized (the sale price, including assumed debt) and send it to the IRS. A narrow exception: no withholding is required if the buyer plans to use the property as a personal residence and the amount realized is $300,000 or less.15Internal Revenue Service. FIRPTA Withholding The seller still reports the gain on Form 1040-NR and settles up any tax due.

What a Resident Alien Owes Tax On

Once you qualify as a resident alien, the IRS treats you almost identically to a U.S. citizen. Every dollar you earn anywhere in the world is subject to U.S. income tax: wages from a job in Chicago, rent from a flat in London, interest from an account in Tokyo.1Internal Revenue Service. Alien Taxation – Certain Essential Concepts

Deductions and Credits

The upside is access to the full set of deductions and credits available to citizens. For the 2026 tax year, the standard deduction is $16,100 for single filers and $32,200 for married couples filing jointly.16Internal Revenue Service. IRS Releases Tax Inflation Adjustments for Tax Year 2026 You can itemize instead on Schedule A, including state and local taxes (capped at $40,000 for most filers under changes enacted in 2025, with the cap phasing down for adjusted gross income above $500,000), home mortgage interest, and charitable contributions. Resident aliens use the same graduated brackets as citizens and can claim credits like the child tax credit and earned income credit if they meet the rules for each.

The Foreign Tax Credit

Because the U.S. is now taxing your worldwide income, foreign governments and the IRS can both reach for the same paycheck. The foreign tax credit prevents that double hit by letting you reduce your U.S. tax dollar-for-dollar by the income tax you paid to a foreign government.17Internal Revenue Service. U.S. Citizens and Resident Aliens Abroad

The credit is capped. It can only offset the U.S. tax that would otherwise be owed on your foreign-source income, so if the foreign rate was higher than yours, the excess carries forward to future years. You calculate it on Form 1116. Multiple countries and income types make the math harder.

How Tax Treaties Change the Default Rules

The United States has income tax treaties with dozens of countries. These agreements override certain default rules in the tax code, mainly to stop the same income from being taxed twice. The most common benefit for nonresident aliens is a reduced withholding rate on FDAP income.

Claiming Treaty Benefits

To claim a treaty benefit, you have to be a tax resident of the treaty country. For withholding reductions, you file Form W-8BEN with the payer. For treaty-based positions taken on your return, you disclose them on Form 8833.18Internal Revenue Service. About Form 8833, Treaty-Based Return Position Disclosure Under Section 6114 or 7701(b) Skipping Form 8833 when it is required can trigger penalties even where the benefit itself is legitimate.

The Savings Clause

Nearly every U.S. tax treaty includes a “savings clause” that preserves the right of the United States to tax its own residents and citizens as if the treaty did not exist.19Internal Revenue Service. Tax Treaties Can Affect Your Income Tax This is the provision that catches newly minted resident aliens. Benefits you relied on while nonresident often disappear the moment you cross into resident status.

The savings clause has exceptions, and they vary. Some treaties let former students or trainees who become resident aliens keep certain benefits for a limited period. Reading the specific treaty with your home country is the only reliable way to know.

Many treaties also carve out exemptions for students, teachers, and researchers. A student receiving money from abroad for tuition or living costs may be exempt from U.S. tax on those payments. A visiting teacher or researcher may get a temporary exemption on teaching or research income, often for two or three years. Terms differ sharply from one treaty to the next, and some have clocks that start running from the date of arrival regardless of when you first claim the benefit. Publication 519 includes a summary table of common exemptions, but the treaty text controls.

Social Security and Medicare Taxes

Residency status also decides whether you owe FICA taxes on U.S. wages. Resident aliens generally owe them on the same basis as citizens. Nonresident aliens may be exempt, depending on visa type.

Foreign students on F-1, J-1, or M-1 visas who have been in the U.S. for fewer than five calendar years and are doing work authorized by their visa are exempt from Social Security and Medicare taxes on that income. Once a student has been present five or more calendar years and meets the substantial presence test, they become a resident alien for tax purposes and the FICA exemption ends.20Internal Revenue Service. Foreign Student Liability for Social Security and Medicare Taxes The exemption does not extend to spouses or dependents on F-2, J-2, or M-2 visas.

Workers sent to the U.S. temporarily by a foreign employer can end up paying into two Social Security systems at once. The U.S. has agreements with about 30 countries, called totalization agreements, that prevent this. They assign you to a single country’s system based on where you are working and how long the assignment lasts.21Social Security Administration. U.S. International Social Security Agreements If your home country has one and your employer provides a certificate of coverage, you may be exempt from U.S. FICA entirely for the assignment.

Reporting Foreign Accounts and Assets

Resident aliens have the same foreign reporting duties as U.S. citizens, and the penalties for ignoring them are among the heaviest in the code. Two separate regimes apply, with different thresholds and different destinations.

FBAR (FinCEN Form 114)

If the combined balance 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 electronically through FinCEN’s BSA E-Filing System. The deadline is April 15, with an automatic extension to October 15 that requires no request.22Internal Revenue Service. Report of Foreign Bank and Financial Accounts (FBAR)

The $10,000 is aggregate across all accounts. Three accounts holding $4,000 each put you over. Civil penalties for a willful failure to file can reach $100,000 or 50% of the account balance, whichever is greater.

FATCA (Form 8938)

Separately, the Foreign Account Tax Compliance Act requires certain taxpayers to report specified foreign financial assets on Form 8938, filed with the income tax return. Thresholds are higher than FBAR and depend on filing status. Unmarried taxpayers living in the U.S. must file when total foreign assets exceed $50,000 on the last day of the tax year or $75,000 at any point during the year. For married couples filing jointly, the thresholds are $100,000 and $150,000.23Internal Revenue Service. Do I Need to File Form 8938, Statement of Specified Foreign Financial Assets

FBAR and Form 8938 overlap but are not interchangeable. Filing one does not satisfy the other. Many resident aliens with foreign accounts need to file both.

Filing Your Return

Residency classification determines which form you use and when it is due.

Which Form

Resident aliens file Form 1040, the same return citizens use.24Internal Revenue Service. About Form 1040, U.S. Individual Income Tax Return Nonresident aliens file Form 1040-NR, which is built to separate effectively connected income from FDAP income and apply the right rate to each.25Internal Revenue Service. About Form 1040-NR, U.S. Nonresident Alien Income Tax Return Dual-status aliens file 1040 or 1040-NR depending on their status at year-end, with a statement attached showing income for each portion of the year.

Deadlines

Resident aliens follow the standard April 15 deadline and can request an automatic six-month extension to October 15. Resident aliens living abroad on April 15 get an automatic two-month extension to June 15 without filing anything.17Internal Revenue Service. U.S. Citizens and Resident Aliens Abroad

Nonresident aliens who earned wages subject to U.S. withholding also file by April 15. Nonresident aliens with no such wages get an automatic June 15 deadline. Either way, interest accrues on any unpaid balance from April 15 regardless of the extended due date.

Form 1040-NR can now be filed electronically, and paid preparers are generally required to e-file it.26Internal Revenue Service. Instructions for Form 1040-NR Self-preparers can still mail paper returns.

Departure Permits Before Leaving the U.S.

Most aliens must get a certificate of compliance, often called a sailing permit or departure permit, before leaving the United States on a long-term or permanent basis. You obtain it by filing Form 1040-C or the shorter Form 2063 with your local IRS office at least two weeks before you plan to leave. The permit shows your U.S. tax obligations are settled.27Internal Revenue Service. Departing Alien Clearance (Sailing Permit)

Several categories are excused. Students and exchange visitors on F, J, M, or Q visas generally do not need a permit if their only U.S. income was from study allowances, authorized employment, or bank interest not connected to a U.S. business. Tourists on B-2 visas and short-term business visitors staying fewer than 90 days are also exempt, as are diplomats holding official passports.