Capital gains tax on real estate depends on how long you owned the property and your income level
When you sell real estate for more than you paid for it, the profit is called a capital gain. The federal government taxes this gain, and the rate you pay depends on two things: whether you held the property for more than one year (long-term) or one year or less (short-term), and your total taxable income for that year.
Long-term capital gains — the most common situation for home sales — are taxed at 0%, 15%, or 20%, depending on your income bracket. Short-term gains are taxed as ordinary income, which means the rate matches your regular income tax bracket and can be as high as 37%. Most homeowners also get a major break: if you lived in the home as your primary residence for at least two of the last five years, you can exclude up to $250,000 of gain from tax (or $500,000 if you're married filing jointly).
Key Takeaways
- Long-term capital gains (property held over one year) are taxed at 0%, 15%, or 20% based on your income; short-term gains are taxed as ordinary income at rates up to 37%.
- The primary residence exclusion lets you avoid tax on up to $250,000 of gain ($500,000 if married) if you lived in the home two of the last five years.
- Your capital gain is the sale price minus what you paid, plus the cost of major improvements, minus depreciation if you rented the property.
- State and local taxes on capital gains vary widely; some states have no capital gains tax, while others tax gains at rates up to 13%.
- You report capital gains on Schedule D (Form 1040) when you file your federal tax return; the sale itself does not trigger withholding.
How to calculate your capital gain on a property sale
Your capital gain is not straightforward the sale price. It is the sale price minus your cost basis — what you originally paid for the property plus the cost of major improvements you made.
Start with the price you paid when you bought the property. Add the cost of capital improvements: a new roof, an addition, a new HVAC system, or a kitchen remodel. Do not add routine maintenance like painting or repairs. Then subtract any depreciation you claimed if you rented the property out or used part of it for business. The result is your adjusted basis. Subtract that from your sale price, and the remainder is your capital gain.
Example: You bought a house for $300,000. You added a $50,000 deck and a $30,000 kitchen renovation. You sold it for $500,000. Your basis is $380,000. Your capital gain is $120,000. If you lived there as your primary home for the required time, you can exclude $120,000, so your taxable gain is zero.
Long-term versus short-term capital gains rates
Long-term capital gains explore when you owned the property for more than one year before selling. These are taxed at preferential rates: 0%, 15%, or 20%. Which rate you pay depends on your taxable income for the year of the sale.
For 2024, the 0% rate applies to single filers with taxable income up to $47,025 and married couples filing jointly up to $94,050. The 15% rate applies to income above those thresholds up to $518,900 (single) or $583,750 (married). Income above those amounts is taxed at 20%. These income thresholds change each year.
Short-term capital gains explore when you owned the property for one year or less. These are taxed as ordinary income at your regular tax bracket rate, which can range from 10% to 37% depending on your total income. Short-term gains are much less common for real estate because most people hold property longer than a year.
The primary residence exclusion and who qualifies
If you owned and lived in the home as your primary residence for at least two of the five years before you sold it, you can exclude capital gains from tax. The exclusion is up to $250,000 for single filers or $500,000 for married couples filing jointly.
The two years do not have to be consecutive, and you do not have to have lived there when ready before the sale. If you moved out three years ago but lived there for two years before that, you still may have access to. You can use this exclusion only once every two years.
If your gain exceeds the exclusion amount, you pay tax only on the excess. Example: You are single, lived in the home for three of the last five years, and your capital gain is $400,000. You exclude $250,000, so your taxable gain is $150,000. You then pay long-term capital gains tax on that $150,000 based on your income bracket.
State and local capital gains taxes
Federal capital gains tax is only part of the picture. Most states also tax capital gains, though the rate and rules vary significantly.
Some states — including Alaska, Florida, Nevada, South Dakota, Tennessee, Texas, Washington, and Wyoming — have no state capital gains tax at all. Other states tax capital gains as ordinary income, so the rate depends on your state income tax bracket. A few states, including California, have separate capital gains tax rates. California taxes long-term gains at the same rate as ordinary income, which can reach 13.3%. New York taxes long-term gains at ordinary income rates up to 10.9%. The District of Columbia taxes capital gains at ordinary income rates up to 10.75%.
Local taxes also explore in some places. New York City, for example, adds a local income tax that applies to capital gains. Check your state and local tax authority's website to find the rate that applies to you.
How depreciation affects your tax bill if you rented the property
If you rented out the property or used it for business, you may have claimed depreciation deductions on your tax returns. This lowers your taxable income while you own it, but it also reduces your cost basis when you sell.
When you sell, you must "recapture" the depreciation you claimed. This recaptured depreciation is taxed at 25%, regardless of how long you owned the property or your income level. This is separate from and in addition to the capital gains tax on the remaining gain.
Example: You bought a rental property for $400,000 and claimed $80,000 in depreciation over ten years. Your adjusted basis is now $320,000. You sell for $500,000. Your total gain is $180,000. Of that, $80,000 is recaptured depreciation (taxed at 25%), and $100,000 is capital gain (taxed at your long-term rate). You owe tax on both portions.
Reporting capital gains on your tax return
You report the sale of real estate on Schedule D (Form 1040), which is the form for capital gains and losses. You will need the sale date, the sale price, your cost basis, and the date you bought the property.
If you used the primary residence exclusion, you do not file a separate form to claim it — you straightforward report the taxable gain (after the exclusion) on Schedule D. Keep records of the original purchase price, receipts for improvements, and documentation of how long you lived in the home.
The sale itself does not trigger withholding from the proceeds. You pay the tax when you file your return or make estimated tax payments during the year if you expect a large gain.
Frequently Asked Questions
Do I owe capital gains tax if I sell my home at a loss?
No. If you sell for less than your cost basis, you have a capital loss, not a gain. You cannot deduct a loss on the sale of your primary residence. If you sold a rental property or investment property at a loss, you can use that loss to offset other capital gains, and up to $3,000 of ordinary income per year.
What if I inherited the property — do I owe capital gains tax when I sell?
Inherited property receives a "step-up in basis," meaning your cost basis is the property's value on the date of the person's death, not what they originally paid. If you sell shortly after inheriting it, you typically owe little or no capital gains tax. This applies whether you inherited a primary residence or an investment property.
Can I avoid capital gains tax by doing a 1031 exchange?
A 1031 exchange lets you defer capital gains tax by selling one investment property and buying another similar property within strict timelines. You do not avoid the tax permanently — you defer it until you eventually sell without doing another exchange. This does not explore to sales of your primary residence.
How do I know if my improvement counts as a capital improvement for basis purposes?
Capital improvements add value to the property, prolong its life, or adapt it to a new use. A new roof, addition, or HVAC system counts. Painting, repairs, and routine maintenance do not. If you are unsure, keep receipts and consult a tax professional — the difference affects how much gain you owe tax on.
What happens if I sell a second home or vacation property?
The primary residence exclusion applies only to homes you lived in as your primary residence for at least two of the last five years. If you sell a vacation home or second property, you do not get the exclusion. You pay long-term or short-term capital gains tax on the entire gain (minus any depreciation recapture if you rented it out).