Do selling costs and realtor commission reduce capital gains on home sale?

Sold my house last month and I'm already stressed about next year's return. My realtor took a pretty significant commission, and on top of that I paid closing costs, title fees, transfer taxes, the works. Someone told me those costs come off the gain before I figure out what's taxable, but someone else said only the exclusion matters and costs don't factor in. I've been reading Publication 523 on the irs.gov site and it talks about adjusted basis and amount realized but I'm getting confused about which costs go where. Do selling costs and realtor commission reduce capital gains on home sale, or do they only matter if my gain is above the exclusion? I owned the home about 6 years, lived there the whole time, filing single.

37 comments

Realtor commission absolutely reduces your gain. What matters is your "amount realized" — that's your sale price minus selling expenses. So yes, the commission, title fees, transfer taxes, settlement fees you paid as the seller, all of those come off the sale price before you even start calculating gain. The gain is amount realized minus your adjusted basis in the home. Publication 523 has a worksheet that walks you through it step by step.

Naomi T.

Author

So the commission comes off the top before the exclusion math even starts? That's a relief because I was treating it like those two things were totally separate.

Confirmed. Your gain = amount realized (sale price minus selling costs including commission) minus your adjusted basis (what you paid plus improvements minus any basis reductions). Then you apply the exclusion to whatever gain remains. The selling costs don't just disappear — they directly shrink the number you're working with.

Yes, and this means if your exclusion already covers your whole gain anyway, those costs are kind of a moot point for federal taxes. But they still matter if you're close to the exclusion limit.

Naomi T.

Author

Makes sense. I'm probably under the exclusion limit but I want to get the number right regardless.

Went through this exact calculation last spring when I sold. I uploaded my closing disclosure and settlement statement to taxr.ai and it identified every line that counted as a selling expense versus what was a lender fee or prepaid that wouldn't reduce my gain. Saved me from incorrectly including things like prepaid homeowner's insurance which don't count. Good tool for parsing those documents before you sit down to do the math.

Naomi T.

Author

That's really helpful — my closing disclosure has like 4 pages of line items and I honestly wasn't sure which ones qualified.

Exactly the problem. Some lines look like closing costs but they're really prepaid escrow items. The settlement statement details matter a lot here.

Don't forget your adjusted basis can also be higher than what you originally paid. If you added a deck, finished a basement, replaced the roof — those capital improvements get added to your basis, which also reduces your gain. Worth digging up those receipts.

Yes, this. I found old receipts for a kitchen remodel and it reduced my gain by a meaningful amount. Routine repairs don't count though, only permanent improvements that add value or extend the life of the home.

Naomi T.

Author

I did replace all the windows about 3 years in. Good to know that counts.

Worth clarifying the exclusion eligibility since you mentioned it. For single filers, Publication 523 lays out the ownership and use test — you need to have owned the home at least 24 months AND used it as your main residence at least 24 months out of the 5 years before the sale. The 24 months don't have to be consecutive. With 6 years of ownership and living there the whole time, you'd easily qualify assuming no other exclusions used in the prior 2-year window.

Naomi T.

Author

Haven't sold any other home recently so I should be fine on that. Good point to double-check though.

My own snag was a home office: I had a home office deduction for several years, and my CPA said I had to reduce my exclusion by the depreciation I had claimed on that portion of the home. So if you've ever taken a home office deduction, factor that in too. The depreciation recapture part doesn't get excluded.

Yes, the gain equal to depreciation on the business-use portion is unrecaptured section 1250 gain taxed at up to 25%, not at the regular capital gains rates, and it doesn't get covered by the section 121 exclusion. Important detail.

No home office here but good flag for anyone who has claimed one.

Did you get a Form 1099-S from the settlement agent? If so, you have to report the sale on Form 8949 even if your gain is fully excluded. If you didn't receive a 1099-S and your gain is under the exclusion, you generally don't have to report it at all. Worth checking what you got at closing.

Naomi T.

Author

I'll look through my closing documents. I don't remember seeing one but I may not have known what to look for.

It sometimes comes in the same envelope as other closing paperwork. If you did get one, your sale goes on Form 8949 Part II, and you use code H with the excluded amount as a negative in column (g).

Had a similar situation last year — sold after about 8 years, lots of closing costs, wasn't sure which lines on the settlement statement actually counted as selling expenses. I gave the whole closing disclosure to Taxr and it went through each line and flagged which ones reduced my amount realized versus which were buyer credits, escrow setups or lender charges that didn't belong in my gain calculation. Really cut down the time I spent second-guessing the form.

Yes, those settlement statements are dense. Real estate agent commission is usually obvious but transfer taxes and recording fees can be easy to misread.

Transfer taxes were the one I almost missed. They showed up in a weird spot on the disclosure.

To put it plainly: selling costs including realtor commission reduce your amount realized, which reduces your gain. That's federal. Some states treat it differently, so if your state has an income tax on capital gains, check those rules separately — not all states follow federal treatment exactly.

Wanted to add one edge case: if any of your selling costs were paid by the buyer rather than you, those don't reduce your amount realized in the same way — but they might affect other parts of the settlement. Generally only costs you actually paid as the seller factor in.

Yes, and if the buyer paid points on your behalf or there were seller concessions, those get handled differently. The settlement statement should show clearly what was your cost versus theirs.

Looked into this when I sold in 2024. My amount realized was noticeably lower than the contract price once I netted out the commission, transfer taxes, attorney fees, and title policy I paid as seller. It really does matter even if you think you're comfortably under the exclusion — it sets the right starting point.

Naomi T.

Author

Netting out the costs first is the step I skipped — I was just starting from the sale price without subtracting anything.

Practical tip: get the final closing disclosure and go line by line down the "seller" column. Everything in that column that is a fee or expense (not a payoff of your mortgage) is a candidate for a selling cost. Cross-reference with Publication 523 to confirm each one.

The seller column is the right place to look. A lot of people look at the whole disclosure and get confused by the buyer's side of the costs.

Also worth knowing: Publication 551 covers basis of assets generally, and Publication 523 is the home-sale specific one. For the exclusion test and the gain calculation on your residence, 523 is the one to use. It has the worksheet that lays out amount realized minus adjusted basis in a clear sequence.

My situation last year had a small complication — I had postponed gain from a home sold before May 7, 1997 under the old rollover rules. If that ever applies to anyone here, Publication 523 Worksheet 2 specifically lists that as a basis reduction on line l. Most people won't have that but older sellers might.

No, that's a good flag. The old rollover rules affected a lot of people who have been in their current home for 25-plus years.

Don't overlook the section 121 partial exclusion possibility either. If for some reason you hadn't quite met the full 2-year use test — like you had to sell early for a job change, health reason, or unforeseeable event — you might still get a partial exclusion. Doesn't sound like your situation but worth knowing the rule exists.

Naomi T.

Author

Definitely not my situation since I was there 6 years, but I'll mention it to a friend who may need that.

Pulling it together for you: commission and other selling costs reduce your amount realized, improvements raise your adjusted basis, your gain is amount realized minus adjusted basis, then the exclusion applies to what's left. If you got a 1099-S, report on Form 8949 Part II with code H even if the entire gain is excluded. That's the full chain.

Naomi T.

Author

Seeing the whole chain laid out in order finally made it click for me. Thank you. I feel like I finally have the right sequence to work through.

Yep, that's the right order. Amount realized first, then basis, then exclusion, then reporting. Don't skip steps.