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 Hans Goldstein, EA, founder, Retirement Literacy Foundation. 2026 federal law, every rate sourced below.
Free calculator
Enter your numbers. Your results show right on the page.
Worked example
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.
| Line | Amount |
|---|---|
| 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
Common questions
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.
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.
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).
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.
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
Audit trail
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 Hans Goldstein, EA, 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.