Residency rules vary from state to state. For example, if you spend more than a certain number of days in some states, you're considered a resident even if you were not living in the state for very long.
It's best to check with your State Department of Revenue for specific residency rules, especially as they apply to your particular situation. In the meantime, use the examples below as a general guideline.
Resident examples
Nonresident examples
Part-year resident examples