IRS Publication 519: Residency, Treaties, and Filing Rules

IRS Publication 519 is the tax guide the federal government publishes for people who are not U.S. citizens. Its job is to answer one question first — are you a resident alien or a nonresident alien for tax purposes — and then apply the right rules. A resident alien pays U.S. tax on worldwide income. A nonresident alien generally pays U.S. tax only on income from U.S. sources.1Internal Revenue Service. Alien Taxation – Certain Essential Concepts

Everything else in the publication flows from that split. Which form you file, what income the U.S. can reach, whether you get the standard deduction, whether you owe Social Security tax, whether you have to report a bank account in your home country — all of it depends on where you land.

How the IRS Decides If You Are a Resident or Nonresident

Tax residency has nothing to do with your visa in the everyday sense. The tax code uses two mechanical tests. Meet either one and you are a resident alien for the 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 during the calendar year, you are a resident alien for that entire year. Residency begins on the first day you are physically present in the United States as a lawful permanent resident. No day-counting is needed.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 substantial presence test looks at a rolling three-year window and requires you to meet two conditions:4Internal Revenue Service. Substantial Presence Test

  • You were physically present in the United States for at least 31 days during the current year.
  • Your days in the current year, plus one-third of your days in the prior year, plus one-sixth of your days in the year before that, add up to 183 or more.

The weighting trips people up. Someone who spends 120 days in the U.S. every year comes out at 120 + 40 + 20 = 180, just under the line. Bump it to 125 days a year and you clear the threshold: 125 + 42 + 21 = 188. Count carefully.

Exempt Individuals

Some people do not count their U.S. days toward the substantial presence test at all. The tax code calls them “exempt individuals,” a label that means exempt from day-counting, not exempt from tax. Four categories qualify:5Office of the Law Revision Counsel. 26 USC 7701 – Definitions

  • Foreign government-related individuals, meaning diplomats and employees of foreign governments or international organizations with qualifying visas.
  • Teachers and trainees temporarily present on a J or Q visa (other than as students) who substantially comply with the visa’s terms. You lose this exemption 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. The exemption generally covers the first five calendar years of U.S. presence, after which your days start counting.7Internal Revenue Service. Exempt Individual – Who is a Student
  • Professional athletes temporarily in the U.S. to compete in a charitable sports event where all net proceeds go to a tax-exempt organization.

The Closer Connection Exception

Even if you pass the substantial presence test, you can still be treated as a nonresident alien if your real life is based abroad. To claim this, all four of these have to be true:8Internal Revenue Service. Closer Connection Exception to the Substantial Presence Test

  • You were present in the United States 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 factors like where your permanent home is, where your family lives, where you keep your belongings, and where you hold bank accounts and social ties. To claim the exception you must file Form 8840 on time. Miss the deadline and you lose the exception unless you can show by clear and convincing evidence that you made reasonable efforts to comply.

Dual-Status Aliens

If your residency changes partway through the year, you are a dual-status alien for that year. This happens when you arrive and become a resident mid-year, or when you give up your green card and leave. Nonresident rules apply to the part of the year before residency starts (or after it ends); resident rules apply to the rest.9Internal Revenue Service. Taxation of Dual-Status Individuals

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

What Nonresident Aliens Are Taxed On

If you are a nonresident alien, the U.S. only taxes you on income connected to the country. That income splits into two buckets, and each is taxed differently.

Effectively Connected Income

Effectively connected income (ECI) is income tied to a U.S. trade or business. Wages earned while working in the U.S., income from a U.S.-based sole proprietorship, and profits from selling inventory through a U.S. office all qualify. 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 (FDAP) income: interest, dividends, rents, royalties, and annuities from U.S. sources. FDAP is taxed at a flat 30% on the gross amount. No deductions.11Internal Revenue Service. Fixed, Determinable, Annual, or Periodical (FDAP) Income The payer — a bank or brokerage, usually — withholds the tax before sending you the remainder.

The 30% rate is the statutory default. A tax treaty between the U.S. and your home country can drop it to 15%, 10%, or zero on some categories of income. You claim the reduced rate by giving the payer a Form W-8BEN.12Internal Revenue Service. Characterization of Income of Nonresident Aliens

Capital Gains

Nonresident aliens generally owe no U.S. tax on capital gains from stocks, bonds, or other personal property, provided the gains are not effectively connected with a U.S. trade or business. The exception: if you are physically present in the United States for 183 days or more during the tax year and have a tax home here, your net U.S.-source capital gains face 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 estate is its own regime. Under the Foreign Investment in Real Property Tax Act (FIRPTA), gain from selling a U.S. real property interest is treated as effectively connected income, so it is taxed at the ordinary graduated rates rather than the flat 30% FDAP rate.14Internal Revenue Service. Definitions of Terms and Procedures Unique to FIRPTA

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

What Resident Aliens Are Taxed On

Once you qualify as a resident alien, the IRS treats you almost identically to a U.S. citizen. Your tax net widens dramatically: every dollar you earn anywhere in the world is subject to U.S. income tax, whether it comes from a job in the U.S., a rental property in London, or a bank account in Tokyo.1Internal Revenue Service. Alien Taxation – Certain Essential Concepts

The tradeoff is the full toolbox of deductions and credits. You can take the standard deduction or itemize on Schedule A (state and local taxes, home mortgage interest, charitable contributions). You use the same graduated brackets as citizens and can claim credits like the child tax credit and the earned income credit if you meet the eligibility rules.

The Foreign Tax Credit

Because your worldwide income is taxable, the same paycheck or dividend can be taxed by both the country where it was earned and the United States. The foreign tax credit prevents that double hit by letting you reduce your U.S. tax bill dollar-for-dollar by the income tax you paid to a foreign government.16Internal Revenue Service. U.S. Citizens and Resident Aliens Abroad

The credit is capped. It cannot reduce your U.S. tax below what you would owe on just your U.S.-source income, so in practice it offsets foreign taxes up to the effective U.S. rate on the foreign income. Pay more abroad than that rate, and the excess carries forward. The calculation lives on Form 1116 and gets complicated when income comes from multiple countries or falls into different categories.

How Tax Treaties Change the Default Rules

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

Claiming Treaty Benefits

To claim a treaty benefit, you must be a tax resident of the treaty country. Nonresident aliens generally claim benefits by giving Form W-8BEN to the payer for withholding reductions, and disclosing treaty-based positions on Form 8833 when they file.17Internal Revenue Service. About Form 8833, Treaty-Based Return Position Disclosure Under Section 6114 or 7701(b) Failing to file Form 8833 when required can bring penalties even if you were legitimately entitled to the benefit.

The Savings Clause

Nearly every U.S. tax treaty contains 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.18Internal Revenue Service. Tax Treaties Can Affect Your Income Tax This is what trips up newly minted resident aliens. Once you become a U.S. tax resident, most treaty benefits you relied on as a nonresident disappear.

Savings clauses have exceptions that vary by treaty. Some allow former students or trainees who become resident aliens to keep certain benefits for a limited period. Publication 519 includes a summary table, but the actual treaty text controls, and treaty carve-outs for students, teachers, and researchers differ significantly from one country to the next. If you think you qualify, read the specific treaty.

Social Security and Medicare Taxes

Residency also drives whether you owe Social Security and Medicare (FICA) taxes on U.S. wages. Resident aliens generally owe FICA 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 United States for fewer than five calendar years, and who are performing work their visa allows, are exempt from Social Security and Medicare taxes on that work income. Cross five calendar years and meet the substantial presence test, and you become a resident alien for tax purposes; the FICA exemption ends. The exemption does not extend to spouses or dependents on F-2, J-2, or M-2 visas.19Internal Revenue Service. Foreign Student Liability for Social Security and Medicare Taxes

Workers sent to the U.S. temporarily by a foreign employer face a different problem: paying into two social security systems at once. The U.S. has agreements with about 30 countries, called totalization agreements, that address this. Under those agreements you generally pay into only one country’s system based on where you work and how long the assignment lasts.20Social Security Administration. U.S. International Social Security Agreements If your home country has a totalization agreement and your employer supplies a certificate of coverage, you may be exempt from U.S. FICA entirely during a temporary assignment.

Reporting Foreign Financial Accounts

Resident aliens face the same foreign account reporting rules as U.S. citizens, and the penalties for skipping them are severe. Two separate regimes apply, with different thresholds and different filing destinations.

FBAR (FinCEN Form 114)

If the combined balance of your foreign financial accounts exceeds $10,000 at any point during the year, you must file a Report of Foreign Bank and Financial Accounts (FBAR) electronically through FinCEN’s BSA E-Filing System. The deadline is April 15, with an automatic extension to October 15 that requires no separate request.21Internal Revenue Service. Report of Foreign Bank and Financial Accounts (FBAR)

The $10,000 threshold is aggregate, not per account. Three accounts holding $4,000 each puts 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 (FATCA) requires certain taxpayers to report specified foreign financial assets on Form 8938, filed with your income tax return. Thresholds depend on filing status. For unmarried taxpayers living in the U.S., the requirement kicks in 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.22Internal Revenue Service. Do I Need to File Form 8938, Statement of Specified Foreign Financial Assets

Form 8938 and the FBAR overlap but do not substitute for each other. Filing one does not satisfy the other, and covered assets differ. Many resident aliens with foreign accounts have to file both.

Which Form to File and When

Your classification decides the form, the deadline, and, in one situation, whether you need permission to leave the country.

The Right Form

Resident aliens file Form 1040, the same return used by U.S. citizens.23Internal Revenue Service. About Form 1040, U.S. Individual Income Tax Return Nonresident aliens file Form 1040-NR, which separates effectively connected income from FDAP income and applies the right rates to each.24Internal Revenue Service. About Form 1040-NR, U.S. Nonresident Alien Income Tax Return Dual-status aliens file Form 1040 or 1040-NR depending on their status at year-end, with a statement attached showing income for each portion of the year.9Internal Revenue Service. Taxation of Dual-Status Individuals

Deadlines

Resident aliens follow the standard April 15 deadline and can request an automatic six-month extension to October 15. If you are a resident alien living abroad on April 15, you get an automatic two-month extension to June 15 without filing anything extra.16Internal Revenue Service. U.S. Citizens and Resident Aliens Abroad

Nonresident aliens who earned wages subject to U.S. withholding must file by April 15. Nonresident aliens without such wages get an automatic June 15 deadline.10Internal Revenue Service. Taxation of Nonresident Aliens Either way, interest accrues on unpaid balances from April 15 regardless of any extension.

Form 1040-NR can be filed electronically, and paid preparers generally must e-file it.25Internal Revenue Service. Instructions for Form 1040-NR Paper filing is still allowed for self-preparers.

Departure Permits (Sailing Permits)

Most aliens must obtain a certificate of compliance, commonly called a sailing permit or departure permit, before leaving the United States on a long-term or permanent basis. You get 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 proves your U.S. tax affairs are settled.26Internal 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 allowances for study, authorized employment, or bank interest not connected to a U.S. business. Tourists on B-2 visas and short-term business visitors who stay fewer than 90 days are also exempt, as are diplomats holding official passports.