Home sale taxes · IRS Publication 523Are seller closing costs tax deductible? How selling expenses work
Selling a main home, a seller does not take the closing costs as a separate deduction. Instead, IRS Publication 523 subtracts selling expenses from the sale price to get the amount realized, and gain is the amount realized minus the adjusted basis. Selling expenses are costs directly associated with selling the home: the real estate commission, advertising, legal fees, mortgage points or other loan charges the seller paid that would normally have been the buyer's, and other costs to sell. On the buying side, some settlement costs go into the buyer's basis – abstract and title search fees, legal fees for the contract and deed, recording fees, survey fees, transfer or stamp taxes, owner's title insurance and charges for installing utilities – while loan costs such as mortgage insurance, credit report, the lender's appraisal and points do not.
The seller's math (Pub. 523)
1. Sale price
From Form 1099-S box 2, or the closing documents.
2. Minus selling expenses
Commission, advertising, legal fees, buyer's loan charges the seller paid, other costs to sell.
3. = Amount realized
What the seller is treated as receiving.
4. Minus adjusted basis
Purchase price plus qualifying purchase costs and improvements.
5. = Gain or loss
Then the home sale exclusion may apply.
Buyer: settlement costs that go into basis
- Abstract and title search fees; legal fees for the contract and deed.
- Recording fees and survey fees.
- Transfer or stamp taxes.
- Owner's title insurance.
- Charges for installing utility services.
Not in basis
- Amounts placed in escrow for future taxes and insurance.
- Fire and casualty insurance premiums; rent or utilities for occupying before closing.
- Loan costs: mortgage insurance and VA funding fees, credit report, the lender's appraisal, points, assumption and refinancing fees.
Questions sellers ask
Can I deduct the real estate commission when I sell my house?
Not as a separate deduction. The commission is a selling expense that reduces the amount realized, and therefore the gain (IRS Publication 523).
Are transfer taxes deductible for a seller?
Not as a tax deduction; when the seller pays them they are an expense of the sale and reduce the amount realized (IRS Publication 530 and 523).
Which buyer closing costs add to basis?
Abstract and title fees, legal fees, recording and survey fees, transfer taxes, owner's title insurance and utility installation; loan costs do not (Publication 523).
Related guides
Every closed deal in ClosingCode keeps the final settlement statement, so a client who needs it for Publication 523 at tax time gets it right away.
Start free trialSource: IRS Publication 523, Selling Your Home, for use in preparing 2025 returns (irs.gov/pub523, read October 25, 2026).
General information, not tax advice. ClosingCode is software; it is not a tax preparer or CPA. This guide is not a substitute for the advice or services of an attorney.