Whether You Owe Tax on a Home Sale
You may owe federal income tax on the profit you make when you sell your house, but most homeowners owe nothing. The capital gains exclusion lets you exclude up to $250,000 of profit if you're single, or $500,000 if you're married filing jointly — as long as you meet two conditions: you owned the home for at least two of the last five years, and you lived in it as your main home for at least two of the last five years. If your profit falls below that threshold, you pay no federal tax on the sale.
If your profit exceeds the exclusion limit, you pay tax on the amount over it. The tax rate depends on your total income for the year and your filing status — it's either 0%, 15%, or 20% on long-term capital gains (which is what a home sale qualifies as). You may also owe state income tax on the profit, depending on where you live and where you're selling.
Real estate agents' commissions, title insurance, and other closing costs reduce your profit but are not deductible as a separate tax item — they lower the sale price you report, which automatically lowers your taxable gain.
Key Takeaways
- Most homeowners owe no federal tax because the $250,000 (single) or $500,000 (married) capital gains exclusion covers their entire profit.
- You must have owned and lived in the home as your main residence for at least two of the last five years to use the exclusion.
- If your profit exceeds the exclusion, you pay federal tax at the long-term capital gains rate of 0%, 15%, or 20%, depending on your income.
- State income tax on home sales varies by state; some states have no income tax, while others tax the full profit above the exclusion.
- Closing costs and agent commissions reduce your taxable profit automatically and do not need to be deducted separately.
How the Capital Gains Exclusion Works
The exclusion is built into the tax code and applies automatically if you meet the ownership and use tests. You do not need to file a special form or request it — you straightforward report the sale on your tax return and subtract the exclusion from your profit. The IRS calls this the Section 121 exclusion, named after the tax code section that created it.
The two-year test is flexible. You do not need to have owned the home for the two years when ready before the sale — they can be any two years in the five-year window. The same applies to the "main home" test: you lived there for two of the last five years, but not necessarily the most recent two. This matters if you moved away but are selling the house later.
If you're married and file jointly, you can each claim the exclusion separately, which is why the combined limit is $500,000. If you're divorced or separated, you may still be able to use the exclusion for a home you owned with an ex-spouse, depending on the timing and your divorce agreement — this is a situation where a tax professional's input is worth the cost.
When You Owe Tax on the Profit
You owe federal tax only if your profit exceeds the exclusion. The tax rate on long-term capital gains is 0%, 15%, or 20%, depending on your total taxable income for the year and your filing status. These rates are lower than ordinary income tax rates, which is why home sales get favorable treatment.
The rate brackets change each year. For 2024, for example, the 0% rate applies to single filers with taxable income up to $47,025, and the 15% rate applies to those earning between roughly $47,025 and $518,900. If you're in the 15% bracket and sell a house with a $100,000 profit above the exclusion, you owe $15,000 in federal tax on that gain. The exact amount depends on your specific income and filing status that year.
You may also owe the Net Investment Income Tax (NIIT), which is an additional 3.8% on investment income if your modified adjusted gross income exceeds $200,000 (single) or $250,000 (married filing jointly). A home sale counts as investment income for this purpose, so if you're above those thresholds and have a large gain, the NIIT applies to the gain above the exclusion.
State and Local Taxes on Home Sales
State income tax on home sales varies widely. Nine states have no income tax at all: Alaska, Florida, Nevada, South Dakota, Tennessee, Texas, Washington, Wyoming, and New Hampshire (which taxes only dividends and interest, not capital gains). In these states, you owe no state income tax on your home sale profit, though you may still owe federal tax.
Other states tax capital gains at the same rate as ordinary income, which can be 5% to 13% depending on the state and your income bracket. A few states, including California, have special capital gains taxes. California, for instance, taxes long-term capital gains at ordinary income tax rates, which range from 1% to 13.3% depending on your bracket.
Some cities and counties also impose local income taxes or transfer taxes on real estate sales. These vary by location and are usually small — often 1% to 2% of the sale price — but they add to your total tax bill. Your real estate agent or a local tax professional can tell you what applies in your area.
Calculating Your Profit and Basis
Your profit is the sale price minus your basis, which is what you paid for the house plus the cost of major improvements. If you bought the house for $300,000 and spent $50,000 on a new roof, foundation work, and a kitchen remodel, your basis is $350,000. If you sell for $550,000, your profit is $200,000 — well below the exclusion for a single filer.
Improvements that add value to the home count toward basis: a new roof, HVAC system, deck, or kitchen renovation. Repairs and maintenance do not: painting, fixing a leak, or replacing a broken window are repairs, not improvements, and do not increase your basis. The distinction matters because it changes your profit.
Keep records of what you paid for the house (the closing statement from purchase) and receipts for any major improvements. If you inherited the house, your basis is the fair market value on the date of death, not what the previous owner paid — this is called a "step-up in basis" and can eliminate or reduce your taxable gain. A tax professional can help you document basis if you're unsure.
Special Situations and Exceptions
If you do not meet the two-year ownership and use test, you may still be able to claim a partial exclusion if you sold because of a job change, health issue, or unforeseen circumstance. The IRS allows a reduced exclusion — typically 50% of the full amount — if you can show the sale was due to one of these reasons. You would need to file Form 8949 and attach a statement explaining the circumstance.
If you own multiple homes, the exclusion applies to your main residence only. If you own a vacation home or rental property, you cannot use the exclusion on that sale. However, if you convert a rental property to your main home and live there for two of the last five years, you may be able to use the exclusion on the portion of the gain that accrued after the conversion — this is complex and worth discussing with a tax professional.
If you sold at a loss — meaning the sale price was less than your basis — you cannot deduct the loss on your personal tax return. Home sales are not treated like stock sales, where you can claim capital losses. However, a loss does not create a tax problem; you straightforward report the sale and move on.
When to Talk to a Tax Professional
You should consult a tax professional if your profit exceeds the exclusion limit, if you do not meet the two-year test and want to claim a partial exclusion, if you own multiple properties, or if you inherited the house and are unsure of your basis. A CPA or tax attorney can review your specific situation, help you document basis, and make sure you report the sale correctly.
If your situation is straightforward — you owned and lived in the home for at least two of the last five years and your profit is below the exclusion — you can report the sale yourself using Form 8949 and Schedule D, which are included in the standard tax forms. Many tax software packages walk you through the process.
The cost of a consultation with a tax professional is often much less than the tax you might overpay or the penalty you might face if the sale is reported incorrectly. If you're selling a house for a significant amount, the investment in professional information is usually worthwhile.
Frequently Asked Questions
Do I have to report the sale to the IRS even if I owe no tax?
Yes. You must file Form 8949 and Schedule D with your tax return, even if your profit is below the exclusion and you owe no tax. The IRS uses the form to track home sales. Failing to report the sale can trigger an audit, even if you owe nothing.
What if I lived in the house for only one year?
You do not meet the two-year use test, so the standard exclusion does not explore. You may be able to claim a partial exclusion if you sold due to a job change, health issue, or unforeseen circumstance. Otherwise, you owe tax on the full profit above your basis, at the long-term capital gains rate.
Can I use the exclusion if I'm selling my ex-spouse's house after divorce?
It depends on the divorce agreement and the timing. If you received the house as part of the divorce settlement and meet the two-year ownership and use tests, you may be able to use the exclusion. The rules are complex, and a tax professional should review your situation before you sell.
Do closing costs reduce my taxable profit?
Yes. Closing costs, agent commissions, and title insurance are subtracted from the sale price to calculate your profit. You do not deduct them separately — they automatically lower the amount you report as gain on your tax return.
What if I sold the house at a loss?
You cannot deduct the loss on your personal tax return. Home sales are treated differently from investment property or stock sales. You straightforward report the sale with a negative gain, and there is no tax consequence.