Principal Residence Exclusion

IRC 121 – Principal Residence Exclusion
If a property owner has owned and lived in a principal residence for at least 2 out of the last 5 years preceding the sale of the principal residence, $250,000 if filing as a single ($500,000 on a joint return) of the gain from the sale, except for any depreciation taken on the property since May 6, 1997, can be excluded.

IRC 121 does not require the owner to live in the property at the time of the closing to qualify for the gain exclusion.