When you sell a house, you pay capital gains tax only on the profit, not the total sale price. And for most homeowners selling their primary residence, the federal tax bill may be zero.
If the home was your primary residence for at least two of the last five years, you can exclude up to $250,000 of capital gains from federal taxes ($500,000 for married couples filing jointly). Profits exceeding this exclusion, or gains from second homes and investment properties — are taxed as long-term capital gains at 0%, 15%, or 20% depending on your income.
This guide covers how to calculate what you owe, the current 2026 tax rates, how to reduce or avoid the tax entirely, and what changes for investment properties and special situations. If you’re planning a sale and want certainty about your closing date, which matters for tax planning, iBuyer.com connects you with cash buyers who close in days, on a date you choose.
Home Selling Taxes
- Do You Pay Taxes When You Sell a House?
- How to Calculate Capital Gains on a Home Sale
- Capital Gains Tax Rates on Home Sales in 2026
- How to Reduce or Avoid Capital Gains Tax When Selling a House
- Investment Properties, Second Homes, and Special Situations
- How to Report a Home Sale on Your Taxes
- Frequently Asked Questions
- Methodology and Sources
- Selling in 2026? Get Certainty on Your Closing Date
Instant Valuation, Confidential Deals with a Certified iBuyer.com Specialist.
Sell Smart, Sell Fast, Get Sold. No Obligations.
Do You Pay Taxes When You Sell a House?
Most homeowners who sell a primary residence pay zero federal capital gains tax. Here’s why — and when taxes do apply.
The primary residence exclusion (Section 121)
Under Internal Revenue Code Section 121, homeowners can exclude up to $250,000 of capital gains ($500,000 for married couples filing jointly) from federal income tax when selling a primary residence, provided they meet two tests:
- Ownership test: You owned the home for at least 2 of the last 5 years before the sale date
- Use test: You lived in the home as your primary residence for at least 2 of the last 5 years before the sale date
The two years don’t need to be consecutive, and they don’t need to be the same two years — they just need to total 24 months within the 5-year lookback window. You also must not have used this exclusion for another home sale in the past two years.
According to IRS Topic 701: Sale of Your Home, the exclusion applies to your gain above the exclusion threshold — not to the full sale price. A homeowner who qualifies and has a $220,000 gain on their primary residence pays nothing in federal capital gains tax.
Is $500,000 a capital gains exemption?
A common point of confusion: the $250,000/$500,000 is an exclusion, not an exemption. The difference matters:
- An exemption eliminates all tax regardless of circumstances
- An exclusion shields only the first $250K or $500K of gain
If your gain exceeds the exclusion, you owe tax on the overage. And the exclusion doesn’t apply automatically — you must actively meet the 2-of-5-year ownership and use tests.
When most homeowners pay zero federal capital gains tax
The median US home has appreciated roughly $100,000–$200,000 over a typical holding period — well under the $250,000 single-filer exclusion. Most homeowners who’ve lived in their home for more than two years, sell their primary residence, and have a gain under $250,000 single ($500,000 married) owe no federal capital gains tax at all.
What if you sell for less than you paid?
If you sell your home for less than your cost basis (original price plus improvements), you have a capital loss on a personal residence. Personal residence losses are not deductible for federal tax purposes — you cannot write off a loss on a home you lived in.
How to Calculate Capital Gains on a Home Sale
Tax is assessed on profit, not on the sale price. Understanding how to calculate your gain — and what reduces it — is the foundation of any tax planning around a home sale.
The capital gains formula
Capital Gain = Sale Price − Cost Basis − Selling Costs
Where each element breaks down as follows:
Sale Price: The gross amount the buyer pays.
Cost Basis: Your investment in the property — original purchase price, plus closing costs paid when you bought, plus qualifying capital improvements made during ownership.
Selling Costs: Expenses incurred during the sale — agent commissions, legal fees, advertising, transfer taxes paid by the seller, and certain staging costs.
What increases your cost basis
Your cost basis grows with capital improvements — upgrades that add value or extend the useful life of the property:
- New roof installation
- Kitchen or bathroom renovation
- Room addition or finished basement
- HVAC system replacement
- New windows, siding, or deck
- Central air conditioning installation
- Landscaping improvements
Repairs and maintenance do not count — painting, fixing a broken window, replacing a worn-out faucet, or routine upkeep do not increase your basis. The IRS distinguishes between improvements (which increase value) and maintenance (which preserves existing value). Keep records and receipts for every improvement — they can reduce your taxable gain significantly.
What you can deduct as selling costs
Selling costs reduce your taxable gain dollar for dollar:
- Real estate agent commissions (typically 5%–6% of sale price)
- Attorney or closing agent fees
- Transfer taxes paid by the seller
- Advertising and listing costs
- Staging expenses (in some cases)
- Title insurance paid by the seller
Sample calculation
| Item | Amount |
|---|---|
| Sale price | $650,000 |
| Original purchase price | $350,000 |
| Closing costs paid at purchase | $8,000 |
| Capital improvements during ownership | $42,000 |
| Total cost basis | $400,000 |
| Selling costs (commission + fees) | $32,000 |
| Capital gain | $218,000 |
| Section 121 exclusion (single filer) | $250,000 |
| Taxable gain | $0 |
In this example, even with a $218,000 gain, a single filer who meets the 2-of-5-year test owes zero federal capital gains tax.
TurboTax’s home sale tax guide walks through this calculation in detail and covers edge cases including homes with prior rental use.
Capital Gains Tax Rates on Home Sales in 2026
If your gain exceeds the Section 121 exclusion — or if you’re selling an investment property or second home — the rate you pay depends on how long you owned the property and your total taxable income.
Long-term vs. short-term capital gains
- Long-term capital gains (owned more than 1 year): taxed at 0%, 15%, or 20%
- Short-term capital gains (owned 1 year or less): taxed as ordinary income, up to 37%
The overwhelming majority of home sellers held their property for multiple years and qualify for long-term rates.
2026 long-term capital gains tax rate thresholds
| Filing Status | 0% Rate | 15% Rate | 20% Rate |
|---|---|---|---|
| Single | Up to $49,450 | $49,451–$553,850 | Over $553,850 |
| Married Filing Jointly | Up to $98,900 | $98,901–$623,300 | Over $623,300 |
| Head of Household | Up to $66,750 | $66,751–$583,750 | Over $583,750 |
These thresholds apply to total taxable income including the capital gain. The IRS adjusts these annually for inflation — verify against current IRS guidance before filing.
The 0% rate is significant for lower-income or retired sellers. If your total taxable income (including the gain) stays under the threshold, you owe zero federal capital gains tax on a long-term gain.
How much capital gains tax on common gain amounts
For a single filer with $70,000 in other taxable income, here’s what federal capital gains tax would look like on various gain amounts above the exclusion:
| Gain Above Exclusion | At 15% Rate | At 20% Rate |
|---|---|---|
| $50,000 | $7,500 | $10,000 |
| $100,000 | $15,000 | $20,000 |
| $200,000 | $30,000 | $40,000 |
| $300,000 | $45,000 | $60,000 |
| $400,000 | $60,000 | $80,000 |
These are federal estimates only. State taxes apply separately.
State capital gains taxes
Most states tax capital gains as ordinary income at the state level. State rates vary dramatically:
No state income tax (no state capital gains tax): Texas, Florida, Washington, Tennessee, Nevada, South Dakota, Wyoming, Alaska, and New Hampshire (on wage income)
Low rates: North Dakota (~1.1%), Indiana (~3%), Montana (~4.1%)
High rates: California (13.3%), New Jersey (10.75%), Oregon (9.9%), Minnesota (9.85%), New York (varies by income, up to 10.9%)
According to the Tax Foundation’s state capital gains tax data, selling in a high-tax state meaningfully affects net proceeds. A California seller with a $300,000 taxable gain could owe an additional $39,000+ in state tax on top of the federal bill.
How to Reduce or Avoid Capital Gains Tax When Selling a House
Several legitimate strategies can reduce or eliminate capital gains tax on a home sale. None of these are loopholes — they’re provisions of the tax code that reward specific behaviors.
The primary residence exclusion is the most powerful tool
If you haven’t used the Section 121 exclusion in the past two years and you meet the 2-of-5-year ownership and use tests, the exclusion eliminates federal capital gains tax on the first $250,000 ($500,000 married) of profit. No other strategy comes close to this impact for primary residence sellers.
How to qualify for the 0% capital gains rate
If your total taxable income — including the capital gain — stays under $49,450 (single filers) or $98,900 (married filing jointly) in 2026, your long-term capital gains rate is 0%. This isn’t a workaround; it’s the actual tax structure. Many retirees and lower-income sellers who have modest gains above their exclusion qualify for this rate and owe nothing in federal capital gains tax.
Increase your cost basis with improvements
Every dollar legitimately added to your cost basis reduces your taxable gain by one dollar. Keep records and receipts for every capital improvement — new roofs, kitchen renovations, additions, HVAC replacement, and similar upgrades. Review your records before listing; many sellers underestimate their cost basis and overpay on taxes as a result.
Deduct selling costs
Agent commissions, legal fees, advertising, and transfer taxes all reduce your taxable gain dollar for dollar. On a $600,000 sale with a 5.5% commission, that’s $33,000 off your gain before you calculate what’s taxable.
Partial exclusion for unforeseen circumstances
If you sell before meeting the full 2-year requirement because of a job relocation, health issue, or divorce, you may still qualify for a partial exclusion proportional to the time you did live there. A seller who lived in the home for 1 of the 5 years may exclude up to $125,000 (half of the $250,000 maximum). The IRS allows this under specific, documented circumstances.
Is there a loophole around capital gains tax?
There is no hidden loophole — but there are additional legitimate strategies:
- Time the sale to a lower-income year: If you’re near retirement or between jobs, selling in a year when your overall income is lower may qualify your gain for the 0% rate or keep you in the 15% bracket instead of 20%
- 1031 exchange for investment properties: Reinvest proceeds from an investment property sale into a similar property within 180 days to defer capital gains taxes indefinitely
- Opportunity Zone investment: Reinvesting gains into IRS-designated Opportunity Zones can defer or partially reduce capital gains
- Installment sale: Spreading a large gain over multiple tax years may help manage bracket impact
Consult a CPA or tax attorney before attempting any of these strategies. Each has specific requirements and limitations.
Controlling your closing date matters more than most sellers realize
The 2-of-5-year test is date-specific. If you move out of your home and the closing takes too long, you can accidentally fall outside the use-test window and lose the exclusion entirely. Similarly, 1031 exchange deadlines (45 days to identify, 180 days to close) are hard cutoffs — missing them by one day eliminates the tax benefit.
A cash offer provides a guaranteed closing date — something a traditional listing process with months of uncertainty cannot. For sellers where timing affects their exclusion eligibility or 1031 exchange window, that certainty has real financial value.
Want to close on a specific date? iBuyer.com cash buyers close in days, on a date you choose. Get a free, no-obligation cash offer in 24–48 hours.
Investment Properties, Second Homes, and Special Situations
Investment properties and rental homes
The Section 121 exclusion does not apply to investment properties. All gains are taxable at long-term rates, and sellers must also recapture depreciation they claimed during the rental period at a 25% rate. The 1031 exchange is the primary tax-deferral tool for investment property sellers.
Second homes and vacation properties
If you don’t meet the 2-of-5-year primary residence test — because the property was primarily a vacation home — the Section 121 exclusion doesn’t apply. Gains are taxed at long-term capital gains rates.
Military members
Active-duty military members can suspend the 5-year clock for up to 10 years during qualified official extended duty. This allows service members to meet the 2-of-5-year test even after extended deployment or government-mandated relocations. The suspension applies to both the ownership and use tests. MilitaryByOwner’s home sale tax guide covers the specific requirements for PCS moves and other military circumstances.
Divorce
When a divorcing couple sells their home, each spouse can apply the $250,000 exclusion individually — but each must independently meet the use and ownership tests. If only one spouse meets the tests, only $250,000 of gain is excludable rather than $500,000. Divorce timing relative to the sale can significantly affect the tax outcome; consult a tax attorney.
Inherited property
Inherited homes receive a step-up in basis to the fair market value at the date of the decedent’s death. This eliminates all capital gains that accumulated during the deceased person’s ownership. The heir also automatically qualifies for long-term capital gains treatment regardless of their own holding period. Inheriting an appreciated home is one of the most favorable tax situations in real estate.
How to Report a Home Sale on Your Taxes
If your gain is fully excluded under Section 121 and you did not receive a Form 1099-S, you may not need to report the sale at all.
If you receive Form 1099-S, you must report the sale on Schedule D (Form 1040) even if you owe no tax.
If your gain exceeds the exclusion, report the taxable portion on Form 8949 (Sales and Other Dispositions of Capital Assets) and transfer the totals to Schedule D.
For partial exclusions, attach a statement calculating your partial exclusion amount along with Form 8949.
For homes previously used as rentals, additional forms may be required to handle depreciation recapture (Form 4797).
Any sale involving a gain over the exclusion amounts, prior rental use, divorce, inheritance, or a 1031 exchange is best handled with a CPA or tax professional.
Compare Cash Offers from Top Home Buyers. Delivered by Your Local iBuyer Certified Specialist.
One Expert, Multiple Offers, No Obligation.
Frequently Asked Questions
Most homeowners who sell a primary residence pay zero federal capital gains tax. If your gain is under $250,000 (single filer) or $500,000 (married filing jointly) and you’ve lived in the home for at least two of the last five years, no federal capital gains tax is owed.
The Section 121 exclusion allows eligible homeowners to exclude up to $250,000 (single) or $500,000 (married) of capital gains from a primary home sale from federal income tax. To qualify, you must have owned and lived in the home as your primary residence for at least two of the last five years before the sale.
It depends on the exclusion and your income. A single filer with a $300,000 gain who qualifies for the exclusion would have $50,000 taxable. At the 15% long-term rate, that’s $7,500 in federal tax. A married couple with the same gain would owe nothing if their total gain is under $500,000.
A single filer with a $400,000 gain and full exclusion eligibility would have $150,000 taxable. At 15%, that’s $22,500 in federal capital gains tax. A married couple with the same gain still owes nothing if they’re under the $500,000 threshold and meet the use test.
There is no special federal capital gains tax exemption for people over 65. The same Section 121 exclusion and rate structure applies regardless of age. However, many retirees qualify for the 0% long-term capital gains rate if their total taxable income stays under $49,450 (single) or $98,900 (married) in 2026. Some states offer additional senior exemptions — check your state’s rules.
You must live in the home as your primary residence for at least two of the five years immediately before the sale. The two years don’t need to be consecutive. If you sell before meeting the two-year threshold due to a job relocation, health issue, or divorce, a partial exclusion may still apply.
The “6 year rule” is an Australian capital gains tax concept — it does not exist in US federal tax law. In Australia, homeowners may treat a rental property as their main residence for up to 6 years. In the US, the relevant rule is the 2-of-5-year primary residence test under Section 121 of the Internal Revenue Code.
The “36 month rule” is a UK tax concept and does not apply to US home sales. In the US, the relevant provision is the 2-year (24-month) primary residence requirement under Section 121 — not 36 months.
If your total taxable income — including the capital gain — stays under $49,450 (single filers) or $98,900 (married filing jointly) in 2026, your federal long-term capital gains rate is 0%. Many lower-income or retired sellers with modest gains above the exclusion qualify for this rate and owe no federal capital gains tax.
The Section 121 exclusion is not a loophole — it’s the tax code as written. Legitimate additional strategies include increasing your cost basis with documented improvements, deducting selling costs, qualifying for a partial exclusion, timing the sale to a lower-income year, and using a 1031 exchange for investment properties. None of these are improper. Consult a CPA before relying on any specific strategy.
A 1031 exchange allows real estate investors to sell an investment property and defer capital gains taxes by reinvesting proceeds into a similar property within specific deadlines — 45 days to identify a replacement property and 180 days to close. The 1031 exchange does not apply to primary residences and requires working with a qualified intermediary.
Yes, selling costs reduce your capital gain dollar for dollar. Agent commissions, legal fees, advertising, transfer taxes paid by the seller, and similar expenses are all deducted from the sale price when calculating your taxable gain.
If your gain is fully excluded, you may not need to file anything. If you receive Form 1099-S or have a taxable gain, report on Schedule D and Form 8949. A partial exclusion requires an attached calculation statement.
A cash sale does not change your tax obligations — capital gains tax is based on profit and holding period, not payment method. The main tax benefit of a cash sale is closing date certainty: you know exactly when the sale closes, which matters for meeting the 2-of-5-year use test and for 1031 exchange deadlines.
Methodology and Sources
This guide synthesizes IRS guidance and tax resource data from:
- IRS Topic 701: Sale of Your Home — primary authority on the Section 121 exclusion and reporting requirements
- TurboTax: Tax Aspects of Home Ownership — calculation guidance and edge cases
- Investopedia: Capital Gains on Home Sales — rate and exclusion analysis
- MilitaryByOwner — military-specific home sale tax rules
- Tax Foundation — state capital gains rate data
- Reddit r/tax — community-sourced practical experiences with home sale taxation
All 2026 tax thresholds and rates should be verified against current IRS guidance at IRS.gov before filing. Tax law is subject to annual inflation adjustments and legislative changes. This guide is not a substitute for professional tax advice.
Selling in 2026? Get Certainty on Your Closing Date
Your tax situation depends partly on when you close. The 2-of-5-year exclusion test is date-specific — and 1031 exchange deadlines are hard cutoffs that can’t be extended. A traditional listing with an uncertain closing timeline creates tax planning risk that a cash sale eliminates.
iBuyer.com cash buyers close in days, on a date you choose. No waiting months for a traditional sale to clear while your use-test clock ticks. Get a free, no-obligation cash offer in 24–48 hours and build your tax plan around a firm timeline.
Reilly Dzurick is a licensed real estate agent with over six years of experience and a member of the iBuyer.com Market Insights Team, covering national trends in home selling and the evolving iBuyer landscape. Her firsthand experience working with buyers and sellers gives her a practical perspective on how these platforms impact real homeowners. She holds a degree in Public Relations, Advertising, and Applied Communication.