I'm a US citizen considering a move abroad, and feel like I'm seeing conflicting things about the tax treatment of capital gains. We're not sure the move would be permanent, so might not sell our house in the US right away. Some sources seem to suggest that if we sold our house in the US while living in Canada, we wouldn't get the usual capital gains deduction, while some don't mention this issue. The IRS says you can't get the exemption if you are "subject to expatriate tax" but I can't figure out what that phrase means (they refer to the guide for aliens, which makes me hope it doesn't apply to US citizens abroad). Can anyone clarify?
For US taxes, you'll be able to utilize the capital gains tax exemption as long as you've lived in the house as your primary residence for 2 of the previous 5 years, which means you have 3 years to decide what to do.
For Canadian taxes, you don't have to pay capital gains taxes on a home for any period of time it was your permanent residence. Calculating it is a little tricky, but you'd only owe capital gains taxes on the portion of the gains after you moved, not the period it was your primary residence.
I just recently made the move from the US to Canada myself and am working on a tax guide. It'll be up on my site soon. I'm not an accountant or an attorney, though, so I'm basing this off information available through the IRS and CRA.