Skip to main content

Home Sale Tax Calculator

Estimate federal tax on a home sale, including eligible exclusions.

🧮

Home Sale Tax Calculator

Loading calculator...

How to use

Using this calculator

Formula 2026.3 · Updated Nov 2, 2026

Planning estimate. No independent professional review is claimed. Check the method and sources before making a financial decision.

Getting started

Section 121 can exclude up to $250,000 of eligible gain, or $500,000 for a qualifying joint return. The limit applies to gain, not the sale price. Ownership, residence, prior-exclusion and special-use rules determine eligibility; a sale is not automatically tax free.

This calculator estimates a single home sale under the entered eligibility assumptions. It separates depreciation-related gain and nonqualified-use gain before applying an exclusion. State tax, other sales and special spouse or business allocations can require a separate calculation. A loss on a personal residence is generally not deductible.

Reading your results

A zero estimated federal tax result means the modeled exclusion and other entered facts leave no federal tax from this sale. It does not establish that every gain is excludable or that no filing is required. Review the eligibility result, depreciation, nonqualified use and assumptions.

The breakdown distinguishes regular gain, any depreciation-related gain and NIIT. Other transactions can change netting, brackets and the final return. Do not enter a depreciation-related amount as an ordinary stock gain in another calculator. For a simple sale without special gain categories, carry forward only the correctly classified taxable amount after the exclusion.

Method & formulas

Start with the records used in IRS Publication 523 and the applicable capital-gain worksheets:

  1. Net proceeds equal sale price less eligible selling costs. Adjusted basis includes purchase price, eligible acquisition costs and improvements, less applicable reductions, including depreciation allowed or allowable.

  2. Eligibility generally requires two years of ownership and two years of residence in the five years ending on sale. The look-back restriction generally concerns an exclusion used on another sale within two years. Joint eligibility requires the applicable spouse-specific tests.

  3. Excludable gain does not include depreciation-related gain after May 6, 1997. The entered nonqualified-use allocation can also leave gain outside the exclusion. A qualifying partial exclusion uses the shortest applicable period divided by 730 days or 24 months; separate spouse calculations may be required.

  4. A qualifying work move generally means the new workplace is at least 50 miles farther from the sold home than the previous workplace, or a first workplace is at least 50 miles from that home. A 50-mile house move alone is not the test. Health, unforeseen-event and facts-and-circumstances provisions have their own requirements.

  5. Tax on remaining gain can include ordinary-rate treatment, preferential capital-gain rates, unrecaptured section 1250 gain and NIIT. The calculator applies its modeled 2026 federal rules to the entered sale. It does not determine state tax or net the sale against every other transaction.

Assumptions & limitations

Scope

  • Federal estimate only -- state tax on home sale gains is not included
  • Separate business/rental portions and spouse-specific allocations can require professional calculation
  • Does not net this sale against other capital gains or losses realized the same year
  • Cannot know your actual eligibility with certainty -- verify the ownership/use/frequency tests against your own records before relying on any number here

Important notes

  • This calculator covers a single primary-residence sale only.
  • The model accepts entered depreciation and nonqualified-use amounts. It does not determine those records, separate business/rental allocations, divorce or surviving-spouse exceptions. Joint filers with different qualifying periods may need separate spouse worksheets.
  • State tax on home sale gains is not included in this version.
  • This calculator is publicly available as a planning estimate and is undergoing final professional tax review.

Before you act

  • This tool provides an estimate for planning purposes only. It is not tax advice and does not replace Form 8949, Schedule D, or a qualified tax professional.
  • Results depend entirely on the accuracy of what you enter, including your own assessment of the ownership/use/frequency tests. Verify your eligibility against IRS Publication 523 or with a tax professional before relying on any number here.
  • Tax law can change. Figures are specific to the 2026 tax year as understood at the time this calculator was published.

Related Calculators

Examples

Examples & background

How the Section 121 exclusion works

The exclusion isn't automatic just because you sold your home -- it depends on ownership and residence tests generally measured over five years, plus a separate two-year prior-exclusion restriction:

  • Ownership test: you owned the home for at least 2 of those 5 years.

  • Use test: you lived in the home as your primary residence for at least 2 of those 5 years (the 2 years don't need to be continuous, and don't need to be the same 2 years as the ownership test, though in practice they usually overlap).

  • Frequency test: you haven't excluded gain from a different home sale within the 2 years before this one.

Worked example: gain fully covered by the exclusion

You bought a home for $300,000, spent $25,000 on buying costs and a kitchen remodel, and sold it for $600,000 after $30,000 in selling costs. Net proceeds are $570,000; adjusted basis is $325,000; total gain is $245,000. As a single filer who owned and lived there for the full 5 years, your exclusion cap is $250,000 -- which fully covers the $245,000 gain. Estimated federal tax: $0.

Worked example: gain exceeding the exclusion

Same numbers, but you sell for $900,000 instead. Total gain is now $545,000. The $250,000 exclusion still applies, leaving $295,000 taxable -- taxed at long-term capital gains rates (and NIIT, if your income is high enough), the same way a stock sale would be.

Worked example: selling early for a qualifying reason

Suppose a new workplace is 65 miles from the sold home and the previous workplace was 15 miles away. The increase is 50 miles. If work is the main reason for selling, the other applicable conditions are met, and the shortest qualifying period is 12 months, a single filer could have a $125,000 partial limit: $250,000 × 12 ÷ 24. Confirm the full Publication 523 tests rather than using the distance between the old and new homes.

A loss isn't deductible

If your home sells for less than your adjusted basis, that loss can't be deducted against your other income or other capital gains -- the IRS treats a personal residence as personal-use property, and losses on personal-use property generally aren't deductible (unlike a loss on stock or a rental property). This is different from how capital losses on investments work, and it surprises a lot of sellers.

FAQs

Common questions (12)
Do I have to pay tax when I sell my house?

It depends on the gain and eligibility. Section 121 can exclude up to $250,000, or $500,000 for a qualifying joint return, but depreciation, nonqualified use, prior exclusions and other rules can leave taxable gain. Personal-residence losses generally are not deductible.

How much of my home sale profit is tax-free?

The usual full limit is $250,000 for an eligible individual and $500,000 for a qualifying joint return. Both spouses generally must meet the residence and look-back tests and at least one must meet ownership. Partial and surviving-spouse rules can differ.

What is the 2-out-of-5-year rule?

To qualify for the full Section 121 exclusion, you must have owned the home for at least 2 of the 5 years before the sale, and lived in it as your primary residence for at least 2 of those 5 years. The 2 years don't need to be consecutive.

Can I use the exclusion more than once?

Yes, but generally not more than once every 2 years. If you used the exclusion on a different home sale within the last 2 years, you typically don't qualify for the full exclusion again until that 2-year window passes -- though a qualifying reason (job change, health, unforeseen event) can allow a prorated partial exclusion sooner.

What counts toward my home's cost basis?

Your original purchase price, plus buying costs (closing costs, title fees) and capital improvements -- a new roof, an addition, a major renovation. Routine repairs and maintenance (painting, fixing a leak) don't count. Basis is reduced by any depreciation claimed for business or rental use and by insurance reimbursements for casualty losses.

Is a loss on selling my home tax-deductible?

No. A loss on the sale of a personal residence is not deductible, unlike a loss on an investment property or on stocks. The IRS treats your home as personal-use property, and losses on personal-use property generally can't offset other income or gains.

What if I sell before living in the home for 2 years?

A qualifying work, health or unforeseen-event reason may permit a reduced exclusion. The work safe harbor generally compares old and new workplace distances from the sold home, not the distance between two homes. Use the Publication 523 worksheet and the shortest applicable qualifying period.

How is the taxable portion of my home sale gain taxed?

The same way any other capital gain is: at ordinary income rates if you owned the home a year or less (short-term), or at the preferential 0/15/20% long-term capital gains rates if you owned it more than a year -- plus the 3.8% Net Investment Income Tax if your income is high enough.

Does this calculator include state tax?

No, this is a federal estimate only. Nine states have no general income tax -- Alaska, Florida, Nevada, New Hampshire, South Dakota, Tennessee, Texas, Washington, and Wyoming -- so residents of those states typically owe no state tax on a home sale gain (Washington's separate state capital gains excise tax explicitly exempts direct real estate sales). Many other states tax home sale gains in some form, often as part of ordinary state income tax, but rules vary widely -- check with your state's tax authority or a tax professional for your specific situation.

What if I also sold stocks or crypto the same year I sold my home?

This model does not net all transactions. Use the actual return worksheets to combine correctly classified gains and losses. Do not enter depreciation-related gain as an ordinary stock gain or automatically treat a short-term sale as long-term.

Does this calculator handle a home used partly for business or a rental unit?

It accepts entered depreciation and nonqualified-use amounts, but does not calculate the underlying depreciation or allocate a separate business/rental portion. Separate portions, special spouse rules and complex uses require their own worksheets or professional calculation. The rental-sale calculator estimates a different, single-property scenario.

Can married couples filing separately use the $500,000 exclusion?

No. For the ordinary joint-filer scenario, the $500,000 exclusion requires the applicable spouse-specific tests. Certain surviving-spouse cases have separate rules. Married filing separately is capped at $250,000, same as a single filer.

Sources

Sources (4)
  1. IRS Publication 523, Selling Your Home
  2. IRS Topic No. 701, Sale of Your Home
  3. IRS Schedule D (Form 1040), Capital Gains and Losses
  4. IRS Form 8960, Net Investment Income Tax