@Pacun, no, this is not correct. Please see the exception in the code sec I posted above. Because all of the rental came after the period of being used as a residence, as long as the taxpayer used it for 2 years out of the last 5, hasn't used the exclusion on another home in the last 2 years, and meets the use requirement, he or she will be allowed the full exclusion. The only thing will be to segregate out the gain resulting from the depreciation taken that will be taxed at ordinary rates.