You pay capital gains tax the year you sell, not when you buy or own the property
Capital gains tax on real estate is owed in the tax year when you close the sale and receive the proceeds. You do not owe it while you own the home, and you do not owe it when you purchase. The tax applies only to the profit — the difference between what you paid for the property (your basis) and what you sold it for (your sale price). If you sell in March 2024, you report the gain on your 2024 tax return, filed in 2025.
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 taxed as ordinary income. Most homeowners may have access to for a partial or full exclusion that lets them avoid tax on a portion of the gain, which is why many home sales produce no tax bill at all.
Key Takeaways
- Capital gains tax is owed in the year you sell the property, reported on your tax return for that year.
- You only pay tax on the profit (sale price minus what you paid plus improvements), not the full sale price.
- Homeowners can exclude up to $250,000 of gain if single or $500,000 if married filing jointly, provided they meet the ownership and use test.
- Long-term gains (owned more than one year) are taxed at 0%, 15%, or 20% depending on your income; short-term gains are taxed as ordinary income.
- You must report the sale on Form 8949 and Schedule D, even if the gain is fully excluded and you owe no tax.
How basis and sale price determine your taxable gain
Your basis is what you paid for the home plus the cost of major improvements. If you bought the house for $300,000 and later spent $50,000 on a new roof, foundation work, or an addition, your basis is $350,000. Routine maintenance — painting, repairs, landscaping — does not count. Only permanent improvements that add value or extend the life of the property count toward basis.
Your sale price is what the buyer pays you, minus real estate commissions and closing costs you paid (such as title insurance or attorney fees). If you sold for $500,000 and paid $30,000 in commissions and closing costs, your net sale price is $470,000. Subtract your basis of $350,000, and your taxable gain is $120,000 — before any exclusion.
Keep receipts and records for all major improvements: contractor invoices, permits, before-and-after photos. If you cannot document an improvement, the IRS will not let you add it to your basis. The same applies to closing costs — ask your title company or attorney for an itemized statement at closing.
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 the sale, you can exclude $250,000 of gain from tax (or $500,000 if you are married filing jointly and both spouses meet the test). This exclusion is the reason most home sales produce no tax bill. In the example above, the $120,000 gain would be fully covered by the $250,000 exclusion, and you would owe no capital gains tax.
The two-year test is flexible. You do not have to own the home for the two years when ready before the sale — they can be any two years in the five-year window. If you bought in 2020, lived there through 2021, moved out in 2022, and sold in 2024, you still may have access to. However, if you sold a different home and used the exclusion within the past two years, you cannot use it again on this sale.
If you are married filing jointly, both spouses must meet the ownership and use test to claim the full $500,000 exclusion. If only one spouse meets the test, the exclusion is $250,000. If you are divorced or widowed, the rules depend on when the sale occurred and whether you remarried — consult a tax professional in these situations.
Long-term versus short-term capital gains rates
If you owned the property for more than one year before selling, your gain is taxed at the long-term capital gains rate. For 2024, these rates are 0%, 15%, or 20%, depending on your total taxable income. Most people fall into the 15% bracket. The 0% rate applies to lower-income filers; the 20% rate applies to high-income filers. These rates are lower than ordinary income tax rates, which can reach 37%.
If you owned the property for one year or less, your gain is taxed as short-term capital gains, which means it is taxed at your ordinary income tax rate — the same rate as wages or salary. For most people, this is 22%, 24%, or higher. This is why holding a property for longer than one year before selling usually saves money in taxes.
The holding period starts the day after you take title and ends the day you close the sale. If you bought on January 15, 2023, and sold on January 15, 2024, you owned it for exactly one year, which qualifies as long-term. If you sold on January 14, 2024, it is short-term.
State and local taxes on the sale
In addition to federal capital gains tax, some states tax capital gains on real estate sales. California, New York, and Oregon are among the states with capital gains taxes. Other states have no capital gains tax at all. Your state tax may explore even if your federal gain is fully excluded by the primary residence exclusion.
Some cities and counties also impose transfer taxes or sales taxes on real estate transactions. These are separate from capital gains tax and are usually paid by the seller at closing. The amount varies widely — from less than 1% to over 2% of the sale price in some jurisdictions. Your title company or real estate agent can tell you what applies in your area.
If you moved to a different state after selling, you may owe tax in both the state where the property was located and the state where you now live. The rules for avoiding double taxation vary by state. A tax professional in your new state can advise you on filing requirements.
Reporting the sale on your tax return
You report the sale on Form 8949: Sales of Capital Assets and Schedule D: Capital Gains and Losses. Form 8949 lists the property, the date you bought it, the date you sold it, your basis, the sale price, and the gain or loss. Schedule D summarizes the information from Form 8949 and calculates your total long-term and short-term gains or losses for the year.
You must file these forms even if your entire gain is excluded by the primary residence exclusion and you owe no tax. The IRS needs to see that you reported the sale correctly. If you do not file Form 8949 and Schedule D, the IRS may send you a notice asking for the missing information.
If you used a real estate agent, they will send you a Form 1099-S: Proceeds from Broker and Barter Exchange Transactions showing the gross sale price. This form goes to the IRS as well. Your Form 8949 and Schedule D must reconcile with the 1099-S — if they do not match, the IRS will follow up. If you sold the property yourself without an agent, you may not receive a 1099-S, but you still must report the sale.
Special situations: inherited homes, investment properties, and partial exclusions
If you inherited the home, your basis is stepped up to the fair market value on the date of the owner's death, not what the original owner paid. This means if your parent bought the house for $100,000 and it was worth $400,000 when they died, your basis is $400,000. If you sell it a few months later for $410,000, your gain is only $10,000. This step-up in basis is one of the largest tax benefits in the code and applies to most inherited property.
If you rented out the property or used it for business, you do not may have access to for the primary residence exclusion. You pay capital gains tax on the entire gain (minus depreciation recapture, which is taxed at 25%). If you lived in the home for part of the time and rented it out for part of the time, you may be able to exclude a portion of the gain based on the fraction of time you lived there — but the calculation is complex and requires professional help.
If you sold at a loss — the sale price was less than your basis — you cannot deduct the loss on a personal residence. Real estate losses are not deductible. However, if you have other capital gains from stocks, bonds, or other investments in the same year, you can use the real estate loss to offset those gains.
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 owe no capital gains tax. However, you also cannot deduct the loss on your personal tax return. Losses on primary residences are not deductible. If you have other investment gains that year, you cannot use the home sale loss to offset them.
What if I owned the home with someone else?
If you owned it as joint tenants or tenants in common, each owner reports their share of the gain on their own tax return. If you are married and own it as tenants by the entirety or community property, the rules depend on your state and whether you file jointly. Consult a tax professional if you are unsure of your ownership structure.
Can I defer capital gains tax by buying another home?
No. There is no tax deferral for buying a new home with the proceeds. The only way to avoid or reduce capital gains tax is the primary residence exclusion (if you may have access to) or by having a loss. The myth that you must buy a more expensive home to avoid tax is false.
Do I report the sale in the year I close or the year I sign the contract?
You report it in the year you close and receive the money. The signing date does not matter for tax purposes. If you signed a contract in December 2023 but closed in January 2024, you report the sale on your 2024 return.
What if the buyer took out a mortgage — does that affect my capital gains tax?
No. The buyer's financing has no effect on your tax. You owe capital gains tax based on what you received, not on how the buyer paid for the property. Whether they paid cash, took out a mortgage, or used a combination does not change your gain or your tax bill.