The part of the mortgage greater than your basis is treated as a payment received in the year of sale. To figure the contract price, subtract the mortgage from the selling price. This is the total amount you will actually receive from the buyer. The contract price is then the same as your gross profit from the sale. This amount is included in the contract price and is treated as a payment received in the year of sale.
Buyer assumes other debts.
If the buyer assumes any other debts, such as a loan or back taxes, it may be considered a payment to you in the year of sale. If the buyer assumes the debt instead of paying it off, only part of it may have to be treated as a payment. Compare the debt to your installment sale basis in the property. If the debt is less than your installment sale basis, none of it is treated as a payment. If it is more, only the difference is treated as a payment.