IRS Publication 519: Complete U.S. Tax Guide for Aliens

ARUN KP

11/11/2026

Introduction: What is Publication 519?

IRS Publication 519, officially titled the U.S. Tax Guide for Aliens, is the federal government’s primary tax guide for foreign nationals living, working, studying, or investing in the United States. Navigating the American tax system can be confusing for foreign citizens because U.S. tax laws distinguish sharply between individuals classified as “resident aliens” and those classified as “nonresident aliens.”

The primary purpose of Publication 519 is to help foreign individuals determine their U.S. tax residency status, identify what portion of their income is subject to U.S. taxation, and understand which forms to file. It outlines the specific tests used to measure physical presence, explains how international tax treaties prevent double taxation, and clarifies key filing restrictions.

Filing under the wrong tax category can lead to severe tax errors, unfiled paperwork penalties, or complications with immigration authorities. Publication 519 provides foreign workers, international students, and foreign investors with the rules needed to file accurately and protect their financial standing while in the United States.

Who Should Read This Publication?

Publication 519 is an essential reference for any non-U.S. citizen earning income or spending significant time within the country:

  • International Students and Scholars: Individuals holding F, J, M, or Q visas attending U.S. colleges, universities, or academic exchange programs.
  • Temporary Foreign Workers: Skilled professionals and seasonal workers residing in the U.S. under H-1B, L-1, O-1, or TN nonimmigrant visas.
  • New Permanent Residents (Green Card Holders): Immigrants who recently received permanent resident status and need to understand worldwide income reporting.
  • Dual-Status Aliens: Taxpayers transitioning from nonresident to resident status (or vice versa) within a single calendar year.
  • Nonresident Investors: Foreign citizens who do not live in the U.S. but earn U.S.-source income, such as real estate rents, dividends, or royalties.
  • University Payroll and HR Professionals: Administrators managing tax withholding, tax treaty exemptions, and FICA exemptions for foreign staff.

Key Topics Covered

Publication 519 organizes international tax compliance into comprehensive, sequential chapters. Its core topics include:

  • Determining Tax Residency: How to apply the Green Card Test and the mathematical Substantial Presence Test (SPT).
  • Exempt Individuals: Why students, teachers, and exchange visitors do not count physical days toward the presence test for specific periods.
  • Resident Aliens vs. Nonresident Aliens: Fundamental differences in how income is taxed, which deductions are allowed, and which forms are filed.
  • Dual-Status Tax Years: Complex filing rules that apply when your tax status changes in the middle of a tax year.
  • Social Security and Medicare (FICA) Taxes: Specific payroll tax exemptions available to international students and scholars.
  • Tax Treaties and Sourcing Rules: Utilizing bilateral treaties to reduce or eliminate U.S. taxes on wages, scholarships, and investment returns.

Detailed Breakdown of Main Concepts

1. The Two Tests for Tax Residency

Under federal tax law, foreign citizens are classified as either resident aliens or nonresident aliens. Publication 519 outlines two primary legal tests used to establish resident alien status: the Green Card Test and the Substantial Presence Test.

Under the Green Card Test, you are a resident alien if you were granted lawful permanent resident status by U.S. immigration authorities at any time during the calendar year. Under the Substantial Presence Test, you are treated as a resident alien if you were physically present in the United States for at least 31 days during the current year, and a total of 183 days over a weighted three-year calculation: all days in the current year, plus one-third of the days in the prior year, plus one-sixth of the days in the second prior year.

2. “Exempt Individuals” and Form 8843

A common point of confusion addressed in Publication 519 is the term “exempt individual.” In this context, the term does not mean exempt from paying income tax. Instead, it means you are exempt from counting your physical days in the United States toward the Substantial Presence Test.

Students on F, J, M, or Q visas are considered exempt individuals for up to five calendar years, while teachers and researchers on J or Q visas are generally exempt for two out of six calendar years. Because these individuals do not count their days toward the 183-day rule, they remain nonresident aliens for tax purposes. All exempt individuals must file Form 8843 annually with the IRS, even if they earned zero income.

3. Resident Aliens vs. Nonresident Aliens

Your tax residency status fundamentally changes how your return is prepared and what income is taxed. Resident aliens are taxed on their worldwide income from all sources, exactly like U.S. citizens. They file Form 1040, are entitled to claim the standard deduction, and can claim most standard personal tax credits.

Nonresident aliens, by contrast, are taxed only on their U.S.-source income. They file Form 1040-NR and must separate their income into two categories: Effectively Connected Income (ECI), which is taxed at standard graduated rates, and Fixed, Determinable, Annual, or Periodical (FDAP) income, which is taxed at a flat 30% gross rate. Nonresident aliens generally cannot claim the standard deduction and face strict limitations on filing statuses.

4. Dual-Status Tax Years

Many foreign nationals experience a “dual-status” tax year during the year they arrive in or depart from the United States. For example, a worker who arrives on an H-1B visa in June may be a nonresident alien for the first five months and a resident alien for the remaining seven months.

Publication 519 explains that dual-status taxpayers must file a split return—typically filing Form 1040 with a Form 1040-NR statement attached (or vice versa). During the resident period, worldwide income must be reported; during the nonresident period, only U.S.-source income is reported. Importantly, dual-status taxpayers are legally barred from claiming the standard deduction.

5. Social Security and Medicare (FICA) Exemptions

Under Internal Revenue Code Section 3121(b)(19), nonresident alien students, scholars, and exchange visitors temporarily in the U.S. under F-1, J-1, M-1, or Q-1 visas are generally exempt from Social Security and Medicare (FICA) taxes on wages earned from authorized on-campus or practical training employment.

Publication 519 clarifies that this payroll tax exemption applies only as long as the student or scholar remains a nonresident alien. Once the individual passes the Substantial Presence Test and transitions into resident alien status, the FICA exemption ends, and the employer must begin withholding Social Security and Medicare taxes.

6. Sailing Permits (Certificates of Compliance)

An often overlooked provision detailed in Publication 519 is the requirement for a “sailing permit” or Certificate of Compliance. Under federal law, most resident and nonresident aliens departing the United States must prove that all of their U.S. income tax obligations have been satisfied before leaving the country.

Taxpayers obtain this clearance by submitting Form 1040-C or Form 2063 at a local IRS office at least two weeks before departing. While certain categories—such as foreign students, exchange visitors, and diplomats—are generally exempt from obtaining a permit, temporary workers and foreign business professionals must comply with this formal departure protocol.

Practical Examples and Scenarios

The following examples illustrate how foreign nationals apply the rules of Publication 519 to their U.S. tax situations.

Scenario 1: International Student on an F-1 Visa

Sunita arrives from India on an F-1 student visa in August 2023 to begin a four-year undergraduate program. In 2026, she spends 340 days in the United States and earns $4,000 working on-campus at the college library.

Under Publication 519, Sunita is an “exempt individual” because she has been in the U.S. for fewer than five calendar years. None of her 340 physical days count toward the Substantial Presence Test, so she remains a nonresident alien for 2026. Sunita files Form 1040-NR to report her U.S. earnings and attaches mandatory Form 8843. Her employer properly withholds no Social Security or Medicare taxes from her campus paychecks.

Scenario 2: Software Engineer on an H-1B Visa

Carlos moves from Mexico to Seattle on an H-1B specialty occupation visa, arriving on February 1, 2026. He works for a U.S. cloud infrastructure company and lives in Seattle for the remaining 334 days of the year.

Because Carlos holds an H-1B visa, he is not an exempt individual and must count all 334 days. Carlos meets the Substantial Presence Test (334 days in 2026 exceeds the 183-day requirement). Under Publication 519, Carlos is classified as a resident alien for tax purposes, allowing him to file Form 1040, claim the standard deduction, and report his worldwide income.

Resident Alien vs. Nonresident Alien Tax Comparison

Tax Element Resident Alien (RA) Nonresident Alien (NRA)
Tax Return Form Form 1040 Form 1040-NR
Taxable Income Scope Worldwide income from all sources U.S.-source income only
Standard Deduction Eligible for full standard deduction Generally disallowed (limited treaty exceptions)
Filing Status Options Single, MFJ, MFS, Head of Household Single or MFS only (joint filing barred)
FICA Tax Status (F/J Visas) Subject to Social Security & Medicare Exempt from FICA on authorized work

How This Publication Relates to Specific Forms

Publication 519 provides the core instructions for preparing international individual tax returns and supporting certifications:

  • Form 1040-NR (U.S. Nonresident Alien Income Tax Return): The primary federal return used by nonresident aliens to report U.S.-source wages, business profits, and investment income.
  • Form 1040 (U.S. Individual Income Tax Return): The return filed by resident aliens who meet the Green Card Test or Substantial Presence Test.
  • Form 8843 (Statement for Exempt Individuals): Filed by foreign students, scholars, and athletes to explain why their physical days do not count toward the presence test.
  • Form 8840 (Closer Connection Exception Statement for Aliens): Filed by individuals who meet the 183-day calculation but spent fewer than 183 days in the current year and maintain a closer tax home in another country.
  • Form W-8BEN (Certificate of Foreign Status of Beneficial Owner): Provided to banks and employers to certify nonresident alien status and claim tax treaty benefits.
  • Form 1040-C and Form 2063: The official departure tax returns submitted to obtain a sailing permit prior to leaving the United States.

Common Misunderstandings Clarified

Misunderstanding 1: “Immigration status is the same as tax status.”

Many taxpayers assume that holding a temporary visa means they are nonresidents for tax purposes. Immigration status and tax status are governed by different federal laws. An individual on an H-1B, L-1, or TN visa is a nonimmigrant for immigration purposes, but is classified as a resident alien for tax purposes once they pass the Substantial Presence Test.

Misunderstanding 2: “Being an ‘exempt individual’ means you pay zero tax.”

Holding exempt individual status does not make your income tax-free. It simply exempts your physical days of presence from the Substantial Presence Test calculation. If an F-1 student or J-1 scholar earns wages in the U.S., those wages are subject to federal income tax unless protected by a specific tax treaty provision.

Misunderstanding 3: “Nonresident aliens can claim the standard deduction.”

Unlike U.S. citizens and resident aliens, nonresident aliens are generally prohibited from claiming the standard deduction. Nonresidents must itemize allowable deductions (such as state income taxes paid and charitable gifts), with rare exceptions granted under specific bilateral treaties, such as the U.S.-India tax treaty for students.

Misunderstanding 4: “International students who earned no money don’t need to file anything.”

Every foreign student, scholar, and accompanying dependent present in the U.S. under an F, J, M, or Q visa must file Form 8843 annually, even if they had zero income. Failing to submit Form 8843 can jeopardize your exempt status and complicate future visa applications.

Why This Publication Matters for Taxpayers

Understanding Publication 519 prevents costly filing errors that could damage your immigration record or result in substantial IRS penalties. Filing a standard Form 1040 when you are legally required to file Form 1040-NR is one of the most common mistakes made by international students and workers, leading to delayed refunds and incorrect tax assessments.

Additionally, Publication 519 saves foreign nationals money. By learning how tax treaties function, foreign students and scholars can exempt thousands of dollars of wages and fellowship grants from U.S. taxes. Understanding FICA exemptions also prevents payroll departments from incorrectly deducting Social Security and Medicare taxes from authorized student paychecks.

Frequently Asked Questions

Can a nonresident alien file a joint return with a resident alien spouse?

Generally, nonresident aliens cannot file a joint return. However, under Internal Revenue Code Section 6013(g), a married couple consisting of a resident alien (or citizen) and a nonresident alien can make a special election to treat the nonresident spouse as a resident alien for tax purposes, allowing them to file Married Filing Jointly.

Are nonresident aliens taxed on interest earned in U.S. bank accounts?

No. Under standard federal tax rules, interest earned by a nonresident alien on personal deposits in U.S. banks, savings institutions, or credit unions is classified as nontaxable portfolio interest, provided it is not effectively connected with a U.S. business.

What should I do if my employer improperly withheld FICA taxes from my F-1 student wages?

First, contact your employer’s payroll office and request a direct refund. If the employer cannot or refuses to issue a refund, Publication 519 instructs you to file Form 843 (Claim for Refund and Request for Abatement) and Form 8316 directly with the IRS to recover the erroneously withheld Social Security and Medicare taxes.

What is the Closer Connection Exception?

If you meet the Substantial Presence Test under the three-year weighted formula, you can still be treated as a nonresident alien if you were physically present in the U.S. for fewer than 183 days during the current year, maintain a tax home in a foreign country, and have a closer connection to that foreign country than to the U.S., as documented on Form 8840.

Do nonresident aliens have to pay capital gains tax on U.S. stock sales?

Nonresident aliens are generally not subject to U.S. capital gains tax on the sale of U.S. stocks and securities, provided they were physically present in the United States for fewer than 183 days during the calendar year and the trading is not part of an active U.S. trade or business.

Conclusion

IRS Publication 519 is the definitive tax guide for foreign nationals navigating the United States tax system. By establishing clear criteria for the Green Card Test, detailing the Substantial Presence Test, and outlining the distinct filing rules for resident and nonresident aliens, it brings clarity to cross-border tax compliance.

Whether you are an international student filing your first Form 8843, a temporary worker transitioning to resident status, or a foreign investor earning U.S. dividends, consulting Publication 519 ensures you file the correct returns, take full advantage of tax treaty benefits, and maintain total compliance with federal tax laws.

ARUN KP
Author

Entrepreneur | Tax Journalist | India-US Tax Consultant & Professional Accountant. Connect with me on LinkedIn.

Leave a Comment