Deductions & credits

You don't have to have owned the home for 5 years. To get the exclusion, you have to have owned and lived in the home for 2 out of the last 5 years ending on the date of sale.