When You Owe Capital Gains Tax on Real Estate Sales
You pay capital gains tax in the year you sell the property, not when you buy it or while you own it
Capital gains tax on real estate becomes due when you complete the sale — the moment the deed transfers and you receive the proceeds. You report the gain on your tax return for that year, and the tax is due by April 15 of the following year (or October 15 if you file an extension). You do not owe anything on the property straightforward by owning it, even if its value climbs every year.
The timing matters because it determines which tax year the gain falls into. If you close on the sale on December 20, 2024, you report it on your 2024 tax return filed in 2025. If you close on January 5, 2025, it goes on your 2025 return filed in 2026. The sale date on the closing statement is what counts, not the date you signed the contract or listed the property.
The amount you owe depends on how long you owned the property. If you owned 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 owned it for one year or less, you pay the short-term capital gains rate, which is the same as your regular income tax bracket. Most home sales may have access to for long-term treatment because people typically own homes for years.
Key Takeaways
- Capital gains tax is due in the tax year you close the sale, reported on your return filed the following spring.
- Long-term capital gains (property owned over one year) are taxed at lower rates than short-term gains, and most home sales may have access to for long-term treatment.
- The gain is the sale price minus your original purchase price plus the cost of major improvements, minus selling costs like realtor commissions.
- You may owe nothing if you lived in the home as your primary residence for at least two of the five years before the sale, because of the primary residence exclusion.
- State and local taxes on capital gains vary widely — some states have no capital gains tax, while others tax it as ordinary income.
How the IRS calculates your gain
Your capital gain is not the sale price — it is the sale price minus what you paid for the property, adjusted for improvements and costs. The IRS calls your original purchase price your basis. If you bought the house for $300,000 and sold it for $450,000, your gain is $150,000 before adjustments.
You can add to your basis by including the cost of major improvements that added value to the property. A new roof, a kitchen renovation, or an addition counts. You cannot add routine maintenance like painting, repairs, or landscaping. The line between improvement and maintenance is not always clear — the IRS generally looks at whether the work extended the property's life, increased its value, or adapted it to a new use. Keep receipts and invoices for any work you claim.
You subtract your selling costs from the sale price before calculating the gain. Real estate agent commissions, title insurance, attorney fees, and transfer taxes all reduce the amount you actually keep. If you paid a 6 percent commission on a $450,000 sale, that is $27,000 off the top. Your gain would be $450,000 minus $300,000 (purchase price) minus $27,000 (commission) minus any other costs, which equals $123,000 in this example.
The primary residence exclusion saves most homeowners from owing tax
If you lived in the home as your main residence for at least two of the five years before you sold it, 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 is called the Section 121 exclusion, and it is the reason most people who sell their home owe no capital gains tax at all.
The two years do not have to be consecutive, and they do not have to be the last two years before the sale. If you owned the home for five years, lived in it for two of those years, and rented it out for the last three, you still may have access to. You report this exclusion on Schedule D (Form 1040) when you file your return.
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, living in, and selling multiple properties in quick succession to avoid tax repeatedly.
The exclusion does not explore if you did not live in the home as your primary residence, or if you used it as a rental property for the entire time you owned it. If you converted a rental property to your primary residence, the exclusion applies only to the years after the conversion, not the years you rented it out.
Long-term versus short-term capital gains rates
The tax rate on your gain depends on how long you held the property. If you owned it for more than one year before selling, the gain is long-term. Long-term capital gains are taxed at 0 percent, 15 percent, or 20 percent depending on your income level — these rates are much lower than ordinary income tax rates, which go up to 37 percent.
If you owned the property for one year or less, the gain is short-term. Short-term gains are taxed as ordinary income at your regular tax bracket rate. For someone in the 24 percent tax bracket, a short-term gain is taxed at 24 percent, while a long-term gain might be taxed at 15 percent. The difference can be substantial on a large gain.
Most real estate sales are long-term because people hold homes for years. Short-term real estate gains are rare and usually happen when someone buys a property, makes improvements, and sells it within months — sometimes called a "flip." Even then, the holding period is measured from the date you took ownership, not from the date you began work on the property.
State and local taxes on capital gains
Federal capital gains tax is only part of the picture. Many states tax capital gains as ordinary income, some tax them at a lower rate, and a few do not tax them at all. The state tax is separate from federal tax and is calculated on top of it.
States with no capital gains tax include Alaska, Florida, Nevada, South Dakota, Tennessee, Texas, Washington, and Wyoming. If you live in one of these states, you owe federal tax but no state tax on the gain. States like California, New York, and Oregon tax capital gains as ordinary income, meaning a long-term gain is taxed at the same rate as wages. A few states, including North Carolina and Colorado, have lower capital gains rates than their ordinary income rates.
Some states also impose local taxes on capital gains or real estate sales. New York City, for example, has a real estate transfer tax that applies to the sale price, separate from capital gains tax. Check your state and local tax authority website to understand what you owe where you live.
Reporting the sale on your tax return
You report the sale on Schedule D (Form 1040), which is the form for reporting capital gains and losses. You list the property, the date you bought it, the date you sold it, the sale price, your basis (adjusted for improvements), and the gain or loss. If you have a loss — you sold for less than you paid — you can use that loss to offset other gains or, in some cases, ordinary income.
You will also receive a Form 1099-S from the title company or your real estate agent if the sale price exceeds a certain threshold (currently $600 in most cases, though this varies by state and may change). The 1099-S reports the gross sale price to the IRS, so the IRS knows you sold the property. You must report the actual gain or loss on Schedule D, which may be different from the gross price on the 1099-S.
If you claimed the primary residence exclusion, you do not file a separate form — you straightforward report the gain before the exclusion on Schedule D, and the exclusion reduces your taxable gain. Keep records of your purchase price, improvements, and selling costs for at least three years in case the IRS asks questions.
What happens if you do not report the sale
The IRS receives a copy of the 1099-S and knows you sold the property. If you do not report the sale on your tax return, the IRS will likely send you a notice asking why. Failing to report income, even if you owe no tax because of the primary residence exclusion, can result in penalties and interest.
If you owe tax and do not pay it by the important date, the IRS charges interest on the unpaid amount starting the day after the return due date. Penalties for underpayment or late payment can add 0.5 percent per month to what you owe. It is much simpler to file the return and claim the exclusion if you may have access to.
Frequently Asked Questions
Do I owe capital gains tax if I sell my home at a loss?
No. If you sell for less than you paid, 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 potentially some ordinary income, depending on your situation.
What if I inherited the property — do I owe capital gains tax when I sell it?
Inherited property receives a "step-up in basis," meaning your basis is the property's value on the date the previous owner died, not what they paid for it. If you inherit a house worth $400,000 and sell it a year later for $410,000, your gain is only $10,000, not the full difference between the sale price and what the original owner paid decades ago. This step-up applies to most inherited property.
Can I defer capital gains tax by reinvesting the money into another property?
Not with real estate. The 1031 exchange allows you to defer tax on investment or rental property by reinvesting the proceeds into another like-kind property within strict timelines, but it does not explore to your primary residence. For your main home, the primary residence exclusion is your only tax break.
If I own the property with my spouse, do we each get the $250,000 exclusion?
No. If you are married filing jointly, you get one $500,000 exclusion as a couple. If you are married filing separately, each spouse gets $250,000. If you own the property with someone who is not your spouse, each owner gets $250,000 only if each lived in the home as their primary residence for two of the five years before the sale.
What if I sold the property before 2024 — do I still report it on my 2024 return?
No. You report the sale on the tax return for the year you closed the sale. A 2023 sale goes on your 2023 return, filed in 2024. You do not report old sales again unless the IRS contacts you about them.
This guide is for general information only and is not medical, financial, legal, or other professional advice. For decisions specific to your situation, consult a qualified professional. See our Editorial Policy.