Capital Gains Tax on a House Sale: Section 121 Exclusion and Rates

Most people who sell their home owe no federal capital gains tax on the house sale. Section 121 of the tax code lets a single filer exclude up to $250,000 of profit, and a married couple filing jointly up to $500,000, as long as you meet basic ownership and residency requirements.1Office of the Law Revision Counsel. 26 USC 121 – Exclusion of Gain From Sale of Principal Residence Any profit above the exclusion is taxed at long-term capital gains rates of 0, 15, or 20 percent depending on your income, and high earners may owe an extra 3.8 percent on top.

Figuring Out Whether You Have a Taxable Gain

Your gain is the difference between what you net from the sale and your adjusted basis in the home. Two numbers, but both take work to get right.

Start With Your Cost Basis

Cost basis begins with the original purchase price plus certain settlement costs you paid at closing: title insurance, legal fees, recording fees, transfer taxes, and survey fees can all be folded in. Loan-related costs like mortgage insurance premiums or points paid to secure financing do not count.2Internal Revenue Service. Publication 551 – Basis of Assets

Add Every Capital Improvement

Permanent improvements raise your basis and shrink your eventual taxable gain. A kitchen remodel, a new roof, an added deck, central air conditioning: these count because they add value, extend the home’s life, or adapt it to new use. Routine maintenance does not. Repainting, patching drywall, fixing a leaky faucet, replacing a broken window pane — those keep the home working but add nothing to basis.2Internal Revenue Service. Publication 551 – Basis of Assets

The distinction matters more than people realize. If you spent $60,000 over the years on a bathroom remodel, a furnace replacement, and new landscaping, that $60,000 comes straight off your taxable profit. Keep receipts and contractor invoices. The IRS won’t credit improvements you can’t document.

Subtract Selling Costs

Real estate agent commissions, advertising fees, legal fees, transfer taxes, and any loan charges you paid on the buyer’s behalf reduce your sale price for tax purposes.3Internal Revenue Service. Publication 523, Selling Your Home

A Worked Example

Say you bought a home for $300,000 with $8,000 in qualifying closing costs. Starting basis: $308,000. Over the years you spent $50,000 on capital improvements, bringing adjusted basis to $358,000. You sell for $600,000 and pay $36,000 in commissions and other selling costs, so you net $564,000. Your gain is $206,000. A single filer owes nothing because that sits under the $250,000 exclusion. A married couple filing jointly is well below their $500,000 ceiling.

The Section 121 Exclusion

The exclusion is the main reason most sellers walk away tax-free. To claim the full amount, you have to pass two tests during the five-year period ending on the sale date:

  • Ownership test: you owned the home for at least two of those five years.
  • Use test: you lived in it as your primary residence for at least two of those five years.

The two years don’t have to be consecutive. For the $500,000 joint exclusion, at least one spouse must meet the ownership test and both spouses must meet the use test.1Office of the Law Revision Counsel. 26 USC 121 – Exclusion of Gain From Sale of Principal Residence

One more limit: you can’t use the exclusion if you already claimed it on another home sale within the previous two years.4Internal Revenue Service. Topic No. 701, Sale of Your Home

Partial Exclusion When You Sell Early

Falling short of the two-year mark doesn’t automatically wipe out the exclusion. If you sold early because of a job move, health issue, or unforeseeable event, you may qualify for a reduced amount.3Internal Revenue Service. Publication 523, Selling Your Home Qualifying situations include:

  • A work move where the new job is at least 50 miles farther from the home than your old workplace was, or a new job at least 50 miles from the home.
  • A move to get medical care, to care for a family member with a disease or injury, or one a doctor recommended for health reasons.
  • Unforeseeable events such as the home being destroyed or condemned, a divorce, becoming eligible for unemployment, or a similar qualifying event beyond your control.

The reduced exclusion is a fraction of the full amount. Take the days you actually lived in the home, divide by 730, and multiply by $250,000 or $500,000. A single filer who lived there roughly 456 days (about 15 months) gets a reduced exclusion of about $156,000. That still shelters most sellers who had to move sooner than planned.

If Your Spouse Has Died

A surviving spouse who sells while still unmarried can claim the full $500,000 exclusion instead of the $250,000 single-filer amount, but only if the sale closes within two years of the spouse’s death. Both spouses must have met the ownership and use tests at the time of death.1Office of the Law Revision Counsel. 26 USC 121 – Exclusion of Gain From Sale of Principal Residence

The window matters in appreciated markets. Waiting three years to sell drops you to the single-filer cap, and gain that would have been fully sheltered can suddenly be taxable.

If You Inherited the Home

When you inherit a home, your basis is generally the fair market value on the date the previous owner died, not what they originally paid.5Office of the Law Revision Counsel. 26 USC 1014 – Basis of Property Acquired From a Decedent That step-up in basis can wipe out most of the built-up gain.

If a parent bought a house in 1985 for $100,000 and it was worth $450,000 when they died, your basis starts at $450,000. Sell for $480,000 and your taxable gain is $30,000, not $380,000. The step-up also runs in the other direction: if the property lost value, your basis steps down to the lower figure.

The Section 121 exclusion is still available on an inherited home, but you have to earn it. The ownership and use clock starts when you inherit, so you’d need to live in it as your primary residence for two of the next five years before selling.

What the Tax Looks Like on Gain Above the Exclusion

Gain that pokes above your exclusion is taxed based on how long you owned the home and how much you earn.

Hold the home a year or less and the gain is short-term, taxed at ordinary income rates that top out at 37 percent for 2026.6Internal Revenue Service. IRS Releases Tax Inflation Adjustments for Tax Year 2026 Few home sales trigger that because most owners live in the home longer than a year.

Hold it longer than a year and the gain is long-term. For 2026, single filers see:7Internal Revenue Service. Topic No. 409, Capital Gains and Losses

  • 0 percent on taxable income up to $49,450 (up to $98,900 for joint filers).
  • 15 percent on taxable income from $49,451 to $545,500 ($98,901 to $613,700 joint).
  • 20 percent on taxable income above $545,500 (above $613,700 joint).6Internal Revenue Service. IRS Releases Tax Inflation Adjustments for Tax Year 2026

These brackets look at your total taxable income, not just the sale. A single filer earning $80,000 in wages with $150,000 of taxable home sale gain would have the gain split across brackets, with the lower portion at 0 percent and the rest at 15 percent.

The 3.8 Percent Surtax on High Earners

The net investment income tax adds 3.8 percent on top of your regular capital gains rate if your modified adjusted gross income exceeds $200,000 for single filers or $250,000 for joint filers.8Office of the Law Revision Counsel. 26 USC 1411 – Imposition of Tax It applies to the lesser of your net investment income or the amount by which your modified AGI exceeds the threshold.

Gain sheltered by the Section 121 exclusion doesn’t count as investment income for this tax. Gain above the exclusion does, and it can push you over the threshold even if wages alone wouldn’t. A high-income single filer in the 20 percent bracket can effectively pay 23.8 percent on the taxable portion. The NIIT thresholds are not indexed for inflation, so they catch more sellers each year.

Depreciation Recapture on Home Offices and Rentals

If you claimed depreciation because part of the home was a home office or rental, the exclusion won’t shield that piece of your gain. The IRS makes you recapture any depreciation taken (or that could have been taken) after May 6, 1997, and taxes it at a maximum 25 percent rate rather than the standard capital gains rates.3Internal Revenue Service. Publication 523, Selling Your Home

Here is the trap: your basis is reduced by depreciation “allowed or allowable,” whichever is greater. If you had a qualifying home office for five years and never actually claimed the deduction, you owe recapture as though you had. If you’re eligible for the deduction, take it, because you’ll pay the recapture tax either way.

For a home office inside your living space rather than a separate structure, you don’t split the sale into business and personal portions. The whole gain qualifies for Section 121 except the depreciation piece.3Internal Revenue Service. Publication 523, Selling Your Home

State Taxes Are Separate

Federal is only half the picture. Most states tax capital gains too, typically at ordinary income rates. A handful have no income tax; the highest state rates exceed 13 percent. Rules vary by state, and some offer their own partial exclusions or deductions for home sales, so check your state’s treatment before estimating what you’ll owe overall.

Selling at a Loss

If your home has lost value, selling at a loss gives you nothing back at tax time. The IRS treats a personal residence as personal-use property, and losses on personal-use property are not deductible.9Internal Revenue Service. Capital Gains, Losses, and Sale of Home Gains above the exclusion are taxable, but losses generate no offsetting benefit.

Reporting the Sale

If your gain is fully covered by the exclusion, you may not need to report the sale at all. You can give the closing agent a signed certification stating the home was your primary residence, there was no nonqualified use after 2008, and the entire gain is excludable. With that certification, the closing agent isn’t required to issue Form 1099-S to you or the IRS.10Internal Revenue Service. Instructions for Form 1099-S (12/2026) If you receive a 1099-S anyway, report the sale on your return so it matches what the IRS already sees.

When any portion of the gain is taxable, report the transaction on Form 8949 and carry the totals to Schedule D of Form 1040.11Internal Revenue Service. Instructions for Form 8949 List the sale price, adjusted basis, and resulting gain. Partial or full exclusions are recorded in the appropriate column of Form 8949. If the sale generates a large liability, consider making an estimated tax payment in the quarter you close rather than waiting until you file, because underpayment penalties can add up.