You will be considered a United States resident for tax purposes if you meet the substantial presence test for the calendar year. To meet this test, you must be physically present in the United States (U.S.) on at least: 31 days during the current year, and 183 days during the 3-year period that includes the current year and the 2 years immediately before that, counting: All the days you were present in the current year, and 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 U.S. on 120 days in each of the years 2021, 2022 and 2023. To determine if you meet the substantial presence test for 2023, count the full 120 days of presence in 2023, 40 days in 2022 (1/3 of 120), and 20 days in 2021 (1/6 of 120). Since the total for the 3-year period is 180 days, you are not considered a resident under the substantial presence test for 2023. Days of presence in the United States You are treated as present in the U.S. on any day you are physically present in the country, at any time during the day. However, there are exceptions to this rule. Do not count the following as days of presence in the U.S. for the substantial presence test: Days you commute to work in the U.S. from a residence in Canada or Mexico if you regularly commute from Canada or Mexico. Days you are in the U.S. for less than 24 hours, when you are in transit between two places outside the United States. Days you are in the U.S. as a crew member of a foreign vessel. Days you are unable to leave the U.S. because of a medical condition that develops while you are in the United States. Days you are an exempt individual (see below). For details on days excluded from the substantial presence test for other than exempt individuals, refer to Publication 519, U.S. Tax Guide for Aliens. The term United States (U.S.) includes the following areas: All 50 states and the District of Columbia. The territorial waters of the United States. The seabed and subsoil of those submarine areas that are adjacent to U.S. territorial waters and over which the United States has exclusive rights under international law to explore and exploit natural resources. The term does not include U.S. territories or U.S. airspace. Exempt individual Do not count days for which you are an exempt individual. The term "exempt individual" does not refer to someone exempt from U.S. tax, but to anyone in the following categories: An individual temporarily present in the U.S. as a foreign government-related individual under an “A” or “G” visa, other than individuals holding “A-3” or “G-5” class visas. A teacher or trainee temporarily present in the U.S. under a "J" or "Q" visa, who substantially complies with the requirements of the visa. A student temporarily present in the U.S. under an "F," "J," "M," or "Q" visa, who substantially complies with the requirements of the visa. A professional athlete temporarily in the U.S. to compete in a charitable sports event. If you exclude days of presence in the U.S. for purposes of the substantial presence test because you were an exempt individual or were unable to leave the U.S. because of a medical condition or medical problem, you must include Form 8843, Statement for Exempt Individuals and Individuals With a Medical Condition, with your income tax return. If you do not have to file an income tax return, send Form 8843 to the address indicated in the instructions for Form 8843 by the due date for filing an income tax return. If you do not timely file Form 8843, you cannot exclude the days you were present in the U.S. as an exempt individual or because of a medical condition that arose while you were in the U.S. This does not apply if you can show, by clear and convincing evidence that you took reasonable actions to become aware of the filing requirements and significant steps to comply with those requirements. Closer connection exception to the substantial presence test Even if you met the substantial presence test you can still be treated as a nonresident of the United States for U.S. tax purposes if you qualify for one of the following exceptions: The closer connection exception. Please refer to Closer Connection Exception to the Substantial Presence Test . The closer connection exception available only to students. Please refer to The Closer Connection Exception to the Substantial Presence Test for Foreign Students. Related Determining an Individual’s Tax Residency Status Individuals topic Tools Taxpayer Advocate Affordable Care Act Online tools and updates International taxpayers videos International taxpayers news releases International taxpayers interactive tools