Do You Pay Taxes When You Sell a House?

Selling your house can be a mix of excitement and uncertainty, especially when you wonder, do you pay taxes when you sell a house? There are many factors at play, including how to calculate capital gains tax, what counts as capital gain, and how closing costs or selling costs affect your taxable gain.
This guide covers everything from the primary residence exclusion to rental property implications, so you can make informed decisions when planning your home sale in 2025.
Quick Answer: When You Might Owe Capital Gains Tax and When You Pay Taxes
If your home qualifies as your primary residence and you meet the ownership and use tests in the past five years, you can exclude up to $250,000 of gain from the sale, or $500,000 if married filing jointly on a joint return.
That capital gains tax exclusion means many homeowners owe no tax on a sale. But if your gain exceeds that exclusion, you may pay capital gains tax on the taxable gain, after offsetting improvements and selling expenses.
And yes, closing costs, settlement fees, and other tax deductions can help reduce that gain.
Understanding Capital Gain Basics and How to Calculate Capital Gains Tax

What Counts as Capital Gain on Sale of Your Home
When you sell your personal residence, the gain from the sale is calculated by taking your selling price minus your original purchase price, plus eligible closing costs, real estate agent commissions, legal fees, and capital improvements.
This provides your cost basis. Any profit above that cost basis is your capital gain, which could be subject to capital gains tax or may be tax-free up to your exclusion amount.
Short Term Capital Gains vs. Long Term Capital Gains
How long you owned the property matters greatly.
For gains on the sale of your home held less than a year, the profit is considered short-term capital gains and is taxed as ordinary income based on your filing status and tax bracket.
If you held the home longer, you qualify for long-term capital gains treatment with lower tax rates. These depend on your taxable income.
For 2025:
- Single filers pay 0% on long-term gains up to $48,350, 15% between $48,351 and $533,400, and 20% above that.
- Married filing jointly get thresholds of $96,700, then up to $600,050 before the 20% rate kicks in.
The Primary Residence Exclusion, Eligibility, and How It Helps Avoid Capital Gains Tax

What Is the Primary Residence Exclusion (Section 121 Exclusion)
The Internal Revenue Service lets you reduce or eliminate your capital gains tax via the primary residence exclusion, a valuable tax break in personal finance.
If you meet the ownership test and use test by living in the house for at least two years out of the five-year period prior to the date of the sale, you can exclude up to $250,000 of gain if single or $500,000 if married couples filing jointly on a joint return.
Ownership and Use Tests and Other Qualification Details
To qualify, you must meet both ownership and use within that five-year test period. You must also not have claimed the exclusion in the past two years.
There are special rules for qualified official extended duty, such as military service, where the five-year period can be suspended.
Partial exclusions may apply for unforeseen circumstances like illness, job relocation, divorce, or the death of a spouse, but this is not automatic.
When You Do Owe Taxes: Taxable Gain Scenarios and Reporting Requirements
Exceeding the Exclusion Amount and Owe Capital Gains Tax
If your gain on sale exceeds the exemption amount, the excess becomes a taxable gain.
You must pay capital gains tax based on whether it is short-term or long-term. Also, states like California tax all gains as ordinary income, so your state taxable income increases too.
Reporting Requirements and Your Tax Return
Even if your gain is fully excluded, you may need to report the sale if you received a Form 1099‑S or cannot exclude the full gain.
You report using Schedule D and Form 8949 on your income tax return. You may avoid filing if full exclusion applies and no 1099‑S was issued, but keep your records.