Yes. Gain on the sale of your principal residence is tax free to the extent of your home sale exclusion. The basic exclusion of $250,000 ($500,000 on a joint return) applies only if you owned and used the home for two out of five years preceding the date of sale. However, if you haven’t yet satisfied these tests, you can prorate the exclusion for the period of time you did meet them where the sale is because of a job change. The fact that you continue to work for the same company is irrelevant.
The difference between amount realized and adjusted basis on the sale or exchange of capital assets. Long-term capital gains are taxed favorably. Capital losses are deducted first against capital gains, and then again up to $3,000 of other income.