Any gain or loss resulting from the sale or exchange of a principal residence in this state by a taxpayer who reinvests in another principal residence outside of this state must be treated in the same way for state income tax purposes as it is treated for federal income tax purposes.
N.D.C.C. § 57-38-01.13