Investors & landlords

If you moved due to orders then you can prorate the exclusion so the amount you profited  would be tax free.