Updated

Home sale capital gains calculator

Federal tax on the gain, from IRS published figures. Estimates, not tax advice. State tax is extra and is not calculated.

Commission, transfer tax, and the other charges of selling. These reduce the gain.

Work that added value or prolonged the home's life. Repairs and maintenance do not count.

From a rental period or a home office. The exclusion does not cover this, so it is taxed separately.

The gain stacks on top of this, so it decides which rate bands are left.

And no exclusion claimed on another home in the 2 years before this sale.

What the sale is taxed

The exclusion covers the whole gain. No federal tax is due on it.

Each step of the computation, in the order the tax code applies it.
Amount realized$752,000.00
Adjusted basis$450,000.00
Gain on the sale$302,000.00
Depreciation recaptured$0.00 taxed at up to 25% = $0.00
Section 121 exclusion used$302,000.00 of $500,000.00
Taxable long-term gain$0.00
Net investment income taxdoes not apply
Estimated federal tax$0.00
Share of the gain0.00%

The rules, and where each comes from

Section 121 exclusion, single 250,000.00 dollars of gain

Source: IRS Topic no. 701, Sale of your home. Checked 2026-11-22.

Section 121 exclusion, married filing jointly 500,000.00 dollars of gain

Source: IRS Topic no. 701, Sale of your home. Checked 2026-11-22.

Owned and lived in the home, within the 5 years before the sale 24.00 months of each

Source: IRS Topic no. 701, Sale of your home. Checked 2026-11-22.

Maximum rate on unrecaptured section 1250 gain (depreciation) 25.00 percent

Source: IRS Topic no. 409, Capital gains and losses. Checked 2026-11-22.

Long-term capital gains rates for 2026 20.00 percent at the top band

Source: IRS Rev. Proc. 2025-32, section 4.03. Checked 2026-11-22.

Net investment income tax 3.80 percent above the MAGI threshold

Source: IRS Topic no. 559, Net investment income tax. Checked 2026-11-22.

When you sell a home for more than you paid, the profit is a capital gain, and the federal tax on it is rarely the single percentage people expect. This calculator works through the whole chain — amount realized, adjusted basis, gain, depreciation recapture, the section 121 exclusion, then the rate bands — and shows every figure with the IRS page it comes from.

These are estimates from published rates. They are not tax advice, and a return is filed on the facts of your sale rather than on a web page.

The chain, in the order the tax code applies it

Start with the amount realized: the sale price minus what it cost to sell — commission, transfer tax, and the other charges on the settlement statement. Then the adjusted basis: what you paid, plus capital improvements, minus any depreciation you took. The difference between the two is the gain.

Improvements are worth being thorough about. A new roof, an addition, a replaced HVAC system and a kitchen remodel all add to basis and therefore subtract from the gain, dollar for dollar. Repainting and routine repairs do not. If you have owned the home a long time, the improvements column is often the difference between owing tax and not.

The line most calculators skip

If you ever rented the home out, or claimed a home office, you took depreciation. That depreciation comes back at sale as unrecaptured section 1250 gain, and the section 121 exclusion does not touch it. It is taxed separately, at a rate the IRS caps at 25 percent.

The effect is not small. Take a couple selling at 800,000 dollars who bought at 400,000, spent 50,000 on improvements and paid 48,000 in selling costs. Their gain is 302,000 dollars, comfortably inside the 500,000 dollar joint exclusion, and they owe nothing. Now give the same couple a rental period that produced 60,000 dollars of depreciation. The gain becomes 362,000, the exclusion still covers 302,000 of it, but the 60,000 of depreciation is pulled out first and taxed at up to 25 percent. They owe 15,000 dollars on a sale that otherwise owed zero.

Nothing about the house changed. The exclusion still applied. A calculator that stops at the exclusion tells that couple they owe nothing, and they find out otherwise at filing.

The rate is not one number

Whatever survives the exclusion is long-term capital gain, and it does not get a flat rate. It stacks on top of your other taxable income and fills the 0 percent band, then 15 percent, then 20 percent. For 2026 the 15 percent band ends at 545,500 dollars of taxable income for a single filer and 613,700 dollars on a joint return, with the 0 percent band ending at 49,450 and 98,900 respectively. Those figures come from the Revenue Procedure that sets them, linked above.

So a large gain is normally taxed at two rates, not one, and where your other income already sits decides how much of the cheaper band is left. A seller with very little other income can have a slice of gain taxed at nothing at all.

The 3.8 percent most people forget

The net investment income tax adds 3.8 percent on top, on the part of your investment income sitting above a modified adjusted gross income threshold: 200,000 dollars single or head of household, 250,000 dollars filing jointly, 125,000 dollars married filing separately. A large home sale pushes most sellers over it in the year of the sale even if they are nowhere near it in an ordinary year.

It applies to the taxable gain and to the recaptured depreciation, not to the part the exclusion removed. That is one more reason the exclusion is worth qualifying for.

Qualifying for the exclusion

Two tests, both measured across the 5 years ending on the date of sale. You must have owned the home for at least 24 months, and you must have lived in it as your residence for at least 24 months. The months do not have to be consecutive and they do not have to be the same months. On a joint return only one spouse needs to meet the ownership test, but each spouse must meet the residence test for the full 500,000 dollars.

There is also a look-back: the exclusion may be taken only once in any 2-year period. Selling two homes in quick succession means the second one generally does not get it.

If you do not qualify, set the question on the form to no. The gain is then taxable in full, which is what the figure below will show.

What this page does not do

State income tax is the biggest omission. States tax capital gain on their own schedules, several do not tax it at all, and there is no single published rate to put in a calculator. The number here is federal only, and your state bill sits on top of it.

The reduced exclusion is not modelled either. A sale forced by a change in workplace, a health problem, or an unforeseeable circumstance can qualify for part of the exclusion even when the 24-month tests are not met. Publication 523 carries the worksheet that prorates it. This page offers the full exclusion or none, because a partial figure we have not read the rules for would be a guess wearing a decimal point.

The 25 percent on depreciation is a ceiling rather than a flat rate — the actual charge is the lower of 25 percent and your ordinary marginal rate. The calculator applies the ceiling, so for a seller in a low ordinary bracket the real figure is smaller than the one shown.

A loss is shown as a loss and taxed at nothing. A loss on a personal residence is not deductible, so there is no benefit to carry anywhere, and the page says so instead of printing a negative tax.

Checking the figures

Every rule on this page names the IRS page or Revenue Procedure it came from and the day we last read it. The exclusion and the ownership tests are Topic 701, the 25 percent ceiling is Topic 409, the 2026 band edges are Rev. Proc. 2025-32, and the 3.8 percent is Topic 559. Follow any of them and the figure should rebuild.

Related: the seller net sheet for what the sale leaves you before tax, the seller closing costs calculator for the selling costs that reduce the amount realized, and the transfer tax calculator for the deed tax among them. Formulas and sources are on how we calculate.

Questions

How much can you exclude when you sell your home?

Up to 250,000 dollars of gain, or 500,000 dollars on a joint return, if you owned the home and lived in it as your residence for at least 24 months of the 5 years before the sale, and you did not exclude gain from another home sale in the 2 years before it.

Does the exclusion cover depreciation I took?

No, and this is the line most sellers are surprised by. Depreciation you claimed for a rental period or a home office comes back as unrecaptured section 1250 gain, section 121 cannot exclude it, and it is taxed at up to 25 percent. A sale that owes nothing without depreciation can owe thousands with it.

Is the capital gains rate on a home sale 15 percent?

Only for part of it, usually. The taxable gain stacks on top of your other taxable income and fills the 0, 15 and 20 percent bands in order, so a large gain is normally taxed at more than one rate. The 2026 band edges are on this page with their source.

What counts towards the basis?

What you paid for the home, plus capital improvements that add value or prolong its life. Repairs and maintenance do not count. Every dollar of improvement you can document reduces the gain by a dollar, which is why the receipts are worth keeping.

Does this include state tax?

No. States tax capital gain on their own schedules and several do not tax it at all. There is no single published rate to cite, so state tax is left out rather than guessed at. The figure here is federal only.

The rest of the sale