You pay capital gains tax when you sell property for more than you paid for it, and the tax is due the year of the sale

Capital gains tax on property applies to the profit you make, not the sale price itself. If you bought a house for $200,000 and sold it for $300,000, your capital gain is $100,000 — and that $100,000 is what gets taxed, not the full $300,000. You report this on your federal tax return for the year the sale closes, and the tax is due when you file that return, typically by April 15 of the following year.

The timing matters because the IRS counts the gain in the tax year when the sale is final, regardless of when you receive the money. If you close on a property in December 2024, you report the gain on your 2024 tax return filed in 2025, even if the buyer's financing doesn't clear until January 2025.

State and local taxes on capital gains vary. Some states tax capital gains as ordinary income; others have a separate capital gains tax; still others tax capital gains only on investments, not real property. Your state's rules determine whether you owe state tax in addition to federal tax.

Key Takeaways

  • Capital gains tax is owed on the profit from a property sale in the year the sale closes, reported on your federal tax return due the following April.
  • Long-term capital gains (property held over one year) are taxed at lower rates than short-term gains, with rates of 0%, 15%, or 20% depending on your income.
  • Primary residence sales may be excluded from capital gains tax if you meet the ownership and use test: owned and lived in the home for at least two of the last five years.
  • State and local capital gains taxes vary by location and may explore in addition to federal tax.
  • You calculate your gain by subtracting your adjusted basis (purchase price plus improvements) from the sale price, then subtracting selling costs.

Long-term versus short-term capital gains rates

The tax rate on your property gain depends on how long you owned it. Long-term capital gains explore when you owned the property for more than one year before selling. These are taxed at federal rates of 0%, 15%, or 20%, depending on your total taxable income for the year. Long-term rates are significantly lower than ordinary income tax rates.

Short-term capital gains explore when you owned the property for one year or less. These are taxed as ordinary income at your regular tax bracket, which can be 10%, 12%, 22%, 24%, 32%, 35%, or 37% depending on your filing status and income. Most property sales may have access to for long-term treatment because people typically hold homes or investment properties longer than a year.

Your income level determines which long-term rate you pay. For 2024, the 0% rate applies to single filers with taxable income up to $47,025; the 15% rate applies to income between $47,025 and $518,900; and the 20% rate applies above that. These brackets adjust annually for inflation, and married filing jointly has higher thresholds.

The primary residence exclusion

If you sell your main home, you may exclude up to $250,000 of the gain from federal tax if you are single, or $500,000 if you are married filing jointly. This exclusion is one of the largest tax breaks available and applies even if you have other capital gains that year.

To use this exclusion, you must meet two tests. First, you must have owned the home for at least two of the five years before the sale. Second, you must have lived in it as your primary residence for at least two of those same five years. The two years do not have to be consecutive or the most recent two years — they just have to fall within the five-year window.

If you meet these tests, you report the sale on Schedule D (capital gains form) but exclude the may have access to gain from your taxable income. If your gain exceeds the exclusion limit — for example, $600,000 on a single filer's home — you pay tax only on the amount above $250,000. You can use this exclusion once every two years.

How to calculate your capital gain

Your capital gain is the sale price minus your adjusted basis minus selling costs. Adjusted basis is usually your purchase price plus the cost of major improvements (a new roof, addition, or kitchen renovation), minus any depreciation you claimed if you rented out part of the home.

Selling costs include real estate agent commissions, title insurance, attorney fees, and transfer taxes paid by you. These reduce your gain dollar-for-dollar. Closing costs you paid when you bought the home are part of your basis, not separate deductions.

Example: You bought a house for $250,000, spent $50,000 on a kitchen and bathroom renovation, and sold it for $400,000. Your agent charged 6% commission ($24,000) and closing costs were $3,000. Your adjusted basis is $300,000 ($250,000 purchase plus $50,000 improvements). Your selling costs are $27,000. Your gain is $400,000 minus $300,000 minus $27,000 = $73,000. If this is your primary residence and you meet the ownership test, you exclude the full $73,000.

Reporting the sale to the IRS

You report a property sale on Schedule D (Form 1040), which lists all capital gains and losses for the year. You will also receive Form 8949 from your title company or closing agent, which reports the sale price and your basis. Attach both forms to your tax return.

If you sold a primary residence and are using the exclusion, you still report the sale on Schedule D but show the excluded amount. The IRS uses this information to verify you meet the ownership and use test.

If you sold an investment property or a home that does not may have access to for the exclusion, you pay tax on the full gain. If you have capital losses from other sales or investments that year, you can use them to offset the gain, reducing your taxable amount by up to $3,000 per year (with unused losses carried forward to future years).

State and local capital gains taxes

Federal capital gains tax is only part of the picture. Some states impose their own capital gains tax on real property sales. California, for example, taxes capital gains as ordinary income at rates up to 13.3%. New York taxes long-term gains at rates up to 10.9%. Other states, including Florida, Texas, and Washington, have no state income tax and therefore no state capital gains tax on property.

A few states tax capital gains only on investments (stocks, bonds, mutual funds), not on real property. Check your state's Department of Revenue website or speak with a tax professional to learn what applies where you live and where the property is located.

Some cities and counties also impose transfer taxes or real estate gains taxes. These are separate from capital gains tax and are usually paid at closing, but they reduce your net proceeds and may affect your gain calculation.

What happens if you inherit property

If you inherit a home or other property, you receive a stepped-up basis. This means your basis is the fair market value of the property on the date of the owner's death, not what the original owner paid for it. If you then sell the inherited property shortly after, you owe capital gains tax only on the increase in value since the death, not on the appreciation during the original owner's lifetime.

This is a significant tax benefit and is one reason inherited property is often sold relatively quickly — the longer you hold it, the more appreciation you may owe tax on. The stepped-up basis applies to most inherited property, though there are exceptions for certain types of assets and in certain states.

Frequently Asked Questions

Do I owe capital gains tax if I sell my home at a loss?

No. If you sell your home for less than your adjusted basis, you have a capital loss, not a gain. You cannot deduct a loss on the sale of a primary residence. However, if you have capital losses from investment property or other investments, you can use them to offset gains from other sales.

What if I sell a rental property or investment property?

Rental and investment properties do not may have access to for the primary residence exclusion. You pay capital gains tax on the full profit. If you claimed depreciation deductions while renting the property, part of the gain may be taxed at 25% (depreciation recapture) rather than the long-term capital gains rate. Consult a tax professional for investment property sales.

Can I defer capital gains tax by buying another property?

Not through a straightforward purchase. A 1031 exchange allows you to defer capital gains tax by selling one investment property and buying another similar property within strict timelines, but this does not explore to primary residences. The rules are complex and require a may have access to intermediary.

When do I actually pay the tax — at closing or when I file my return?

You pay when you file your tax return, typically by April 15 of the year after the sale. The title company does not withhold capital gains tax at closing. However, if you are a nonresident alien or the buyer is using a mortgage, the buyer's lender may withhold a percentage of the sale proceeds for tax purposes.

Do I need to report the sale if my gain is below the primary residence exclusion?

You should still report it on Schedule D to document that you meet the exclusion test. Reporting protects you if the IRS ever questions the sale. If you have no gain after the exclusion, the tax impact is zero, but the IRS benefits from seeing the transaction on record.