Investing, Savings & Tax

Home Sale Capital Gains Calculator

Most home sales are not taxable, and the ones that are usually surprise people. This works out the gain against your adjusted basis, applies the Section 121 exclusion, and separates out the depreciation that can never be excluded.

Your details

Your results

Estimate
Important: this is an estimate, not advice

This calculator provides estimates for educational and informational purposes only. It does not constitute financial, investment, legal, accounting, or tax advice. Results are based on the assumptions and information entered and may differ materially from actual outcomes.

State income tax is not included and most states tax capital gains as ordinary income. Nonqualified-use proration, installment sales and 1031 exchanges are not modelled.

  • Measures the gain against adjusted basis — purchase price plus improvements plus buying costs — not against what you paid.
  • Applies the $250,000 or $500,000 Section 121 exclusion, including the prorated partial exclusion for a qualifying early sale.
  • Separates depreciation claimed while the home was rented or used as an office, which is never excludable and is taxed at up to 25%.
  • Stacks the taxable gain correctly on top of your ordinary income, so the 0% capital gains bracket works properly.

How to use this calculator

Enter the sale price, what you originally paid, everything you have spent on capital improvements, and the costs of selling. The improvements figure matters more than people expect: every documented dollar of it reduces the taxable gain by a dollar.

Tick the box if you owned and lived in the home for at least two of the five years before the sale and have not used this exclusion on another property in the last two years. If you cannot tick it but you are selling for a qualifying reason — a work relocation, a health problem, an unforeseeable event — enter the qualifying months in the advanced fields for a partial exclusion.

If the home was ever rented out or you claimed a home-office deduction, enter the depreciation you claimed. It is the single most-missed item on this calculation.

How the gain is worked out

Two subtractions, in this order:

Amount realised = sale price − selling costs
Adjusted basis  = purchase price + buying costs + capital improvements − depreciation claimed

Gain = amount realised − adjusted basis

The Section 121 exclusion then removes up to $250,000 of that gain for a single filer, or $500,000 for a married couple filing jointly who both meet the use test. Whatever is left is a long-term capital gain, taxed at 0%, 15% or 20% depending on where it lands once stacked on top of your other taxable income.

Depreciation is handled separately and first. Any gain attributable to depreciation claimed after May 1997 is unrecaptured Section 1250 gain: it cannot be excluded under Section 121 at all, and it is taxed at your ordinary rate capped at 25%.

A worked example

A couple bought for $340,000, spent $85,000 over the years on a new roof, a kitchen and an addition, and are selling for $725,000 with $43,500 of commission and closing costs.

The amount realised is $681,500. The adjusted basis is $425,000. The gain is $256,500 — which sits entirely inside the $500,000 exclusion, so no federal tax is due and, absent a Form 1099-S, the sale generally does not even need to be reported.

Change one thing: the same couple filing as a single person. The exclusion drops to $250,000, and $6,500 of gain becomes taxable. Change another: suppose $40,000 of depreciation had been claimed during a period when the house was rented. That $40,000 is carved out of the exclusion and taxed at up to 25%, regardless of how long they lived there afterwards.

Why adjusted basis is the number worth getting right

Basis is the one part of this calculation you control, and it is built up over the entire period you own the home. Capital improvements add to it: an addition, a new roof, replacement windows, a finished basement, central air, landscaping that is genuinely permanent. Repairs and maintenance do not: painting, fixing a leak, servicing the furnace, replacing a broken pane.

The distinction is roughly whether the work adds value or materially prolongs the life of the property, rather than keeping it in ordinary operating condition. Closing costs when you bought — title fees, transfer tax, survey — also add to basis.

The burden of proving basis falls on you. Decades of receipts are tedious to keep and worth exactly their face value in reduced gain if the sale ever turns out to be taxable.

Assumptions and limitations

  • Federal tax only. Most states tax capital gains as ordinary income; a few offer their own exclusions. State tax can be a substantial addition to the figures here.
  • No nonqualified-use proration. Since 2009, periods when the home was not your principal residence can reduce the excludable share of the gain. That allocation is not modelled.
  • The partial exclusion is simplified. It is prorated over 24 months of qualifying ownership and use. Real qualifying circumstances are defined narrowly and are worth checking against the current rules.
  • Home-office allocation is not split out. Where part of the home was used for business, the treatment can differ depending on whether that space was within the dwelling unit.
  • No 1031 exchanges or installment sales. Both change the timing and the amount of tax materially.

Common mistakes

Confusing the sale price with the gain. The exclusion applies to gain, not proceeds. A $900,000 sale with a $150,000 gain has nothing to report.

Forgetting improvements. This is the most expensive mistake available here, and it is entirely avoidable with paperwork.

Assuming the old rollover rule still exists. Buying a more expensive home no longer defers the gain. That rule was replaced by the current exclusion in 1997.

Ignoring depreciation from a rental period. Depreciation is recaptured whether or not you actually claimed it — the rules operate on depreciation "allowed or allowable", so skipping it does not avoid the consequence.

Frequently asked questions