Deductions & credits

what I can find in Publication 523 in that the Sales Price is everything You receive for selling you home. So it is the amount after the mortgage payoff is removed.