Skip to main content
Capital Gains TaxHome Sale TaxSelling CostsNet ProceedsPrimary Residence

Do You Pay Taxes When You Sell Your House?

Most home sellers pay no federal tax on the sale. Learn the $250k/$500k capital gains exclusion, the 2-of-5 year rule, and when you actually owe.

Published 5 min read
HT Written by Homewise Team
JL Edited by Joshuan Le
Do You Pay Taxes When You Sell Your House?

The Short Version

Most homeowners who have lived in their home for at least 2 of the last 5 years pay zero federal capital gains tax on the sale, thanks to the $250,000 single-filer or $500,000 married-filing-jointly exclusion. You may still owe state income tax, depreciation recapture on a rental, or capital gains if your gain exceeds the exclusion. Selling for cash does not change your tax obligation.

$250,000
Capital gains exclusion for single filers
$500,000
Exclusion for married-filing-jointly
2 of 5
Years of ownership and use required

For most homeowners selling their primary residence, the answer to “do you pay taxes when you sell your house” is no. The tax code includes a generous exclusion that shields most home sale gains from federal capital gains tax entirely. But the rules have specific requirements, and the situations where you do owe tax can be costly if you are not prepared.

This guide explains who qualifies for the exclusion, how it is calculated, and when a home sale actually triggers a federal tax bill.

The Basic Answer: Most Sellers Pay Nothing

The IRS allows homeowners to exclude up to $250,000 of capital gain (single filers) or $500,000 (married filing jointly) from federal income tax when they sell their primary residence. This is called the Section 121 exclusion.

For the majority of sellers, the gain on their home falls below these thresholds, which means no federal tax is owed on the sale. The exclusion is not a deduction that reduces your tax; it is a full exclusion of that amount from taxable income.

What Is Capital Gain on a Home Sale?

Capital gain is the difference between what you sell the home for and your adjusted cost basis:

Capital gain = Sale price minus Adjusted cost basis

Your adjusted cost basis starts with what you paid for the home and increases with:

  • Qualifying home improvements (not repairs or maintenance, but capital improvements such as adding a room, replacing a roof, or installing a new HVAC system)
  • Selling costs from when you originally purchased the home (closing costs that were not deductible)

It decreases with:

  • Depreciation taken if you ever rented the property
  • Insurance reimbursements received for casualty losses

To illustrate with round numbers: you bought a home for $200,000, spent $40,000 on qualifying improvements over the years, and sell it for $410,000. Your cost basis is $240,000. Your gain is $170,000. As a single filer, that gain is entirely excluded. You owe nothing federally.

The 2-Out-of-5-Year Rule

To qualify for the exclusion, you must pass two tests for the 5-year period ending on the sale date:

  1. Ownership test: You must have owned the home for at least 2 years.
  2. Use test: You must have used the home as your primary residence for at least 2 years.

The two years do not need to be consecutive. You can move out, rent the home, move back in, and still qualify as long as you accumulate 24 months of qualifying use within the 5-year lookback window.

You can use this exclusion once every 2 years. If you sold a home and used the exclusion less than 2 years ago, you cannot use it again on a new sale.

When You Do Owe Tax: Four Common Scenarios

Scenario 1: Your gain exceeds the exclusion.

If you are a single filer and your capital gain is $320,000, you exclude $250,000 and pay capital gains tax on the remaining $70,000. The tax rate depends on your income: 0 percent, 15 percent, or 20 percent for most taxpayers at the federal level. To illustrate: a $70,000 taxable gain at 15 percent equals $10,500 in federal tax.

Scenario 2: You do not meet the residency requirement.

If you sell before living in the home for 2 years, the entire gain is taxable unless you qualify for a partial exclusion due to a job change, health reason, or other unforeseen circumstance the IRS recognizes as an exception.

Scenario 3: The home is a rental or investment property.

Rental and investment properties do not qualify for the Section 121 exclusion at all. Gains are taxed at capital gains rates, and you also owe depreciation recapture tax at up to 25 percent on any depreciation you claimed during ownership. This is a significant expense that surprises many landlords selling rental homes.

Scenario 4: You claimed the home office deduction.

If you deducted a portion of your home as a business space, the gain attributable to that portion is not eligible for the exclusion and is taxable as depreciation recapture.

What Selling Costs Reduce Your Gain

When you sell, certain costs reduce your capital gain dollar for dollar:

  • Agent commission (if paid by you)
  • Seller closing costs: title fees, transfer taxes, escrow fees
  • Legal fees directly related to the sale
  • Advertising costs if you sell without an agent

These costs are not a deduction on your return in the year of sale for most taxpayers. Instead, they reduce the sale price for purposes of calculating your gain. If you pay $16,500 in commission on a $300,000 sale, your effective sale price for tax purposes is $283,500, which reduces your gain by $16,500.

State Income Tax on Home Sales

The federal exclusion does not automatically apply at the state level. Most states conform to the federal exclusion, meaning no state income tax is owed if you qualify federally. However, some states have their own rules or lower exclusion amounts. States with no income tax (such as Florida and Texas) impose no state tax on the gain at all. Check your specific state rules or consult a tax professional before closing.

Does a Cash Sale Change Your Tax Obligation?

No. The way you sell your home (through an agent, for sale by owner, or directly to a cash home buyer) has no effect on your federal capital gains tax calculation. The tax is based on the gain, not the method of sale. If you qualify for the exclusion, you qualify regardless of how you sell. If you owe tax, the same calculation applies.

What does matter is the net proceeds you walk away with. Use our net proceeds calculator to estimate your gain, your tax exposure, and what you keep under each sale scenario.

A Note on Inherited Homes and Other Special Cases

The tax rules for a primary residence sale described here are different from the rules for inherited property, which involves a step-up in basis and different exclusion eligibility. If you are selling a home you inherited, see our detailed guide on how to sell an inherited house for the tax rules specific to that situation.

The Bottom Line

Most homeowners who meet the 2-of-5-year primary residence rule and have a gain below $250,000 (or $500,000 married) owe no federal tax when they sell. The tax becomes relevant when you have a large gain, have not met the residency requirement, or are selling a rental or investment property. In those cases, the capital gains rate and potential depreciation recapture can represent a meaningful cost to plan for before you close.

Understanding your tax exposure is part of knowing your true net from a home sale. Get a no-obligation cash offer from Homewise and pair it with your tax estimate to see the full picture before you decide how to sell.

FAQ

Frequently Asked Questions

Do I pay taxes when I sell my house?
Most primary residence sellers pay no federal capital gains tax. If you have owned and lived in the home for at least 2 of the last 5 years, you can exclude up to $250,000 of gain (single filer) or $500,000 (married filing jointly) from federal income tax. If your gain falls within those limits, you owe nothing to the IRS on the sale. State tax rules vary and should be verified separately.
What is the $250,000 and $500,000 capital gains exclusion?
The IRS allows qualifying homeowners to exclude a significant portion of their home sale gain from federal income tax. Single filers can exclude up to $250,000 of capital gain; married couples filing jointly can exclude up to $500,000. To qualify, you must have owned the home and used it as your primary residence for at least 2 of the 5 years immediately before the sale. You can use this exclusion once every two years.
What is the 2-out-of-5-year rule for home sales?
The 2-out-of-5-year rule means you must have owned the home and lived in it as your primary residence for at least 24 months out of the 60 months immediately before the sale date. The two years do not need to be consecutive. If you meet this test, you qualify for the capital gains exclusion. If you do not, your full gain is taxable at capital gains rates, though partial exclusions may apply in some cases.
When is a home sale actually taxable?
Your home sale becomes taxable when your capital gain (sale price minus your adjusted cost basis) exceeds the exclusion amount, when you have not met the 2-of-5-year residency rule, or when the property is not your primary residence. Rental properties, investment properties, and second homes do not qualify for the primary residence exclusion and are taxable at capital gains rates, plus depreciation recapture.
How do I reduce or avoid capital gains tax when selling my house?
For a primary residence, meeting the 2-of-5-year rule and staying within the exclusion limits keeps the gain tax-free. You can also increase your cost basis by adding qualifying home improvements over the years you owned the home, which reduces your taxable gain. Selling costs such as agent commissions and closing costs you pay can also reduce your taxable gain. Consult a tax professional for advice specific to your situation.

See your cash offer

Free cash offer · 24 hours · No fees

Get Offer