Can Mortgage Payoff Be Deducted From Capital Gains?

No, a mortgage payoff cannot be deducted from capital gains. Paying off the remaining loan balance at closing is a debt repayment to your lender, not a cost of buying or selling the property, so the IRS leaves it out of the gain calculation entirely. Your taxable profit turns on what you originally paid for the home, what you spent improving it, and what it cost you to sell. It does not turn on how much you still owed the bank.

The confusion is understandable. On the settlement statement, the mortgage payoff sits right next to the commission and transfer taxes coming out of your proceeds, and it all looks like money leaving your pocket. But for tax purposes, returning borrowed money is not an expense of the sale.

How the Gain Is Actually Calculated

The IRS uses one formula: sale price, minus selling expenses, minus your adjusted basis. What remains is your capital gain or loss. You report it on Form 8949 and summarize it on Schedule D.1Internal Revenue Service. Publication 523 (2025), Selling Your Home

Holding period sets the rate. One year or less is short-term, taxed at ordinary income rates. More than one year is long-term, taxed at 0%, 15%, or 20% depending on taxable income.2Internal Revenue Service. Topic No. 409, Capital Gains and Losses For 2026, single filers hit the 15% long-term bracket above $49,450 and the 20% bracket above $545,500; married couples filing jointly hit 15% above $98,900 and 20% above $613,700.

Nowhere in that formula does the loan balance appear.

Why the Loan Balance Is Irrelevant

The IRS taxes profit on the asset itself and ignores how you financed the purchase. Two neighbors buy identical houses for $300,000. One pays cash. The other puts down 5% and carries a $285,000 mortgage. Both have the same adjusted basis of $300,000, plus whatever they later add for improvements and buying costs. If both sell for $500,000 ten years later, both have the same capital gain, regardless of what one of them still owes the bank. The loan balance changes how much cash the seller walks out of closing with. It does not change the profit the IRS taxes.

A worked example makes the point sharper. You bought your home for $350,000. Over the years you spent $40,000 on capital improvements, so your adjusted basis is $390,000. You sell for $550,000 and pay $35,000 in selling expenses. Your capital gain is $550,000 minus $35,000 minus $390,000, or $125,000. That figure stays $125,000 whether your remaining mortgage was $250,000, $50,000, or zero. The payoff affects the check you receive from the title company. It does not affect your tax bill.

Mortgage-Related Costs That Do Affect Taxes

The principal balance is irrelevant, but several costs tied to the mortgage do move numbers on your return. They move different numbers than sellers usually assume.

Mortgage Interest

The monthly interest you paid during ownership is an itemized deduction on Schedule A while you own the home.3Internal Revenue Service. Publication 936 (2025), Home Mortgage Interest Deduction It reduces ordinary income tax in the years you paid it. It never flows into the capital gains calculation. Years of interest payments do not increase your basis, do not reduce your sale price, and do not shrink your gain.

Points

Points you paid when you took out the loan are treated as prepaid interest. You can usually deduct them in the year of purchase if you meet certain conditions, or spread the deduction over the life of the loan. If any undeducted balance remains when you sell, you can deduct what’s left in the year of sale.1Internal Revenue Service. Publication 523 (2025), Selling Your Home Either way, points reduce ordinary income tax, not the capital gain.

Points you pay as a seller to help the buyer get financing work differently. Those are treated as selling expenses that reduce your amount realized on the sale.4Internal Revenue Service. Topic No. 504, Home Mortgage Points

Prepayment Penalties

If your lender charges a penalty for paying off the loan early, the IRS treats that penalty as deductible mortgage interest, not a selling cost.3Internal Revenue Service. Publication 936 (2025), Home Mortgage Interest Deduction It goes on Schedule A and reduces ordinary income tax for the year of sale. It does not reduce your capital gain.

What Actually Reduces the Gain

Two things do the real work of shrinking a taxable gain: your adjusted basis, and your selling expenses.

Adjusted Basis

Your basis starts with what you paid for the home. Add closing costs from the purchase that were not deducted elsewhere: title insurance, legal fees, transfer taxes, survey fees, and recording charges all qualify.5Internal Revenue Service. Publication 551, Basis of Assets

Then add capital improvements you made during ownership: projects that add value, extend the home’s useful life, or adapt it to a new purpose. A new roof, an added bathroom, a finished basement, central air conditioning, a paved driveway. Routine maintenance and cosmetic repairs do not count. Patching drywall, repainting rooms, and fixing a leaky faucet keep the property running but do not increase basis.5Internal Revenue Service. Publication 551, Basis of Assets

Some events reduce basis. Depreciation you claimed (or could have claimed) on a rental or home office reduces it. Casualty insurance reimbursements and any casualty loss deductions you took reduce it.6Internal Revenue Service. Publication 547 (2025), Casualties, Disasters, and Thefts Residential energy credits reduce the basis increase you would otherwise get from the improvement they funded.7Internal Revenue Service. Instructions for Form 5695

Keep receipts. A forgotten $15,000 kitchen remodel from a decade ago is $15,000 of gain you will pay tax on unnecessarily.

Selling Expenses

Selling expenses come off the sale price to produce your amount realized.1Internal Revenue Service. Publication 523 (2025), Selling Your Home They should all appear on your closing disclosure. Common ones:

  • Real estate commissions, typically the largest cost, covering both listing and buyer’s agents.
  • Legal fees for drafting the contract, reviewing closing, or clearing title defects.
  • Advertising and staging costs paid to market the home, including professional photography.
  • Title and escrow charges paid by the seller, including title insurance premiums and settlement fees.
  • State or local transfer taxes, documentary stamp taxes, or excise taxes the seller owes at closing.
  • Points you pay to the buyer’s lender to help the buyer secure financing.8Internal Revenue Service. Publication 936 (2025), Home Mortgage Interest Deduction – Section: Points Paid by the Seller

Every dollar of legitimate selling expense directly reduces your taxable gain. The mortgage payoff, sitting on the same closing statement, does not.

Why Most Sellers Owe Nothing Anyway

Even after all of this, most homeowners walk away without a tax bill because of the primary residence exclusion under Section 121. If you owned the home and lived in it as your primary residence for at least two of the five years before the sale, you can exclude up to $250,000 of gain as a single filer or $500,000 as a married couple filing jointly.9Office of the Law Revision Counsel. 26 USC 121 – Exclusion of Gain From Sale of Principal Residence The two years do not have to be consecutive; they just have to total 24 months within the five-year window.

For a married couple claiming the full $500,000, both spouses must meet the use requirement, though only one has to meet the ownership requirement. Neither spouse can have used the exclusion on another home sale within the past two years.9Office of the Law Revision Counsel. 26 USC 121 – Exclusion of Gain From Sale of Principal Residence

If you sell before hitting two years because of a job relocation, health issue, or certain unforeseen circumstances, you may qualify for a prorated exclusion. The partial exclusion equals the fraction of the two-year period you actually lived there, multiplied by the $250,000 or $500,000 cap.10Office of the Law Revision Counsel. 26 U.S. Code 121 – Exclusion of Gain From Sale of Principal Residence A single filer who lived in the home 12 months before a qualifying job transfer could exclude up to $125,000.

The exclusion applies after you calculate the gain. So the arithmetic still matters: you need an accurate basis and an accurate list of selling expenses to know whether your gain lands inside the exclusion or spills past it. The mortgage payoff, though, stays out of that arithmetic from start to finish.