The Primary Residence Exclusion Is Your Main Tool
If you sell your home at a profit, you may owe capital gains tax on that profit — but the IRS lets you exclude a large portion of it if the home was your primary residence. A single filer can exclude up to $250,000 of gain; a married couple filing jointly can exclude up to $500,000. This exclusion applies to the profit itself, not the sale price, so it wipes out the tax bill entirely for most homeowners.
To use this exclusion, you must have owned the home and lived in it as your main home for at least two of the five years before you sold it. The two years do not have to be consecutive, and they do not have to be the most recent two years. If you meet these rules, you report the sale on Schedule D (Form 1040) and claim the exclusion there — you do not file a separate form to request it.
The exclusion applies only once every two years per person. If you sold a home and used the exclusion within the past two years, you cannot use it again until two years have passed from that sale, even if you now own a different home.
Key Takeaways
- Single filers can exclude up to $250,000 of home sale profit from capital gains tax; married couples filing jointly can exclude up to $500,000.
- You must have owned and lived in the home as your primary residence for at least two of the five years before the sale to use the exclusion.
- The two years of ownership and use do not have to be consecutive or recent, so you can sell a home you left years ago and still may have access to.
- You claim the exclusion on Schedule D when you file your tax return; there is no separate process or approval process.
- If your profit exceeds the exclusion amount, you owe capital gains tax only on the excess, at either 0%, 15%, or 20% depending on your income.
When Your Profit Exceeds the Exclusion Limit
If your home sale profit is larger than $250,000 (or $500,000 if married filing jointly), you owe capital gains tax on the amount above the exclusion. The tax rate depends on your total income for the year, not just the home sale profit. The IRS uses three rates: 0%, 15%, or 20%.
Your profit is the sale price minus your adjusted basis — which is what you paid for the home plus the cost of major improvements (like a new roof or kitchen renovation), minus any depreciation you claimed if you rented out part of the home. Repairs and maintenance do not count as improvements. If you bought the home for $300,000, made $50,000 in improvements, and sold it for $700,000, your profit is $350,000. After the $250,000 exclusion, you owe tax on $100,000.
To find your tax rate, add the taxable gain to your other income and check the IRS tax tables for your filing status. The 0% rate applies to lower incomes, 15% to middle incomes, and 20% to the highest incomes. These thresholds change each year. For 2024, the 15% rate starts at $47,025 for single filers and $94,050 for married couples filing jointly, but you should check the current year's rates when you file.
Situations Where You Lose Part or All of the Exclusion
The IRS reduces or eliminates your exclusion if you sold another home and used the exclusion within the past two years. If you sold a home less than two years ago and claimed the exclusion, you cannot use it again until two years have passed from that earlier sale. If you sold a home between one and two years ago, you may be able to claim a reduced exclusion, but you will need to calculate the reduction based on the time elapsed.
You also lose the exclusion if you did not own and live in the home for two of the five years before the sale. If you owned it for only 18 months, or if you lived in it for one year and rented it out for the next three years without living there again, you do not meet the test. In these cases, any profit is subject to capital gains tax without the exclusion.
If you inherited the home, you receive a "step-up" in basis, which means your adjusted basis is the home's value on the date of the previous owner's death, not what they paid for it. This often eliminates or greatly reduces the profit, even if you sell the home shortly after inheriting it. You still need to own and live in it for two of the five years to use the exclusion, but the step-up usually means there is little or no taxable gain to exclude.
Documenting Your Ownership and Use
You do not file a form to prove you owned and lived in the home — the IRS trusts your return unless they audit you. However, you should keep records that show your ownership and primary residence status. These include the deed or mortgage documents, property tax bills, utility bills, voter registration, driver's license address, and insurance policies. If you moved during the five-year window, keep documents from each address showing when you lived there.
If you rented out part of the home or used part of it for business, you may still use the exclusion for the portion you lived in as your primary residence. However, any depreciation you claimed on the rental or business portion reduces your exclusion dollar-for-dollar. If you claimed $10,000 in depreciation on a rental room, your exclusion drops from $250,000 to $240,000.
Keep records of any major improvements you made, including receipts, invoices, and contracts. The cost of improvements increases your adjusted basis, which reduces your taxable profit. If you cannot document an improvement, you cannot count it toward your basis, so the IRS will tax a larger gain.
How to Report the Sale on Your Tax Return
You report the home sale on Schedule D (Form 1040), which is the form for capital gains and losses. You will need the sale price, your adjusted basis (purchase price plus improvements minus depreciation), the date you bought the home, and the date you sold it. The IRS also requires you to report whether you are claiming the primary residence exclusion.
If your only transaction for the year is the home sale and you are claiming the full exclusion with no taxable gain remaining, you may not need to file Schedule D at all — some taxpayers can report it directly on Form 1040. However, if you have other capital gains or losses, or if part of your home sale profit is taxable, you must file Schedule D. Your tax software will guide you through the questions and generate the form automatically.
If you sold the home in a prior year but did not report it on your return, you should file an amended return (Form 1040-X) for that year. The longer you wait, the more interest and penalties may accumulate. The IRS can go back three years to assess tax, but they can go back longer if they suspect fraud.
Special Situations: Divorce, Relocation, and Partial Use
If you sold a home as part of a divorce settlement, you may still use the exclusion if you owned and lived in it for two of the five years before the sale, even if your ex-spouse now owns it. The ownership and use test applies to each spouse separately, so if only one spouse meets the test, only that spouse can claim the exclusion on their separate return.
If you sold a home because of a job relocation, health issue, or unforeseen circumstance, you may be able to claim a reduced exclusion even if you did not own and live in the home for the full two years. The IRS allows this under specific rules, and you must attach a statement to your return explaining the reason. Common reasons include a change in employment location, health problems requiring a move, or divorce. You calculate the reduced exclusion by multiplying the full exclusion by the fraction of time you actually owned and lived in the home.
If you rented out the entire home for part of the five-year window and then moved back in and lived there for the rest of the time, you can still use the exclusion for the years you lived there as your primary residence. However, any depreciation you claimed while it was a rental reduces your exclusion. If you claimed $5,000 in depreciation during the rental years, your exclusion drops to $245,000.
State and Local Capital Gains Taxes
The federal capital gains exclusion applies only to federal income tax. Some states also tax capital gains, and they may or may not allow the same exclusion. California, for example, taxes capital gains as ordinary income and does not allow a primary residence exclusion — you owe state tax on the full gain above your basis, with no exclusion. Other states like Florida and Texas have no income tax at all, so there is no state capital gains tax.
Check your state's tax rules before you sell. If you live in a state with capital gains tax, you may owe state tax even if the federal exclusion eliminates your federal tax bill. Some states allow a partial exclusion or a deduction for home sale gains, so the rules vary widely. Your state tax agency's website or a tax professional in your state can tell you what applies to your situation.
Frequently Asked Questions
Can I use the exclusion if I sell a vacation home or investment property?
No. The exclusion applies only to your primary residence — the home where you live most of the time. A vacation home, rental property, or investment property does not may have access to, even if you own it and use it occasionally. Any profit on the sale is subject to capital gains tax without the exclusion.
What if I lived in the home for two years but owned it for five years before selling?
You still may have access to. The rule requires two years of ownership and two years of use within the five-year window before the sale. The two years of ownership and the two years of use do not have to overlap or be the same period. If you owned it for five years and lived in it for two of those years, you meet the test.
Do I have to report the sale if my profit is less than the exclusion amount?
You do not owe capital gains tax if your profit is below the exclusion, but you may still need to report the sale on Schedule D depending on your other income and transactions. Check your tax software or a tax professional to be sure. It is safer to report it than to skip it, since the IRS receives a copy of the closing statement from the title company.
Can I claim the exclusion if I inherited the home from my parents?
You can use the exclusion if you owned and lived in the home as your primary residence for two of the five years before the sale. Inheriting the home counts as ownership, but you must have actually lived there. You also receive a step-up in basis to the home's value on the date of death, which usually means little or no taxable gain even without the exclusion.
What happens if I sell the home before I have owned it for two years?
You cannot use the primary residence exclusion, so any profit is subject to capital gains tax. However, you may be able to claim a reduced exclusion if you sold a prior home more than two years ago, or if you have a may have access to reason like a job change or health issue. Otherwise, you owe tax on the full gain at your applicable capital gains rate.