What capital gains tax means when you sell a house or property
Capital gains tax is what you owe the federal government on the profit you make when you sell real estate. If you bought a house for $200,000 and sold it for $300,000, your capital gain is $100,000. You pay tax on that $100,000, not on the full sale price. The tax rate depends on how long you owned the property and your total income that year.
Real estate capital gains work differently than other investments because of the primary residence exemption. If you lived in the house as your main home for at least two of the last five years before you sold it, you can exclude up to $250,000 of gain from tax if you're single, or $500,000 if you're married filing jointly. That exemption applies only once every two years. For rental properties, investment properties, or vacation homes, there is no exemption — you pay tax on the full gain.
Key Takeaways
- Capital gains tax applies to the profit on a sale, not the sale price itself, and the rate depends on how long you owned the property.
- If you lived in a house as your primary residence for at least two of the last five years, you can exclude up to $250,000 (or $500,000 if married) from taxation.
- Rental properties and investment real estate do not may have access to for the primary residence exemption and are taxed on the full gain.
- Long-term capital gains (property owned over one year) are taxed at lower rates than short-term gains, which are taxed as ordinary income.
- You report capital gains on your federal tax return using IRS Form 8949 and Schedule D, and you may also owe state capital gains tax depending on where you live.
Long-term versus short-term capital gains rates
The IRS taxes capital gains at different rates depending on how long you owned the property. If you owned it for more than one year, it is a long-term capital gain. Long-term gains are taxed at 0%, 15%, or 20% depending on your total taxable income that year. These rates are lower than ordinary income tax rates.
If you owned the property for one year or less, it is a short-term capital gain. Short-term gains are taxed as ordinary income at your regular tax bracket, which can be 10%, 12%, 22%, 24%, 32%, 35%, or 37%. For most people, short-term rates are significantly higher than long-term rates. This is why holding a property for longer than one year before selling usually results in lower federal tax.
The income thresholds for long-term rates change each year. For 2024, single filers pay 0% on long-term gains up to $47,025 of taxable income, 15% from $47,025 to $518,900, and 20% above that. Married couples filing jointly have higher thresholds. The IRS publishes updated thresholds each January.
How the primary residence exemption works
The primary residence exemption is the largest tax break most homeowners receive. To use it, you must have owned the home and lived in it as your main residence for at least two of the five years before you sold it. The two years do not have to be consecutive. If you meet this test, you exclude $250,000 of gain from federal tax if you're single, or $500,000 if you're married filing jointly.
You can use this exemption only once every two years. If you sold a home and used the exemption in 2022, you cannot use it again until 2024. If you are married and file jointly, both spouses must meet the ownership and use test, though only one spouse needs to have owned the property for the two-year period in some cases — the rules are complex here, and a tax professional can clarify your situation.
If your gain exceeds the exemption amount, you pay tax on the excess. If you sold a primary residence for a $600,000 gain and you're single, you exclude $250,000 and pay tax on $350,000. The tax rate on that $350,000 depends on your income and filing status.
Capital gains tax on rental and investment properties
Rental properties, vacation homes, and investment real estate do not may have access to for the primary residence exemption. You pay capital gains tax on the full profit, regardless of how much you gained. If you bought a rental house for $150,000 and sold it for $300,000, your gain is $150,000, and you owe tax on all of it.
For rental properties, you also deal with depreciation recapture. When you own a rental property, you can deduct depreciation on your tax return each year — the IRS assumes the building loses value over time. When you sell, the IRS recaptures that depreciation and taxes it at 25%, which is higher than the long-term capital gains rate. If you deducted $50,000 in depreciation over ten years, you owe 25% tax on that $50,000 when you sell, in addition to capital gains tax on the remaining profit.
Investment properties held for more than one year still may have access to for long-term capital gains rates on the gain above depreciation recapture. If you held the property for one year or less, the entire gain is taxed as short-term capital gains at ordinary income rates.
State capital gains taxes and local considerations
Federal capital gains tax is only part of what you owe. Most states also tax capital gains, though the rate and rules vary widely. Some states tax capital gains as ordinary income at your state tax bracket. Others have a separate capital gains tax rate. A few states have no capital gains tax at all — currently Alaska, Florida, Nevada, South Dakota, Tennessee, Texas, Washington, and Wyoming do not tax capital gains.
If you live in a state with a capital gains tax, you report the same gain to your state that you reported to the IRS. Some states offer their own primary residence exemption, though the amount and rules differ from the federal exemption. California, for example, does not have a separate capital gains exemption for primary residences — you pay state tax on the full gain. New York offers a partial exemption for gains under $1 million.
If you moved out of state after selling the property, you may owe tax to both your old state and your new state, depending on when you moved and where the property was located. This is another reason to consult a tax professional if you are relocating.
How to report capital gains on your tax return
You report real estate capital gains to the IRS using Form 8949: Sales of Capital Assets and Schedule D: Capital Gains and Losses. Form 8949 lists each property you sold, the date you bought it, the date you sold it, your basis (what you paid plus improvements), the sale price, and your gain or loss. Schedule D summarizes your long-term and short-term gains and losses and calculates your net capital gain.
You will receive a Form 1099-S from the title company or real estate agent if the sale price exceeded $600 (this threshold varies by state). The 1099-S reports the gross sale price, not your gain. You use it to cross-check your own records, but the IRS already has a copy. If you do not receive a 1099-S, you still must report the sale on your tax return.
If you used the primary residence exemption, you do not file a separate form — you calculate the exemption yourself on Schedule D and reduce your reported gain by that amount. Keep records of your purchase price, sale price, closing documents, and receipts for any improvements you made to the property. The IRS can audit your return up to three years after you file, or longer if there is a substantial underreporting of income.
Adjusting your basis and what counts as an improvement
Your basis is what you paid for the property plus the cost of improvements. Improvements are permanent upgrades that add value or extend the life of the property — a new roof, a kitchen remodel, an addition, or a new HVAC system. Repairs and maintenance do not count as improvements. Painting, fixing a leak, or replacing a broken window are repairs, not improvements, and you cannot add them to your basis.
If you paid $200,000 for a house and spent $50,000 on a new roof and kitchen, your basis is $250,000. If you sold for $400,000, your gain is $150,000, not $200,000. Keep receipts and invoices for all improvements. If you cannot document an improvement, the IRS will not allow it, and your gain will be higher.
If you inherited the property, your basis is stepped up to the fair market value on the date of death, not what the previous owner paid. This can significantly reduce your capital gains tax. If your parent bought a house for $100,000 and it was worth $400,000 when they died, your basis is $400,000. If you sell it immediately for $400,000, your gain is zero.
Frequently Asked Questions
Do I owe capital gains tax if I sell my primary residence at a loss?
No. Capital losses on personal residences cannot be deducted from your taxes. If you sold your primary home for less than you paid, you report no gain or loss on your tax return. You cannot use that loss to offset other income or gains. Rental properties are different — you can deduct capital losses on investment real estate against other capital gains.
What if I sold the house but the buyer is still paying me over time?
If you financed part of the sale yourself, you may be able to use the installment sale method to spread the gain over multiple years. This can lower your tax in the year of sale. You report the transaction on Form 6252 and recognize gain as you receive payments. Consult a tax professional before closing if you plan to finance the sale yourself.
Can I avoid capital gains tax by doing a 1031 exchange with real estate?
A 1031 exchange allows you to defer capital gains tax by selling one investment property and buying another similar property within strict timelines. You must identify the replacement property within 45 days and close within 180 days. The primary residence exemption and 1031 exchanges are separate — you cannot use both on the same sale. A 1031 exchange defers tax but does not eliminate it.
What if I owned the house before 2001 and do not have records of what I paid?
The IRS allows you to use the fair market value on January 1, 2001, as your basis if you cannot find your original purchase documents. You can use tax records, property tax assessments, or a professional appraisal to establish that value. If you cannot establish a basis, the IRS may use the sale price and assume your gain is the full amount, which is the worst outcome for you. Search for old documents first — closing statements, mortgage papers, and property tax records often survive.
Do I owe capital gains tax in the year I sell or when I receive the money?
You owe tax in the year of sale, regardless of when you receive payment. If you sold a house in 2024 but the buyer is paying you in installments through 2026, you still report the gain on your 2024 tax return. The exception is the installment sale method, which spreads gain recognition over the years you receive payments. Without an installment sale agreement, you report the full gain in the year of closing.