Deductions & credits

Selling price is the gross amount you got before paying off the mortgage.   You actually got it, it just went to something you owed.  It was for your benefit.  Selling price is not your net proceeds.