Sorry to echo the previous respondents, but the IRS giveth and they taketh away. They intend for you to pay that money back--loss or no loss on the sale of the property. Talk to a good accountant. Unless you really need to sell, you may want to re-think selling until your 3 years is over. Good luck.