The Substantial Presence Test determines whether a foreign national is treated as a US resident for tax purposes based on how much time they've spent in the United States. You meet the test if you were present in the US for at least 31 days in the current year and your total US days over the past three years — counting all current-year days, one-third of prior-year days, and one-sixth of the year before that — add up to 183 or more. Certain days don't count for this purpose: days when you're an exempt individual (diplomats, certain students and teachers, and people with a medical condition that prevented them from leaving), or days when you qualify for the closer connection exception. If you meet the test, you're treated as a US resident for the full year, subject to the same worldwide income tax as US citizens. Non-US citizens who spend significant time in the US should track their days carefully to avoid unexpectedly triggering US resident tax status.