Deductions & credits

Then if the mortgage payoff isn't deducted that amount would flow though to profit and capital gains tax would be due to it.   That doesn't sound right to pay tax on money you didn't receive.