You are a resident of Montana for individual income tax purposes if you live in Montana or if you maintain a permanent home in Montana. You will not lose your Montana residency if you left the state temporarily with the intention of returning. Your Montana residency is lost, or changed, when you establish a permanent residence outside of Montana with no intention of returning. Unless there is a specific statutory exception, if you establish Montana residency for any other purpose, you are considered a Montana resident for income tax purposes.
You are a nonresident of Montana if you did not consider Montana your home at any time during the tax year even though you may have lived and worked in Montana temporarily during the tax year.
You are a part-year resident of Montana if you moved to or from of Montana during the tax year with the intention of establishing a permanent residence in your new state.