Is Mortgage Payoff a Selling Expense for Tax Purposes?

Paying off your mortgage at closing is not a selling expense for tax purposes. The IRS treats the payoff as settling a personal debt, not as a cost of transferring the property to a buyer, so it does not reduce the taxable gain on your home sale. It shares a page with your commissions and title fees on the closing statement, but it lives on a different side of the tax ledger.

Why the Payoff Doesn’t Reduce Your Gain

When your lender originally handed you the loan money, you didn’t pay tax on it. Returning that borrowed money at closing is just repaying capital. You aren’t spending anything new to get the sale done; you’re clearing an obligation you already had.

IRS Publication 523 defines selling expenses as “costs directly associated with selling your home” and lists specific categories: commissions, advertising fees, legal fees, and certain loan charges you cover for the buyer. Mortgage principal repayment isn’t on that list. The gain calculation subtracts only selling expenses from the sale price to reach the amount realized, then subtracts your adjusted basis to find gain or loss. Your loan balance never enters either side of that equation.1Internal Revenue Service. Publication 523 (2025), Selling Your Home

Two neighbors sell identical houses for $400,000 on the same day with the same commissions. One owes $300,000 on a mortgage; the other owns free and clear. Their taxable gain is exactly the same. The loan balance changes how much cash each seller walks away with, not how much profit the IRS sees.

What Actually Counts as a Selling Expense

Every dollar of qualifying selling expense reduces your amount realized, which directly reduces any taxable gain. Publication 523 identifies these categories:1Internal Revenue Service. Publication 523 (2025), Selling Your Home

  • Real estate commissions, typically 5% to 6% of the sale price split between the listing and buyer’s agents, though rates are negotiable.
  • Legal fees for document preparation, title work, and closing representation.
  • Advertising costs paid to market the property, including professional photography, listing fees, and staging hired to sell the home.
  • State or local transfer taxes imposed when the deed changes hands. Some jurisdictions impose none.
  • Mortgage points or loan charges you agreed to pay on the buyer’s behalf.
  • Other fees tied directly to closing, such as recording and escrow charges.

Seller-paid transfer taxes and points paid for the buyer both reduce your amount realized.2Internal Revenue Service. Tax Information for Homeowners An owner’s title insurance policy paid by the seller, which is customary in many markets, can fall under the catch-all “other fees or costs to sell your home” when it’s directly tied to completing the transaction.1Internal Revenue Service. Publication 523 (2025), Selling Your Home

The Parts of Your Payoff That Are Deductible

Your payoff figure is not pure principal. It includes accrued interest from the last regular payment through the closing date, and that interest portion is deductible as home mortgage interest on your return for the year of the sale. You can deduct all mortgage interest paid up to, but not including, the date of sale.3Internal Revenue Service. Publication 936 (2025), Home Mortgage Interest Deduction

The IRS gives this example: if you made regular payments through April and the home sold on May 7, you’d deduct your regular interest payments plus the prorated interest for those six days in May shown on the settlement sheet. That prorated amount is easy to miss because it’s baked into the payoff figure rather than broken out separately. Read the payoff statement and closing disclosure carefully to pull it out.

A prepayment penalty, if your lender charges one for paying the loan off early, is also deductible as mortgage interest, provided the penalty isn’t a fee for a specific service the lender performed.3Internal Revenue Service. Publication 936 (2025), Home Mortgage Interest Deduction This deduction lowers taxable income for the year; it doesn’t reduce the gain on the sale.

How the Gain Is Actually Calculated

The formula keeps mortgage debt completely out of the picture:

Adjusted basis starts with what you originally paid, including certain purchase closing costs like title insurance, recording fees, transfer taxes, and legal fees, and increases with qualifying improvements made over the years.4Internal Revenue Service. Publication 551, Basis of Assets Improvements add value, extend the home’s useful life, or adapt it to a new use: additions, a new roof or furnace, a kitchen renovation, central air, insulation, a driveway or fence. Painting a room or patching a leak is ordinary maintenance and doesn’t count. A single repair done as part of a larger renovation, such as replacing one window while replacing them all, does count.1Internal Revenue Service. Publication 523 (2025), Selling Your Home

Say you sell for $500,000, pay $30,000 in commissions, $2,000 in legal fees, and $3,000 in transfer taxes. Amount realized: $465,000. You bought for $280,000 with $5,000 in qualifying purchase closing costs, then spent $40,000 on a kitchen renovation and new roof. Adjusted basis: $325,000. Gain: $140,000. Whether you owed $50,000 or $350,000 on the loan at closing, the gain is still $140,000.

One boundary worth flagging: most sellers of a primary residence won’t owe federal tax on that gain because Section 121 lets a single filer exclude up to $250,000 and a married couple filing jointly up to $500,000, provided the ownership and use tests are met.5Office of the Law Revision Counsel. 26 USC 121 – Exclusion of Gain From Sale of Principal Residence That exclusion runs alongside the selling-expense question but doesn’t change the answer to it.

Net Cash at Closing Is Not Your Taxable Gain

This is where the payoff creates the most confusion. Net proceeds are what you deposit after closing. Taxable gain is what the IRS cares about. Different numbers, different calculations.

The settlement agent uses the buyer’s funds to pay off your mortgage, cover selling expenses, and settle prorated taxes and other adjustments. Whatever’s left is your net proceeds. A seller with a $400,000 sale, $30,000 in selling expenses, and a $280,000 payoff walks away with about $90,000 in cash. But if that seller’s adjusted basis was $200,000, the taxable gain is $170,000, nearly double the cash received.

It runs the other direction too. A seller who paid the loan off years ago may receive a large check but show only a modest gain if the home hasn’t appreciated much since purchase. Planning around cash at closing alone, without running the gain calculation separately, is how sellers get surprised in April.

What Happens to Your Escrow Balance

If your mortgage included an escrow account for property taxes and homeowner’s insurance, any remaining balance at payoff belongs to you. Federal rules require the loan servicer to return that balance within 20 business days of the payoff.6Consumer Financial Protection Bureau. Timely Escrow Payments and Treatment of Escrow Account Balances The servicer can also net the escrow balance against your outstanding loan balance at payoff, reducing what you owe. Either way, the refund is your own money coming back. It isn’t income, and it isn’t a selling expense.