Capital Gains Tax on House Sale: Exclusion, Rates, and Basis

Capital gains tax on a house sale is calculated by subtracting your adjusted basis and selling expenses from the sale price, applying the principal residence exclusion of up to $250,000 for single filers or $500,000 for married couples filing jointly, and taxing whatever remains at 0%, 15%, or 20% at the federal level depending on your income. Most sellers owe nothing because the exclusion wipes out the entire gain.

The Basic Formula

Three numbers drive the answer: your adjusted basis, your net sale proceeds, and the exclusion you qualify for.

Net sale proceeds − adjusted basis = capital gain. Capital gain − exclusion = taxable gain. Taxable gain × applicable rate = federal tax owed.

If the gain calculation produces a negative number, you have a loss on a personal residence. That loss is not deductible on your federal return.1Internal Revenue Service. Topic No. 701, Sale of Your Home

Building Your Adjusted Basis

Adjusted basis is your total investment in the home, not just the sticker price. Start with the purchase price on your original closing statement. Add the cost of capital improvements you have made over the years. Subtract any casualty loss deductions you have already claimed.

The distinction between an improvement and a repair matters here, because only improvements raise your basis. Improvements add value, extend the home’s useful life, or adapt it to a new use: additions like a bedroom or deck, major systems like central air or new wiring, exterior work like a new roof or siding, landscaping and driveways, kitchen remodels, and built-in appliances all qualify. Routine repairs do not: painting, patching cracks, fixing leaks, and replacing broken hardware are maintenance.2Internal Revenue Service. Publication 523, Selling Your Home

One useful nuance: repair-type work performed as part of a larger renovation counts as improvement. Replacing a few broken windowpanes is a repair, but replacing those same panes during a whole-house window replacement is part of the improvement.

Calculating Your Net Sale Proceeds

The IRS calls this figure the “amount realized,” and it is not the contract price. You reduce the gross sale price by your selling expenses to get there. Common deductions include:

  • Real estate commissions, often 5% to 6% of the sale price and usually the largest single deduction
  • Title insurance premiums and deed preparation fees
  • State and local transfer taxes
  • Advertising costs you paid to market the property

Every dollar you can document on your Closing Disclosure reduces the gain the IRS will tax.2Internal Revenue Service. Publication 523, Selling Your Home

The Principal Residence Exclusion

This is where most sellers zero out their bill. Section 121 of the Internal Revenue Code lets you exclude up to $250,000 of gain as a single filer, or up to $500,000 as a married couple filing jointly.3Office of the Law Revision Counsel. 26 US Code 121 – Exclusion of Gain From Sale of Principal Residence To claim the full amount, you have to pass two tests:

  • Ownership: you owned the home for at least two of the five years before the sale
  • Use: you lived in the home as your primary residence for at least two of the five years before the sale

The 24 months of use do not have to be consecutive. Someone who lived in the home for 12 months, rented it out for a year, and then moved back in for another 12 months would still qualify. For the $500,000 joint exclusion, both spouses must meet the use test and at least one must meet the ownership test. You also cannot have used the exclusion on another home within the past two years.

Partial Exclusion If You Fall Short

Selling before you hit the two-year marks does not automatically disqualify you. A partial exclusion is available if the sale was driven by a job relocation, a health issue, or an unforeseen event. A qualifying work-related move is one where your new job is at least 50 miles farther from the home than your old job was. Health-related moves cover relocating to obtain or provide medical care. Unforeseen events include the home being destroyed or condemned, divorce, death of a co-owner, job loss, or multiple births from the same pregnancy.2Internal Revenue Service. Publication 523, Selling Your Home

The partial exclusion equals the number of days you met the ownership and use tests, divided by 730, multiplied by $250,000 or $500,000. A single filer who lived in the home for 15 months before a qualifying job transfer would get (456 ÷ 730) × $250,000, or roughly $156,000.4Office of the Law Revision Counsel. 26 USC 121 – Exclusion of Gain From Sale of Principal Residence

Federal Capital Gains Rates for 2026

Gain that survives the exclusion is taxed at federal capital gains rates. The rate depends on how long you owned the property and what your total income looks like for the year.

Long-Term Rates

Most home sales qualify for long-term treatment because the two-year use test already puts you past the one-year holding period. For tax year 2026, long-term capital gains rates are:5Internal Revenue Service. Topic No. 409, Capital Gains and Losses

  • 0% if your taxable income is at or below $49,450 (single), $98,900 (married filing jointly), or $66,200 (head of household)
  • 15% between those thresholds and $545,500 (single), $613,700 (married filing jointly), or $579,600 (head of household)
  • 20% on income above those upper limits

The gain stacks on top of your other income when the brackets are applied, so if your ordinary income sits near a threshold, part of your gain may be taxed at one rate and part at the next one up.6Tax Foundation. 2026 Tax Brackets and Federal Income Tax Rates

Short-Term Rates

If you owned the home for one year or less, the gain is taxed as ordinary income at rates ranging from 10% to 37% for 2026.5Internal Revenue Service. Topic No. 409, Capital Gains and Losses A one-year hold also makes the Section 121 exclusion impossible, since the two-year use test cannot be met, so the entire gain is typically taxable.

The 3.8% Net Investment Income Tax

Higher-income sellers face an additional 3.8% surtax on the lesser of their net investment income or the amount by which their modified adjusted gross income exceeds $200,000 (single), $250,000 (married filing jointly), or $125,000 (married filing separately).7Internal Revenue Service. Topic No. 559, Net Investment Income Tax The excluded portion of your home sale gain does not count toward net investment income, but any taxable gain above the exclusion does. These thresholds are not adjusted for inflation.8Congress.gov. The 3.8% Net Investment Income Tax – Overview, Data, and Policy

Depreciation Recapture

If you ever claimed depreciation on any part of the home because you rented it out or ran a business from it, the Section 121 exclusion does not cover that portion. Depreciation taken after May 6, 1997 is “recaptured” and taxed at a maximum rate of 25%, regardless of your income bracket.9Internal Revenue Service. Property (Basis, Sale of Home, etc.) 5 Even if you never actually claimed the deduction, the IRS reduces your basis by the amount you were allowed to claim, so skipping it does not avoid recapture.

A Full Worked Example

Here is how the numbers fit together for a married couple filing jointly who bought their home for $300,000, lived in it for 12 years, and sold it for $750,000.

  • Original purchase price: $300,000
  • Capital improvements (new roof, kitchen renovation, finished basement): $85,000
  • Adjusted basis: $385,000
  • Gross sale price: $750,000
  • Selling expenses (commissions, title, transfer tax): $42,000
  • Net sale proceeds: $708,000
  • Capital gain: $708,000 − $385,000 = $323,000
  • Section 121 exclusion applied: $323,000 is under the $500,000 joint cap
  • Taxable gain: $0

Now change one variable. If the same couple sold for $1,050,000, their gain would be $1,050,000 − $42,000 − $385,000 = $623,000. After the $500,000 exclusion, $123,000 is taxable. If their other taxable income is $180,000, their total taxable income of $303,000 puts the gain in the 15% long-term bracket, so federal tax on the gain is $18,450. If their modified adjusted gross income exceeds $250,000, the 3.8% net investment income tax could add up to $4,674 on that same $123,000.

State Taxes Are Separate

Federal tax is only part of the picture. Most states tax capital gains from home sales at their standard income tax rates. Nine states have no individual income tax and impose no state-level capital gains tax. The highest state rates on capital gains can exceed 13%. On a $100,000 taxable gain after the federal exclusion, that spread means the difference between owing nothing to your state and owing more than $13,000. Check your state’s rules before you finalize any estimate.

Reporting the Sale

If your gain is fully covered by the Section 121 exclusion and you did not receive a Form 1099-S from the settlement agent, you generally do not need to report the sale on your return. In every other scenario, you do.1Internal Revenue Service. Topic No. 701, Sale of Your Home

Reporting is done on Form 8949, which feeds into Schedule D of your Form 1040. You list the sale price, your basis, and the exclusion amount.10Internal Revenue Service. Instructions for Schedule D (Form 1040) If a 1099-S was issued, the IRS already has a record of the transaction and expects to see it on your return, even when the entire gain is excludable.

Keep Your Records

Hold every basis-related document until the statute of limitations closes for the year of the sale.11Internal Revenue Service. How Long Should I Keep Records For most sellers that means at least three years after filing the return that reports the sale. If you underreport income by more than 25% of gross income, the IRS has six years to audit, so keeping records for six years is safer. During the years you own the home, save every improvement receipt. You cannot reconstruct a $15,000 kitchen renovation from memory a decade later, and each documented dollar directly reduces the gain you will eventually have to report.