Investors & landlords

Because you used it as your residence AFTER it was rented, the exclusion is prorated.  It is best explained by a simplified example.

Let's say you bought the house for $100,000, sold it for $150,000, and took $10,000 of depreciation.  Let's also say it was your Principal Residence for exactly 60% of time (the actual calculation uses days), and it was your residence when it was sold.

In that scenario, the $10,000 of depreciation can not be excluded.  For the other $50,000 of gain, you can exclude 60% of it.  So you can exclude $30,000, but you will pay tax on the other $20,000 (plus the $10,000 of depreciation).