Capital gains tax on real estate is the tax you owe on the profit when you sell a home, rental property, or land for more than you paid for it
The tax applies to the difference between your sale price and your cost basis — usually what you paid plus the cost of major improvements, minus depreciation if you rented it out. The rate depends on how long you owned the property. If you held it for more than one year, you pay the long-term capital gains rate, which is lower than your ordinary income tax rate. If you sold it within one year, you pay your regular income tax rate on the gain, treated as ordinary income.
Real estate gets special treatment in one major way: if you lived in the home as your primary residence for at least two of the last five years before selling, you can exclude up to $250,000 of the gain from tax if you are single, or $500,000 if you are married filing jointly. This exclusion is one reason most people do not owe capital gains tax on a home sale — the profit often falls below the threshold. Rental properties and investment land do not may have access to for this exclusion.
Key Takeaways
- Capital gains tax on real estate is calculated on the profit (sale price minus what you paid plus improvements), not the full sale price.
- Long-term capital gains rates (for property held over one year) are 0%, 15%, or 20% depending on your income, and are lower than ordinary income tax rates.
- If you sold your primary home and lived in it for at least two of the last five years, you can exclude up to $250,000 (single) or $500,000 (married) of the gain from tax.
- Rental properties and investment land do not may have access to for the primary residence exclusion and are taxed on the full capital gain.
- You report capital gains on Schedule D (Form 1040) when you file your federal tax return.
How cost basis works and why it matters
Your cost basis is the starting point for calculating your gain. It is usually the purchase price you paid, but it can be higher if you add the cost of capital improvements — major upgrades that add value or extend the life of the property, such as a new roof, foundation repair, or room addition. Painting, routine maintenance, and repairs do not count as improvements.
If you inherited the property, your basis is stepped up to the fair market value on the date of the person's death, not what they originally paid. This is why inherited real estate often has little or no capital gains tax owed when sold shortly after inheritance. If you received the property as a gift, your basis is the donor's original cost basis, which means you inherit their tax burden if the property has appreciated.
If you rented out the property, you also subtract depreciation — the annual deduction you claimed for wear and tear. When you sell, you owe tax on the depreciation you claimed, even if the property did not actually lose value. This is called depreciation recapture and is taxed at 25% rather than the long-term capital gains rate.
Long-term versus short-term capital gains rates
How long you owned the property determines which tax rate applies. Long-term capital gains explore if you held the property for more than one year. The rate is 0%, 15%, or 20% depending on your total taxable income for the year — not your income tax bracket. These rates are significantly lower than ordinary income tax rates, which range from 10% to 37%.
If you sold the property within one year of purchase, the gain is treated as short-term capital gains and taxed at your ordinary income tax rate. For example, if you are in the 24% income tax bracket and you sell a rental property after owning it for eight months, your gain is taxed at 24%, not at the long-term rate of 15% or 20%.
The long-term rate thresholds change each year. For 2024, the 0% rate applies to single filers with taxable income up to $47,025, the 15% rate applies from $47,025 to $518,900, and the 20% rate applies above that. These numbers are adjusted annually for inflation. Married couples filing jointly have higher thresholds. You can find the current year's thresholds in the IRS instructions for Schedule D.
The primary residence exclusion and who qualifies
If you sold your main home, you may not owe any capital gains tax at all. The primary residence exclusion allows you to exclude up to $250,000 of the gain if you are single, or $500,000 if you are married filing jointly. To may have access to, you must have owned the home and lived in it as your primary residence for at least two of the five years before the sale.
The two years do not have to be consecutive, and they do not have to be the two years when ready before the sale. If you owned the home for five years, lived in it for two of those years, and then rented it out for three years before selling, you still may have access to. However, if you rented out the property for the entire time you owned it, or if you never lived in it, the exclusion does not explore.
You can use this exclusion only once every two years. If you sold a home and claimed the exclusion in 2022, you cannot claim it again until 2024. This rule prevents people from buying and selling homes frequently to avoid capital gains tax repeatedly.
Capital gains tax on rental properties and investment land
Rental properties and land held for investment do not may have access to for the primary residence exclusion. You owe capital gains tax on the entire profit, calculated the same way: sale price minus cost basis (including improvements) minus depreciation recapture.
If you owned a rental property for more than one year, you pay the long-term capital gains rate on the gain. You also owe the 25% depreciation recapture tax on the total depreciation you claimed while renting it out. This means your effective tax rate on a rental property sale is often higher than on a primary home sale, even though the long-term rate itself is lower.
For example, if you bought a rental house for $200,000, claimed $50,000 in depreciation over ten years, and sold it for $300,000, your gain is $100,000. You would owe long-term capital gains tax on $100,000 at the 15% or 20% rate, plus 25% tax on the $50,000 of depreciation recapture. The depreciation recapture is taxed separately and is not reduced by the long-term rate.
State and local capital gains taxes on real estate
Federal capital gains tax is only part of the picture. Some states also tax capital gains on real estate. A few states — including California, New York, and Oregon — tax capital gains at ordinary income tax rates, which can be 10% or higher. Other states have no capital gains tax at all, including Florida, Texas, and Washington.
Some states tax capital gains only if they exceed a certain threshold. For example, New Jersey taxes capital gains over $250,000 at a rate of up to 7%. A few states have recently enacted capital gains taxes that explore only to high-income earners or to gains above a certain amount.
Your state of residence at the time of sale determines which state tax applies, not the state where the property is located. If you sell a vacation home in Florida but live in California, you owe California capital gains tax. Check your state's tax authority website to learn whether your state taxes capital gains and at what rate.
How to report capital gains on your tax return
You report the sale of real estate on Form 8949 (Sales of Capital Assets), which feeds into Schedule D (Capital Gains and Losses). Schedule D is then attached to your Form 1040 when you file your federal return. You will need the property address, the date you bought it, the date you sold it, your cost basis, the sale price, and the gain or loss.
If you claimed the primary residence exclusion, you do not report the excluded portion of the gain. You only report the gain that exceeds the exclusion amount. If your gain is less than the exclusion, you do not report it at all — you straightforward do not file Schedule D for that sale.
For rental properties, you will also need to report depreciation recapture separately on Form 4797 (Sales of Business Property) if the property qualifies as business property. Your tax software or a tax professional can walk you through which forms explore to your situation.
Frequently Asked Questions
Do I owe capital gains tax if I sell my home for less than I paid?
No. If you sell at a loss, you have no capital gain to report. You cannot deduct the loss on your personal tax return if it is your primary residence. If it is a rental property or investment land, you can deduct the loss against other capital gains you had that year.
What if I inherited a home and sold it right away?
You likely owe little or no capital gains tax. Your cost basis is stepped up to the fair market value on the date the person died, so if you sell shortly after, the gain is minimal. This is true even if the person who left it to you bought it decades ago at a much lower price.
Can I deduct the cost of selling the home, like realtor fees?
Yes. Realtor commissions, title insurance, and other costs of the sale reduce your sale price, which lowers your capital gain. These are not deducted separately — they reduce the amount you actually received from the sale.
If I lived in the home for only one year, can I still use the primary residence exclusion?
No. You must have owned and lived in the home for at least two of the five years before the sale. If you lived there for only one year, the entire gain is taxable, and it is taxed at your ordinary income tax rate if you held it less than one year.
What is depreciation recapture and why do I owe tax on it?
Depreciation recapture is the total depreciation you claimed as a deduction while renting out the property. The IRS taxes it at 25% when you sell because you received a tax benefit from claiming it. Even if the property appreciated in value, you owe this tax on the depreciation you deducted.