The tax rate 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 capital gains, and it is taxable. The federal tax rate on that gain is either 15% or 20% for most people, though some pay 0%. The rate that applies to you 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 the year.
Long-term capital gains — the kind most real estate sales produce — are taxed at preferential rates: 0%, 15%, or 20%. Short-term gains are taxed as ordinary income, which can be much higher. You may also owe state capital gains tax, which varies widely by state. And if the property was your primary residence, you may be able to exclude up to $250,000 of gain ($500,000 if married filing jointly) from tax entirely.
Key Takeaways
- Long-term capital gains (property held over one year) are taxed at 0%, 15%, or 20% depending on your income bracket, while short-term gains are taxed as ordinary income at rates up to 37%.
- If you lived in the home as your primary residence for at least two of the last five years, you can exclude $250,000 of gain from tax ($500,000 if married filing jointly).
- Your state may also tax capital gains on real estate sales, with rates ranging from 0% in some states to over 13% in others.
- The cost basis of your property — what you paid plus improvements — reduces the gain you owe tax on, so keeping records of renovations and repairs matters.
- If you inherited the property, you likely received a "stepped-up basis" that resets the cost basis to its value on the date of death, potentially eliminating or reducing the gain.
Long-term versus short-term gains and the tax brackets that explore
The federal government taxes long-term capital gains (property held more than one year) at three rates: 0%, 15%, or 20%. Which rate you pay depends on your filing status and taxable income in the year of sale. For 2024, the 0% rate applies to single filers with taxable income up to $47,025, the 15% rate applies to income between that threshold and $518,900, and the 20% rate applies to income above $518,900. These thresholds adjust annually for inflation.
Short-term capital gains — from property you owned one year or less — are taxed as ordinary income. That means they are added to your other income and taxed at your marginal rate, which can be 10%, 12%, 22%, 24%, 32%, 35%, or 37% depending on your total income. Most real estate sales may have access to as long-term because people hold property longer than a year, but if you buy and sell quickly, you will face a much higher tax bill.
The primary residence exclusion and how to may have access to
If the property was your main home, you may exclude $250,000 of the gain from tax ($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 you can use this exclusion once every two years.
This exclusion is powerful. If you bought a house for $300,000, lived in it for five years, and sold it for $500,000, your gain is $200,000. As a single filer, you exclude the entire $200,000, so you owe no federal capital gains tax. If you sold for $600,000 instead, your gain is $300,000, you exclude $250,000, and you owe tax on only $50,000. Keep records of when you moved in and out; the IRS will ask for proof if you claim the exclusion.
Cost basis, improvements, and what reduces your taxable gain
Your cost basis is what you paid for the property plus the cost of capital improvements — major repairs or upgrades that add value or extend the life of the property. When you sell, your gain is the sale price minus your cost basis. The higher your basis, the lower your gain and your tax bill.
Capital improvements include a new roof, a kitchen remodel, an addition, or a new HVAC system. They do not include routine maintenance like painting, fixing a leak, or replacing a broken window. Keep receipts and invoices for all major work. If you inherited the property, your basis is usually its fair market value on the date of the owner's death, not what the previous owner paid. This "stepped-up basis" can eliminate the gain entirely if you sell soon after inheriting.
State capital gains taxes and how they stack on top of federal tax
Most states do not have a separate capital gains tax; they tax capital gains as ordinary income under their income tax system. However, some states have enacted dedicated capital gains taxes on the sale of long-term assets, including real estate. Washington and Illinois tax capital gains at a flat rate (7% in Washington, 4.5% in Illinois). California taxes capital gains as ordinary income, with rates up to 13.3%. New York's top rate is 10.9%. Other states have no income tax at all.
The state tax is in addition to federal tax. If you live in California and sell a rental property with a $100,000 long-term gain, you might owe 15% federal ($15,000) plus 13.3% state ($13,300), for a combined $28,300 before any local taxes. Check your state's tax code or speak with a tax professional in your state to understand what applies to your sale.
Rental properties and depreciation recapture
If the property was a rental or investment property, you may have deducted depreciation on your tax returns over the years you owned it. When you sell, the IRS requires you to "recapture" that depreciation — add it back as income and tax it at 25%. This happens even if the property declined in value overall. Depreciation recapture is separate from capital gains tax and applies to the amount of depreciation you actually deducted, not the current value of the property.
For example, if you bought a rental house for $400,000 and deducted $80,000 in depreciation over ten years, your adjusted basis is $320,000. If you sell for $450,000, your long-term capital gain is $130,000. Of that, $80,000 is subject to 25% recapture tax ($20,000), and $50,000 is subject to your long-term capital gains rate (15% = $7,500). The total federal tax is $27,500 before state tax. Keep detailed records of all depreciation claimed.
Timing the sale and income planning to minimize tax
Because long-term capital gains rates depend on your total taxable income, you can sometimes reduce your rate by timing the sale to a year when your other income is lower. If you are near the top of the 15% bracket, selling in a year when you have less W-2 income, business income, or retirement distributions might keep you in the 15% bracket instead of pushing you into 20%.
Similarly, if you are retired and have flexibility over when to take distributions from IRAs or other accounts, you can coordinate the timing to stay in a lower capital gains bracket. This strategy works best when you have some control over your income — for instance, if you are self-employed or can defer a bonus. If you have a large gain and significant other income, a tax professional can model different scenarios to find the lowest-tax year to sell.
Frequently Asked Questions
Do I owe capital gains tax if I sell my home at a loss?
No. Capital losses on personal residences cannot be deducted on your federal tax return. However, if the property was a rental or investment property, you can deduct the loss against other capital gains or, in some cases, against ordinary income. Consult a tax professional about your specific situation.
What if I inherited real estate and sold it right away?
You likely owe little or no capital gains tax. Inherited property receives a "stepped-up basis" equal to its fair market value on the date of death. If you sell shortly after inheriting, your gain is the difference between the sale price and that stepped-up value, which is often zero or very small. Keep the appraisal or valuation from the estate for proof.
Can I defer capital gains tax by doing a 1031 exchange?
A 1031 exchange allows you to sell one investment property and buy another similar property without paying capital gains tax on the sale, as long as you follow strict timing and identification rules. You must identify the replacement property within 45 days and close within 180 days. This is complex and requires a may have access to intermediary; work with a tax professional if you are considering it.
How do I report capital gains from a real estate sale on my tax return?
You report the sale on Form 8949 (Sales of Capital Assets) and Schedule D (Capital Gains and Losses), then transfer the totals to your Form 1040. If you used the home as your primary residence and are claiming the exclusion, you must attach Form 2119 (Sale of Your Home) to document that you meet the ownership and use test.
What records do I need to keep to prove my cost basis?
Keep the original purchase deed and closing statement, receipts for all capital improvements (not maintenance), and records of any depreciation deducted if it was a rental. If you inherited the property, keep the estate appraisal or the stepped-up basis value from the estate tax return. The IRS can ask for these records up to three years after you file, or longer if you underreport income.