The IRS considers you a U.S. resident if you were physically present in the U.S. on at least 31 days of the current year and 183 days during a three-year period. The three-year period consists of the current year and the prior two years.