Navigating the financial landscape of the United States as an immigrant requires a clear understanding of tax obligations and potential benefits. Whether you are here as a permanent resident, on a temporary visa, or are currently undocumented, your tax compliance is a cornerstone of long-term financial stability. With millions of foreign-born individuals contributing to the U.S. economy, the Internal Revenue Service (IRS) has established specific criteria to determine how you are taxed, often revolving around residency status and physical presence within the country.
This guide serves as a comprehensive resource to help you untangle the complexities of the U.S. tax system. By understanding the distinctions between resident and nonresident aliens and how the Substantial Presence Test operates, you can ensure you meet your legal requirements while identifying every available tax advantage.
It is common for newcomers to find the terminology confusing because the rules for immigration and the rules for taxation do not always align. For immigration purposes, the U.S. Citizenship and Immigration Services (USCIS) generally classifies foreign individuals into three categories:
Immigrants (Lawful Permanent Residents): These individuals have been granted the right to live and work in the U.S. indefinitely. They typically hold a “green card” (Form I-551). For tax purposes, these individuals are almost always treated as resident aliens.
Nonimmigrants: These are individuals residing in the U.S. temporarily, usually under a specific visa (such as an H-1B, F-1, or J-1). Their tax treatment often depends on how long they have been in the country.
Undocumented Aliens: This category includes those who entered the country without documentation or those who have stayed beyond the expiration of their authorized period. While their immigration status is sensitive, the IRS still requires them to file taxes if they earn income, and they may be classified as resident aliens if they meet certain physical presence requirements.
From the perspective of the IRS, the focus is much narrower. The tax code cares primarily about whether you are a Resident Alien or a Nonresident Alien. Resident aliens are taxed on their worldwide income from all sources, much like U.S. citizens. Nonresident aliens, however, are generally only taxed on income derived from U.S. sources or income effectively connected to a U.S. trade or business.

An individual who is not a U.S. citizen will be considered a resident for tax purposes if they meet one of the following three criteria:
If you are a Lawful Permanent Resident at any time during the calendar year, you pass the Green Card Test. Your residency for tax purposes starts on the first day you are physically present in the U.S. as a permanent resident. This status remains in effect until it is officially rescinded by the USCIS or a federal court, or if you formally abandon the status.
Even without a green card, you may be considered a resident alien if you spend enough time in the U.S. over a three-year period. To pass this test, you must be present for:
At least 31 days during the current calendar year; AND
A total of 183 “test days” over the current year and the two preceding years.
The calculation for those 183 days uses a weighted formula: you count all the days in the current year, one-third of the days in the year before, and one-sixth of the days in the year before that.
If you arrive late in the year and do not yet meet the Substantial Presence Test, you may be able to elect “First-Year Choice” status. This allows you to be treated as a resident for the part of the year you were present, effectively creating a dual-status tax year. This is often beneficial for those looking to claim specific deductions or credits earlier than they otherwise would.
Consider Maria, a foreign national who frequently visits the U.S. for business and leisure. For 2026, Maria spent 112 days in the country. In 2025, she spent 119 days, and in 2024, she was present for 136 days. While she meets the 31-day requirement for the current year, let's see if she reaches the 183-day threshold.
Year | Actual Days | Multiplier | Test Days |
2026 | 112 | 1.0 | 112.00 |
2025 | 119 | 0.333 | 39.63 |
2024 | 136 | 0.167 | 22.71 |
Total | - | - | 174.34 |
Because Maria’s total weighted days (174.34) are less than 183, she is considered a nonresident alien for 2026.

Not every day spent on U.S. soil counts toward the Substantial Presence Test. The IRS allows you to exclude certain days, including:
Regular Commutes: Days you commute to work in the U.S. from your residence in Canada or Mexico.
Transit: Days you are in the U.S. for less than 24 hours while traveling between two foreign points.
Medical Conditions: Days you were unable to leave the U.S. because of a medical condition that arose while you were here.
Exempt Individuals: This category includes foreign government-related individuals, certain teachers or trainees on J or Q visas, students on F, J, M, or Q visas, and professional athletes competing in charitable events. Note that “exempt” here means exempt from counting days, not necessarily exempt from paying tax.
Even if you meet the 183-day criteria, you may still be able to avoid being taxed as a resident if you can prove you have a “closer connection” to another country. To qualify, you must have spent fewer than 183 days in the U.S. during the current year and maintain a tax home in a foreign country. This requires filing a specific statement with your Form 1040NR to verify your foreign ties.
The first year of residency can be particularly complex. If you become a resident during the year but were a nonresident the year prior, you are typically treated as a dual-status alien. You will be a nonresident for the period before your residency start date and a resident for the remainder of the year. This often involves filing both Form 1040 and Form 1040NR simultaneously.
For married couples, there are additional elections available. If both spouses are residents by the end of the year, they can elect to be treated as residents for the entire year to file a joint return, which may offer more favorable tax brackets and deductions.

Determining your exact tax status and the most beneficial filing method is a nuanced process. Mistakes can lead to missed credits or unexpected tax bills. If you are navigating your first few years of U.S. taxation, contact our office to ensure your filings are accurate and optimized for your unique situation. Schedule a consultation today to secure your financial future.
Beyond the basic tests of residency, the Internal Revenue Service provides several specific elections and provisions that can significantly alter a taxpayer's liability and reporting requirements. These nuances are often the difference between a standard tax filing and a sophisticated international tax strategy tailored to a newcomer's unique financial footprint.
While we previously touched on the First-Year Choice, it is important to understand the strict mechanical requirements under Section 7701(b)(4) of the Internal Revenue Code. This election is a powerful tool for individuals who arrive in the United States mid-to-late in the year and do not meet the Substantial Presence Test for that initial period. To qualify, you must meet a specific sequence of criteria: you must not have been a resident in the prior year, you must be a resident under the Substantial Presence Test in the following year, and you must be present in the U.S. for at least 31 consecutive days during the election year. Furthermore, you must meet a 75% presence threshold from the start of that 31-day period through the end of the year. This election allows for a dual-status filing, providing access to resident tax benefits such as the standard deduction or dependency exemptions for the months you were physically present. This can be particularly valuable for professionals relocating to the U.S. in the third or fourth quarter of the year.
For married immigrants where one spouse is a resident alien and the other remains a nonresident alien at the end of the calendar year, Section 6013(g) offers a unique opportunity. By making this election, the couple can choose to treat the nonresident spouse as a resident for the entire tax year. This allows the couple to file a joint return, which typically results in more favorable tax brackets and a higher standard deduction compared to filing as Married Filing Separately. However, this benefit comes with a significant global reporting requirement: the couple must report their combined worldwide income for the entire calendar year. This means income earned in their home country before arriving in the U.S. must be disclosed and taxed by the IRS. While foreign tax credits may be used to mitigate double taxation, the election requires careful long-term planning because it remains in effect for all future years unless specifically suspended or revoked.
International tax treaties often serve as the ultimate authority when residency rules between two countries conflict. If an individual is considered a resident of both the U.S. and another country—a situation known as dual residency—tax treaties provide 'tie-breaker' rules to resolve the issue. These rules prioritize factors such as the location of the individual's permanent home, their center of vital interests (where their personal and economic ties are strongest), their habitual abode, and finally, their nationality. Utilizing a treaty position to be treated as a nonresident alien can exempt certain types of income, such as pensions, interest, or dividends, from U.S. tax. However, asserting a treaty-based position requires the filing of Form 8833, Treaty-Based Return Position Disclosure. It is important to note that even if you are a nonresident under a treaty, you may still be considered a resident for other reporting purposes, such as FBAR (Foreign Bank and Financial Accounts) and FATCA (Foreign Account Tax Compliance Act) requirements.
Social Security and Medicare taxes, collectively referred to as FICA, follow distinct rules for certain visa holders. Nonresident aliens who are in the U.S. on F, J, M, or Q visas are generally exempt from FICA taxes on wages earned for services performed to carry out the purpose of their visa. This exemption is a significant financial benefit for students and researchers, as it effectively increases their take-home pay. However, this exemption is only available while the individual is classified as a nonresident alien for tax purposes. As soon as a student passes the Substantial Presence Test—which typically occurs after five calendar years of presence—they are reclassified as resident aliens and must begin contributing to the Social Security and Medicare systems. Additionally, the U.S. has 'Totalization Agreements' with over 30 countries to prevent double social security taxation, ensuring that workers do not pay into two different systems on the same income.
For many immigrants, obtaining an ITIN is a critical step toward full tax compliance. The IRS issues ITINs to individuals who are required to have a U.S. taxpayer identification number but are not eligible for a Social Security Number. This includes nonresident aliens filing a return to claim a refund, resident aliens who do not yet have work authorization, and dependents or spouses of U.S. citizens and residents. The application process involves submitting Form W-7 and verifying your identity and foreign status with original identification documents, such as a passport. Because the process of mailing original documents can be burdensome, many taxpayers utilize a Certifying Acceptance Agent. These authorized professionals are empowered by the IRS to verify documents and facilitate the application process, ensuring that sensitive identification papers remain in the owner's possession.
It is vital to remember that residency for federal tax purposes does not automatically dictate residency at the state level. Each state maintains its own definitions and tests. Some states use a statutory resident test, while others focus on domicile—the place an individual considers their true, permanent home. States like California, New York, and Virginia are particularly known for rigorous residency audits. Furthermore, not all states honor federal tax treaties. An immigrant might find that while their income is exempt from federal tax due to a treaty with their home country, it remains fully taxable at the state level. Understanding these discrepancies is essential for accurate quarterly estimated tax payments and ensuring that all regional filing obligations are met alongside federal requirements.
If you meet the Substantial Presence Test but maintain a 'closer connection' to a foreign country, you must file Form 8840 to avoid being taxed as a resident alien. The IRS evaluates these claims based on the location of your family, your permanent home, your automobiles, and even your social affiliations. It also considers where you are registered to vote and where you maintain your driver's license. Successfully claiming a closer connection requires documented evidence that your economic and social life remains rooted outside the United States. Failing to file this form on time can result in the IRS denying the exception and taxing you as a resident alien on your worldwide income. This underscores the importance of maintaining detailed records of your international ties and travel dates throughout the year.
Sign up for our newsletter.