← All tools

Capital Gains on Home Sale

Estimate the tax on a home sale

See how much of your profit from selling a home is taxable, and roughly what you’d owe in federal tax. You’ll need the expected sale price, what you paid for the home, and what you’ve spent on major improvements.

  1. Tax is on your profit, not the price

    Your profit is the sale price, minus selling costs, minus your : what you paid plus major improvements. Example: buy for $400,000, add a $50,000 kitchen, sell for $700,000 with $50,000 in costs, and your profit is $200,000.
  2. Your main home gets a big exclusion

    If you owned and lived in the home for 2 of the last 5 years, the makes up to $250,000 of profit tax-free ($500,000 for married couples filing jointly).
  3. Anything left is taxed at lower rates

    Profit above the exclusion is taxed as long-term (0%, 15%, or 20% federally). If the home was ever rented, the is taxed separately and the exclusion doesn’t cover it.
The closing disclosure from your purchase shows what you paid and your closing costs. Receipts for big projects add to your basis. Capital gains tax on a home sale has the full rules.
How you used it
Filing status
The sale and your taxes

What you expect to sell for, what selling will cost, and your federal tax bracket.

$
% of price
%
What the home cost you (your basis)

Your purchase records and improvement receipts. Every dollar here lowers your taxable profit.

$
$
$
$

What you keep after selling costs and federal tax

$651,000

Before paying off any mortgage, and before state tax. The seller net sheet subtracts your loan payoff to show the cash you’d receive.

Sale price

$700,000

minus $49,000 selling costs (7%)

Your cost basis

$453,000

$420,000 price + $8,000 closing + $25,000 improvements

Your profit (gain)

$198,000

$651,000 after selling costs − $453,000 basis

Tax-free under home sale rule

$198,000

$500,000 limit (married filing jointly)

Taxable long-term gain

$0

fully excluded

Estimated federal tax

$0

no federal tax estimated

What this means

Your profit of $198,000 fits within the $500,000 home sale exclusion for married filing jointly filers, so you’d likely owe no federal tax on it. That depends on passing the 2-of-5-year ownership and use test and not having used the exclusion on another home in the past 2 years.

State tax, the alternative minimum tax, and partial exclusions aren’t modeled, and the is approximated from your bracket. For a large gain, a CPA can confirm the numbers before you list.

Home sale exclusion (Section 121): quick reference

If you owned the home and lived in it as your main residence for at least 2 of the 5 years before the sale, you can exclude up to $250,000 of profit from federal tax ($500,000 if married filing jointly).

Under the 2-of-5 rule, the 2 years don’t need to be consecutive. The 5 years are counted backward from the date of sale.

You can use the exclusion more than once, but no more than once every 2 years.

If you sell early because of a job change, health, or certain unforeseen circumstances, you may qualify for a partial, prorated exclusion.

If you rented the home out before moving in, the “nonqualified use” rules reduce the exclusion in proportion to that rental time. Renting it out after you move out doesn’t count against you: once you’ve lived there 2 years, you have up to 3 years after moving out to sell and still pass the 2-of-5 test. See Sell vs rent out for that case.

Partial exclusions, rental time before you moved in, , and state tax aren’t modeled. A CPA can work those out.

Results are estimates based on your inputs and the assumptions on this page, not quotes or advice. A lender, servicer, or tax advisor will give you different numbers. Disclaimer

Something look off? Report it

Terms used on this page

The IRS terms that turn a sale price into taxable profit, and the rates that apply to it.

Capital gain
Your profit when you sell: the sale price minus selling costs, minus your cost basis.
Cost basis
What the IRS counts as your investment in the home: the purchase price, plus some purchase closing costs, plus major improvements, minus any depreciation. A higher basis means a smaller taxable profit. More
Capital improvements
Projects that add value or extend the home’s life, like a remodel, an addition, or a new roof. They raise your basis. Repairs and routine upkeep don’t.
Selling costs
Agent commissions, transfer tax, title fees, and credits to the buyer. They come off the sale price before your profit is figured.
Section 121 exclusion
The rule that makes up to $250,000 of profit on your main home tax-free ($500,000 married filing jointly) if you owned and lived in it for 2 of the 5 years before the sale. More
Long-term capital gains rate
The lower federal rate (0%, 15%, or 20%) on profit from something you owned for more than a year. Which rate applies depends on your income.
Depreciation recapture
If the home was ever a rental or had a home office, the depreciation from those years is taxed at sale at up to 25%. The Section 121 exclusion doesn’t cover it.
NIIT (net investment income tax)
An extra 3.8% federal tax on investment income, including taxable home sale profit, for higher earners. Profit covered by the exclusion isn’t subject to it. More
Marginal tax bracket
The federal income tax rate on your last dollar of income, such as 22% or 24%. This tool uses it to estimate your capital gains rate.
Married filing jointly (MFJ)
The tax filing status for married couples who file one return together. It doubles the home sale exclusion to $500,000.

Keep learning

Next steps

Report a problem

On

What kind of problem?