Home Sale Capital Gains Tax: How to Estimate What You Owe
Many primary-home sellers owe no federal capital gains tax because the IRS home sale exclusion can wipe out a large gain. But not every sale qualifies, and your taxable gain is not the same as your sale price or home equity.
This is a U.S. federal planning guide, not personal tax advice. State taxes may differ.
Estimate your home sale taxable gain before you list
Use the Capital Gains Tax Calculator to model sale price, basis, improvements, selling costs, filing status, and the home sale exclusion.
Open Capital Gains CalculatorUse the Capital Gains Tax Calculator to estimate your taxable gain before you list or accept an offer.
Do you pay capital gains tax when you sell a house?
You may pay capital gains tax if you have a taxable gain after subtracting your adjusted basis, selling costs, and any exclusion you qualify for.
Capital gain = net sale proceeds - adjusted cost basis
Net sale proceeds are the sale price after selling costs such as agent commissions and closing costs. Adjusted basis usually starts with your purchase price, then adds qualifying improvements and subtracts certain adjustments.
For a primary residence, the federal home sale exclusion may remove up to $250,000 of gain for single filers or $500,000 of gain for married couples filing jointly. To qualify, you generally must meet ownership and use rules, including living in the home as your main home for at least two of the five years before the sale.
Investment properties, second homes, flips, and homes that do not meet the tests may be taxable.
How to estimate taxable gain on a home sale
Use this order:
- Start with expected sale price. Use the offer price, listing target, or conservative market estimate.
- Subtract selling costs. Include agent commissions and eligible sale-related closing costs.
- Determine adjusted basis. Start with purchase price, add qualifying improvements, then account for required adjustments.
- Calculate gain before exclusion. Subtract adjusted basis from net sale proceeds.
- Apply the exclusion if eligible. This may reduce gain by up to $250,000 or $500,000.
- Estimate tax on remaining taxable gain. The rate depends on the type of gain, holding period, and income.
For broader rate details, see WiseCalc's capital gains tax guide.
Worked example: selling a primary home
Assume a married couple filing jointly sells a primary home and meets the ownership/use tests.
- Filing status: married filing jointly
- Purchase price: $420,000
- Qualifying improvements: $60,000
- Sale price: $850,000
- Selling costs: $50,000
- Adjusted basis: $480,000
- Net sale proceeds: $800,000
- Gain before exclusion: $320,000
- Primary residence exclusion: up to $500,000
- Estimated taxable gain: $0, assuming the couple meets the ownership/use tests
Math:
Adjusted basis: $420,000 + $60,000 = $480,000 Net sale proceeds: $850,000 - $50,000 = $800,000 Gain before exclusion: $800,000 - $480,000 = $320,000 Estimated taxable gain: $320,000 - up to $500,000 exclusion = $0
If the same numbers applied to a non-qualifying second home, the taxable gain could be $320,000 before other adjustments.
Run your exact home sale numbers
After the example, test your own sale price, adjusted basis, improvements, costs, and filing status instead of relying on a generic rule.
Calculate My Home Sale GainRun your own sale price, basis, improvement, and filing-status numbers in the Capital Gains Tax Calculator instead of relying on a generic rule. If the sale affects your broader filing picture, also check the Income Tax Calculator and Tax Refund Calculator.
Primary home vs second home vs rental
| Sale type | Exclusion may apply? | What to calculate |
|---|---|---|
| Primary residence | Often, if ownership/use tests are met | Gain after adjusted basis and possible $250k/$500k exclusion |
| Second home | Usually no primary-home exclusion | Full capital gain after basis and selling costs |
| Rental/investment property | Usually no primary-home exclusion; depreciation may matter | Capital gain plus possible depreciation recapture considerations |
Rental depreciation, mixed personal/rental use, and partial-use cases can be complex. If the property was rented, converted from a residence, used partly for business, or depreciated, consider a tax professional.
What affects your home sale capital gains tax?
Key drivers include:
- Filing status and whether the $250k or $500k limit applies.
- Primary residence status and whether you meet the ownership/use tests.
- Improvements that increase basis.
- Selling costs that reduce proceeds.
- Total taxable income, which can affect your capital gains rate.
A home sale should not be viewed in isolation. Use the Income Tax Calculator to model the wider picture, and see the 2026 tax brackets guide for taxable income context.
Common mistakes to avoid
Do not use the sale price as the gain. Selling for $850,000 does not mean you have an $850,000 taxable gain.
Avoid these errors:
- Forgetting qualifying improvements and selling costs.
- Assuming every married couple automatically gets the full $500k exclusion.
- Applying primary-home rules to a second home or rental.
- Ignoring rental depreciation or mixed-use history.
- Forgetting that a large taxable gain can change your refund or balance due. Use the Tax Refund Calculator and read the tax refund guide if the sale may change your filing outcome.
FAQ
How much capital gains tax do I pay when I sell my house?
It depends on net proceeds, adjusted basis, exclusion eligibility, holding period, and taxable income. Many qualifying primary-home sellers owe no federal capital gains tax.
What is the $250,000/$500,000 home sale exclusion?
It is a federal rule that may let qualifying homeowners exclude up to $250,000 of gain if single or up to $500,000 if married filing jointly.
Do I pay capital gains tax if I buy another house?
Buying another house does not automatically remove capital gains tax. The key question is whether the sold home qualifies for the exclusion.
Can home improvements reduce capital gains tax?
Yes. Qualifying capital improvements can increase adjusted basis, which may reduce gain. Keep records for major work.
Do second homes qualify for the capital gains exclusion?
Usually, no. A second home generally does not qualify unless it meets the main-home ownership and use rules.
Final takeaway
Taxable gain depends on net proceeds, adjusted basis, eligibility for the home sale exclusion, and your broader tax situation.
Finish the rest of your tax planning
Estimate the home sale gain first, then explore the Tax calculators hub for income tax, refund, and withholding planning.
Explore Tax CalculatorsEstimate your home sale gain with the Capital Gains Tax Calculator, then explore the Tax calculators hub for the rest of your filing picture.
