Get your taxes done using TurboTax

Gain or Loss on the sale of a primary residence equals the Sales Price minus sales costs minus the Adjusted Basis of the home (Purchase price plus the cost of any improvements to the home prior to the sale).