I am assuming because you are talking about u201c5 yearsu201d that you are an international student, and as such you are an u201cexempt individualu201d (exempt from the Substantial Presence Test) for the first 5 calendar years you were in student status, and would thus be a nonresident alien for the first 5 calendar years. After the 5 years, you are normally no longer an u201cexempt individualu201d as a student, and thus would normally pass the Substantial Presence Test and be a resident alien. Itu2019s possible to continue to be an u201cexempt individualu201d as a student after 5 calendar years, by claiming u201cCloser Connection to a Foreign Countryu201d.