Capital Gains Tax When Selling a House: Most Sellers Owe Nothing.
IRC §121 excludes $250,000 of gain on the sale of your main home, or $500,000 on a joint return, if you owned it and lived in it for two of the last five years. The expensive mistake is rarely the tax. It is calculating the gain wrong in the first place.

A couple bought a house in 2017 for $420,000 and now has an offer for $980,000. On the drive home from the showing they do the subtraction, land on $560,000 of profit, and start bracing for a tax bill nobody warned them about. The capital gains tax when selling a house is the line item sellers fear most at a residential closing, and for the large majority of them it comes out to zero.
The capital gains tax when selling a house is not on the sale price.
Almost every seller who thinks they have a problem calculated the gain the wrong way. The number that matters is not the sale price minus the purchase price. It is the amount realized minus your adjusted basis, and both sides of that subtraction move your way.
Amount realized is the contract price reduced by the cost of selling: the real estate commission, title and escrow fees, transfer or excise taxes, and the attorney fee where one is used. On a $980,000 sale those routinely run 7% or more, which is $68,600 that never counts as gain.
Adjusted basis starts at what you paid, including the settlement charges you capitalized at purchase, and then rises for every capital improvement under IRC §1016. A new roof, an addition, a finished basement, a remodeled kitchen, replacement windows, a new HVAC system: all of them raise basis. Repainting a bedroom and fixing a leaking faucet do not. Publication 523 carries the list, and the line between those two columns is worth real money.
This is where sellers actually lose. The improvements were real, the receipts are gone, and eight years of upgrades get left out of the basis because nobody kept a folder. If you still own the house, start the folder today.
Two of the last five years, and not twice in two years.
There are two separate tests and both look at the five-year period ending on the date of sale. You must have owned the home for at least 24 months, and you must have used it as your principal residence for at least 24 months. The months need not be continuous, and the ownership months need not be the same months as the use months.
On a joint return, §121(b)(2)(A) splits the requirements: either spouse can satisfy the ownership test, but both spouses have to satisfy the use test. One spouse alone on the deed is fine. One spouse who never lived there is not, and the couple drops to $250,000.
Two limits catch people. Under §121(b)(3) the exclusion is unavailable entirely if you already excluded gain on another home sale within the two years ending on this sale date. And under §121(b)(4), a surviving spouse keeps the full $500,000 only if the sale happens within two years of the spouse's death and the couple met the requirements immediately before that date. After that, it is $250,000.
Selling short of 24 months does not automatically cost you the whole exclusion. §121(c) allows a prorated amount when the primary reason for the sale is a change in place of employment, a health problem, or an unforeseen circumstance, and the job-move version has a clean safe harbor I worked through in the 50-mile partial-exclusion rule.
- Sale price minus purchase price (the wrong number)
- $560,000
- Sale price, September 2026
- $980,000
- Less cost of selling (6% commission, title and escrow)
- ($68,600)
- Amount realized
- $911,400
- Purchase price, 2017
- $420,000
- Plus capital improvements (kitchen 2019, roof 2023)
- $65,000
- Adjusted basis
- $485,000
- Gain on the sale
- $426,400
- Less IRC §121 exclusion, joint return
- ($426,400 of $500,000)
- Taxable gain
- $0
- Federal tax on the sale
- $0
2026 tax year. Assumes both spouses used the home as their principal residence for at least 24 of the 60 months ending on the sale date, no depreciation allowed or allowable after May 6, 1997, no period of nonqualified use after December 31, 2008, and no other IRC §121 exclusion claimed in the preceding two years. Cost of selling is a 6% commission of $58,800 plus $9,800 of title and escrow charges.
Depreciation, the excess, and the rental years.
Three things survive the exclusion. Depreciation is the one that surprises people. Under §121(d)(6), depreciation allowed or allowable after May 6, 1997 comes out of the exclusion and is taxed as unrecaptured §1250 gain at a maximum 25% rate. That includes the depreciation inside a home office deduction. Write off a 200-square-foot office for six years and that piece stays taxable even when the rest of the gain is fully excluded.
Gain above the ceiling is ordinary long-term capital gain. For 2026, under Rev. Proc. 2025-32, a married couple filing jointly stays in the 15% bracket on taxable income up to $613,700 and a single filer up to $545,500, with 20% above those figures. The taxable slice is also net investment income under §1411, so the 3.8% surtax applies once modified adjusted gross income passes $200,000 single or $250,000 joint, thresholds that have never been indexed. Gain you exclude under §121 is not net investment income, which the Form 8960 instructions state directly.
Rental years cut both ways. Time you rented the property out before you moved in is a period of nonqualified use under §121(b)(5), counting only periods after December 31, 2008, and the gain allocated to it is not excludable. Time you rented it out after you moved out is not nonqualified use at all, so long as you still clear the 2-of-5 use test. That asymmetry is worth planning around, and I ran the allocation in converting a rental to a primary residence.
When you report the sale, and when you do not.
If your gain is fully excluded and no Form 1099-S is issued, you do not report the sale anywhere on the return. Nothing goes on Schedule D.
Whether that form gets issued is partly your decision at the closing table. Under Rev. Proc. 2007-12, the settlement agent can skip Form 1099-S if you sign a written certification that the property was your principal residence and the full gain is excludable, with the price at or under $250,000, or $500,000 where you also certify that you are married. Sign it. Most sellers wave it off without reading it.
If a 1099-S does get issued, report the sale even though the tax is zero. It goes on Form 8949 with code H in column (f) and the excluded gain entered as a negative adjustment, carrying to Schedule D. Skip that step and the IRS matches gross proceeds against a return with no sale on it, which is how sellers end up with a CP2000 notice proposing tax on the entire sale price.
The caps have not moved.
H.R. 4327, the No Tax on Home Sales Act, would strike the dollar limits from §121 altogether. It was introduced on July 10, 2025 and referred to the House Committee on Ways and Means, and as of September 2026 it is still sitting there, unpassed by either chamber. Plan on $250,000 and $500,000, and price a 2026 sale on the rules that exist.
