Free · Nonprofit · Education only · Updated October 13, 2026

Home sale capital gains calculator (2026)

Selling your house for a big gain? Up to $250,000 of profit ($500,000 married) is tax free if you owned and lived in it 2 of the last 5 years. Everything above that is taxed. Enter your numbers to see the exclusion you get, the tax on the rest, and what you keep.

By , founder, Retirement Literacy Foundation. 2026 federal law, every rate sourced below.

Free calculator

Home sale capital gains calculator

Enter your numbers. Your results show right on the page.

Worked example

A 2026 example, worked out

A married couple in California sells the house they have owned and lived in for 12 years for $1,450,000. They paid $400,000, put in $75,000 of improvements and pay $80,000 to sell. Their other 2026 income is $120,000.

LineAmount
Estimated tax on your home sale$103,781
Amount realized (price minus selling costs)$1,370,000
Adjusted basis (price paid plus improvements, minus depreciation)$475,000
Total gain$895,000
Home sale exclusion (IRC 121)-$500,000
Taxable gain$395,000
Federal income tax (incl. any AMT)$57,585
Net investment income tax (3.8%)$10,070
California tax$36,126
What you keep after tax (before paying off any mortgage)$1,266,219

Spread the same taxable gain over 5 years with an installment sale and the tax drops from $103,781 to $84,614: they keep $19,166 more (2026 law and income held flat; interest on the note left out).

Computed October 13, 2026 with the same engine the calculator uses: 2026 federal brackets (IRS Rev. Proc. 2025-32), state rates as coded for 2026. Illustrative; your numbers will differ.

How it works

The rules behind the numbers

  1. Two out of five years. You must have owned the home and used it as your main home for at least 24 months of the 5 years before the sale, and not used the exclusion on another home in the 2 years before (IRC 121). Married filing jointly gets $500,000 if either spouse owned it, both lived in it, and neither used the exclusion in the last 2 years (IRC 121(b)(2)).
  2. Selling early can still count. If you sell before 2 years because of a job move (new job at least 50 miles farther), health, or an unforeseen event such as divorce, a death or multiple births, you get part of the exclusion: the months you owned and lived there divided by 24 (Treas. Reg. 1.121-3).
  3. Rented first, then moved in. Gain is split by time. Months after 2008 when the house was not your main home, before you moved in, are nonqualified use, and that share of the gain is taxed (IRC 121(b)(5)). Months after you move out for good, within the 5-year window, do not count against you.
  4. Depreciation is never excluded. Any depreciation you took or could have taken after May 6, 1997, for a home office or rental years, is taxed at up to 25% (IRC 121(d)(6), IRC 1(h)(6)).
  5. What is left is long-term gain. Gain above the exclusion is taxed at 0%, 15% or 20% (2026 brackets, IRS Rev. Proc. 2025-32), plus the 3.8% net investment income tax when income is over $250,000 married or $200,000 single (IRC 1411). Excluded gain is not investment income.
  6. A loss does not help. A loss on a home you lived in is personal and not deductible (IRS Publication 523).

Common questions

Straight answers

How much home sale gain is tax free in 2026?

Up to $250,000 single or $500,000 married filing jointly, if you owned and lived in the home as your main home for 2 of the 5 years before the sale and have not excluded a gain on another home in the last 2 years (IRC 121). The amounts are fixed in the law and not adjusted for inflation.

What if I lived there less than 2 years?

If the move was for a new job at least 50 miles farther away, health, or an unforeseen event, you get a partial exclusion: months owned and lived there divided by 24, times $250,000 or $500,000 (Treas. Reg. 1.121-3). Otherwise the whole gain is taxable.

Is the gain above the exclusion subject to the 3.8% NIIT?

Yes. The excluded part is not, but the taxable part counts as net investment income, so it can add 3.8% when your income is over $250,000 married or $200,000 single (IRC 1411).

Can I spread the taxable gain over several years?

If you carry a note for the buyer, an installment sale lets you report the gain as you are paid (IRC 453). The exclusion comes off first. Lower income each year can mean a lower bracket, less NIIT and less state tax. The calculator shows the side-by-side.

Does paying off my mortgage reduce the tax?

No. The tax is on the gain: price minus selling costs minus what you paid and improved. Your loan balance does not change the gain. See the mortgage over basis calculator if your loan is larger than your basis.

Related: The old over-55 home sale exemption · Capital gains tax calculator · Step-up in basis calculator · Mortgage over basis calculator · Net investment income tax calculator · Estimated tax after a sale · ACA subsidy calculator for a sale year · IRMAA calculator

Free seller tax calculators

More calculators for the year you sell

Audit trail

Sources and review

Reviewed for the Retirement Literacy Foundation, a 501(c)(3) education nonprofit. Prepared by Hans Goldstein, EA, retirement educator. Admitted to practice before the IRS. Informational only. Not tax, legal or investment advice. Every figure below cites its source so your CPA or attorney can check it.

Figures are 2026 federal amounts unless stated. Examples are illustrative and rounded; your numbers will differ. By , founder, Retirement Literacy Foundation. Last reviewed .

Hans Goldstein is an Enrolled Agent, admitted to practice before the Internal Revenue Service. Not affiliated with or endorsed by the IRS.