Homeowner HQ · Guides

Do you pay capital gains tax when you sell your house?

It is the tax question almost every seller asks before listing: after years of payments and price growth, does the IRS take a cut of the profit? For most primary-residence sellers the answer is no — a long-standing federal exclusion covers the gain entirely for the typical sale. This page is general information, not tax advice — talk to a CPA or tax professional before listing if your gain may be large.

1. The short answer: Section 121 excludes most primary-residence gain

Under Section 121 of the Internal Revenue Code — explained in IRS Topic No. 701 and Publication 523, Selling Your Home — a seller can exclude gain on the sale of a main home from income: up to $250,000 for a single filer and up to $500,000 for a married couple filing jointly. If your gain is at or below your exclusion amount and you meet the tests below, you generally owe no federal capital gains tax on the sale.

2. The tests: ownership, use, and the two-year lookback

Two tests are measured over the 5 years before the sale. The ownership test: you owned the home for at least 2 of those 5 years. The use test: you used the home as your main home for at least 2 of those 5 years. The periods do not have to be consecutive, and the ownership and use periods do not have to be the same 2 years. One more limit: the exclusion generally cannot have been used on another home sale in the prior 2 years.

3. Selling early: the partial exclusion

Life does not always wait for the two-year mark. If you do not meet the ownership or use tests — or you used the exclusion inside the prior 2 years — because the sale is driven by a job change, health reasons, or unforeseen circumstances, a partial, prorated exclusion can still apply, figured from how much of the tests you did meet. The IRS rules in Publication 523 define what counts; a tax professional can run the proration on your facts before you price the sale around it.

4. How the gain is figured: proceeds minus basis

Gain is the sale proceeds minus the home's basis. Your basis starts with what you paid for the home and is increased by the cost of qualifying improvements — additions, remodels and other capital improvements — so a higher documented basis means a lower taxable gain. That is why keeping improvement records matters: contracts, invoices and receipts for real improvements are part of the tax file, not clutter. In Homeowner HQ, the same habit runs the monthly record — correct the facts about your home, including its improvements, through your agent's fix-my-facts record, so the value and equity line is built on the real home and the improvement history is on file when a sale year arrives.

5. Above the exclusion, the 1099-S, and state taxes

Only gain above the exclusion is taxed, generally at long-term capital-gains rates when the home was owned for more than a year. A Form 1099-S may be issued at closing reporting the sale proceeds — it does not by itself mean tax is owed; it is a reporting form, and a qualifying Section 121 sale is still excluded as the return rules direct. State taxes vary by state and are figured separately from the federal exclusion.

6. Different rules: second homes, rentals, and depreciation

Section 121 as described here is the main-home rule. Second homes and rental properties follow different rules, and a home that was rented out can carry depreciation recapture — the part of the gain tied to depreciation taken or allowable is generally not covered by the exclusion and is taxed under its own rules. Mixed-use histories (a home that was a rental before it became a main home, or the other way around) have their own allocation rules in Publication 523 — that is CPA territory, not a do-it-yourself estimate.

What it costs

Homeowners are always free. Realtors pay $25/mo all-in and lenders pay $25/mo to join, at any book size, with no setup fee; messaging is included free for realtors, and lender messaging is $100/mo ($125/mo total for lenders). A lender-sponsored realtor joins for $0.

Questions homeowners ask

Do you pay capital gains tax when you sell your house?

For most people who sell their primary residence, no federal capital gains tax is owed. Under Section 121 of the Internal Revenue Code — explained in IRS Topic No. 701 and Publication 523 — a seller can exclude gain on the sale of a main home from income: up to $250,000 for a single filer and up to $500,000 for a married couple filing jointly. If your gain is at or below your exclusion amount and you meet the tests in the next answer, you generally owe no federal capital gains tax on the sale. Only gain above the exclusion is taxed. Second homes, rental properties and homes with depreciation recapture follow different rules, and state taxes vary by state. This page is general information, not tax advice.

How much gain can you exclude under Section 121, and what are the tests?

The exclusion is up to $250,000 of gain for a single filer and up to $500,000 for a married couple filing jointly. To claim the full exclusion you must pass two tests over the 5 years before the sale: the ownership test — you owned the home for at least 2 of those 5 years — and the use test — you used the home as your main home for at least 2 of those 5 years. The ownership and use periods do not have to be consecutive, and they do not have to be the same 2 years. In addition, the exclusion generally cannot have been used on another home sale in the prior 2 years. If you do not meet the tests because the sale is driven by a job change, health reasons or unforeseen circumstances, a partial, prorated exclusion can still apply based on how much of the tests you did meet. Talk to a CPA or tax professional before listing if your gain may be large.

How is the gain figured, and what happens above the exclusion?

Gain is the sale proceeds minus the home's basis. Your basis starts with what you paid for the home and is increased by the cost of qualifying improvements — additions, remodels and other capital improvements — which is why keeping improvement records matters: a higher documented basis means a lower taxable gain. Only the gain above your Section 121 exclusion is taxed, generally at long-term capital-gains rates when you owned the home for more than a year. A Form 1099-S may be issued at closing reporting the sale, and it does not by itself mean any tax is owed. State capital-gains and income taxes vary by state and are figured separately from the federal exclusion.