Do you pay capital gains tax when you sell your house?
Generally, you pay federal tax on a home sale only on the gain that the home sale exclusion does not cover. If it is your main home and you meet the Internal Revenue Service (IRS) tests, gain up to your limit stays out of your income. The tests include two years of owning the home and two years of living there in the five years before the sale.
Last reviewed
Clear Cash for Homes does not buy houses and is not a broker or agent; local cash buyers in our network make the offers. How it works
Will you owe tax on the sale of your home?
Generally, only on a gain that the home sale exclusion does not cover. The IRS figures your gain as the selling price, less your selling expenses, minus your adjusted basis: generally what the home cost you plus the cost of improvements, less certain decreases.
What happens to each part of the gain on your home sale
| What is compared | Gain the exclusion covers | Gain that stays taxable |
|---|---|---|
| How much it can be | Up to $250,000, or up to $500,000 for a married couple filing jointly when both spouses meet the use and look-back tests and at least one meets the ownership test. Source: irs.gov | Gain above your limit; gain from periods after 2008 when neither you nor your spouse used the home as your main home, with exceptions; and gain equal to depreciation allowed or allowable after May 6, 1997. Source: irs.gov |
| Federal income tax on it | None. Source: irs.gov | Owned more than 1 year: long-term rates of 0%, 15% or 20%, set by your taxable income; the part equal to depreciation can be taxed at up to 25%. Source: irs.gov |
| Reporting the sale | Not required, unless you received Form 1099-S or choose to report the gain as taxable. Source: irs.gov | Report it on Form 8949 and Schedule D (Form 1040), as a short-term or long-term sale depending on how long you owned the home. Source: irs.gov |
What reduces the gain on a home sale?
Two things: your selling expenses and your adjusted basis. Selling expenses are the costs directly tied to the sale, such as an agent's sales commission, advertising fees, legal fees, and loan charges you paid that would normally have been the buyer's.
Who can use the home sale exclusion?
Only the seller of a main home, the place the IRS treats as your principal residence, and you have only one at a time.
What if you do not meet the two-year tests?
You may still get a partial exclusion if the main reason for the sale is one the IRS lists.
Questions people ask
How do you avoid capital gains tax on selling a house?
Through the exclusion for a main home, which the IRS offers home sellers: meet its tests and gain up to your limit stays out of your income.
How much capital gains tax will I pay when I sell my house?
That depends mainly on how much gain you have, how much of it the exclusion covers, how long you owned the home and your taxable income.
How long do you need to own a house before selling to avoid capital gains tax?
For the full exclusion, two years of owning and two years of living there within the five years before the sale, with no exclusion used on another home in the two years before.
Do I have to pay capital gains if I sell my house and buy another?
The tax depends on the gain from this sale and on whether the home sale exclusion covers it.
Is there a one-time capital gains exemption for a home sale?
No. The IRS says there is no limit to the number of times you can claim the home sale exclusion, as long as each sale meets the tests and you have not used it on another home in the previous two years.
Can you deduct a loss when you sell your house?
No. The IRS says you can't deduct a loss on the sale of your main home, but you don't owe tax on the money you received from the sale either.
What happens if I sell my house before two years?
You may not get the full home sale exclusion. A partial one can apply if the main reason for the sale was a new job location, a health issue or an event you could not foresee. Any gain the exclusion does not cover is taxed as ordinary income if you owned the home one year or less, and at long-term rates if longer.
General information, not legal, tax or financial advice.
More guides
- Rent vs sell: should I sell my house or rent it out?
- Do you pay capital gains tax on an inherited house?
- What are the closing costs to sell a house, and who pays them?
- When is the best time to sell a house?
- Can you sell a house with a mortgage, and what happens to the loan?
- How do I sell my house, from the first step to closing?
- Divorce
- How a cash offer on a house works, with the pros and cons
- How to check a cash buyer is real
- Parent moving to senior living
- Who gets the house in a divorce?
Get an offer on your house
Sources: Internal Revenue Service.