Your tax status as a foreign national in the United States depends on whether you qualify as a resident alien or a nonresident alien, and the difference affects what income is taxable and which forms you file. A resident alien is taxed just like a U.S. citizen — on worldwide income from all sources — and files the standard Form 1040. A nonresident alien is generally only taxed on U.S.-source income and files Form 1040-NR instead. You're considered a resident alien if you hold a green card or if you meet the substantial presence test, which requires being in the U.S. for at least 183 days using a weighted formula over three years. People who are in the U.S. on certain temporary visas (like F-1 student visas) may be exempt from the substantial presence test for a limited number of years. The distinction matters because resident aliens have access to deductions and credits that nonresident aliens do not.