Just because you're not a U.S. citizen doesn't mean you don't owe taxes to the IRS. Whether or not you owe taxes depends on how much time you spend in the U.S.

If you’re not a U.S. citizen, you might think you don’t have to pay income taxes to the IRS. You’d be wrong. Noncitizens who spend enough time in the United States are subject to the same taxes as U.S. citizens. Two types of noncitizens must pay U.S. taxes:

green card holders, and

holders of nonimmigrant visas who satisfy the substantial presence test.

If you fall within either classification, you are a “resident alien” for tax purposes. Resident aliens must report all their income from all sources on their U.S. tax return and pay income tax on it at the same rates as U.S. citizens.

Green Card Holders

A green card holder is a person who is a lawful permanent resident of the United States, even if he or she lives abroad. If you have a green card, you must pay U.S. taxes even if you spend most of your time outside of the country.

Nonimmigrant Visa Holders

Nonimmigrant visa holders who are in the United States temporarily must pay U.S. income taxes if they satisfy the substantial presence test. This test is complicated and has many exceptions.

To meet this test, you must be physically present in the United States on at least:

31 days during the current year, and

183 days during the 3-year period that includes the current year and the two years immediately before that.

However, you don't count all the days you were present in the U.S. during the previous two years. You count 1/3 of the days you were present in the first year before the current year, and 1/6 of the days you were present in the second year before the current year.

Example: You were physically present in the United States on 122 days in each of three consecutive years. To determine if you meet the substantial presence test for the most recent year, count the full 122 days of presence that year, 41 days for the year prior to that (1/3 of 122), and then 20 days for the year prior to that (1/6 of 122). The total for the 3-year period is 183 days, so you are considered a resident under the substantial presence test for the most recent year.

Days of presence in the United States

You are treated as present in the United States on any day you are physically present in the country, at any time during the day. However, do not count:

days you regularly commute to work in the United States from a residence in Canada or Mexico

days you are in the United States for less than 24 hours while travelling

days you are unable to leave the United States because of a medical condition that develops while you are in the United States, or

days you are an exempt individual--for example, you're a: (1) student temporarily present in the United States under an "F, " "J, " "M, " or "Q" visa; (2) teacher or trainee temporarily present under a "J " or "Q" visa; or (3) diplomat, foreign government employee, or otherwise related to a foreign government employee.

If you exclude days of presence in the United States because you fall into a special category, you must file a fully-completed Form 8843, Statement for Exempt Individuals and Individuals with a Medical Condition (PDF).

Closer connection exemption

Even if you satisfy the substantial presence test, you can still avoid paying U.S. income taxes if you:

are present in the United States for less than 183 days during the current year

have not applied for a green card

have a closer connection with a foreign country than with the U.S., and

maintain a tax home in this foreign country during the year.

To win with this test, you must show the IRS that you maintain more significant contacts with a foreign country than with the United States.

Filing Your Taxes

If you're a resident alien, all the tax rules applicable to United States citizens, also apply to you. You can claim the same deductions allowed to U.S. citizens if you were a resident alien for the entire tax year. If you do not itemize your deductions, you can claim the standard deduction. Resident aliens also generally claim tax credits and report tax payments, including withholding, using the same rules that apply to U.S. citizens.

You can claim personal exemptions for dependents who are citizens or nationals of the United States or residents of the United States, Canada, or Mexico for some part of the calendar year. You can also claim an exemption for your spouse if you file a Married Filing Separate return if your spouse had no gross income for U.S. tax. You can claim this exemption even if your spouse has not been a resident alien for a full tax year or is an alien who has not come to the United States.

Obviously, it’s unfair for a resident alien to have to pay United States income tax on income derived from a foreign country and to have to pay tax in the foreign country on the same income. To avoid double taxation, nonresident aliens may claim a foreign tax credit for the lesser of the taxes they paid in their home country, or the amount of their U.S. tax liability for income from foreign sources.

The due date for filing your tax return and paying any tax due is April 15 of the year following the year for which you are filing a return. You are allowed an automatic extension to June 15 to file if your main place of business and the home you live in are outside the United States and Puerto Rico on April 15. You can also get an automatic extension of time to file until October 15 by filing Form 4868 on or before April 15 (June 15 if you qualify for the June 15 extension).