Capital gains tax on real estate is the federal tax you owe on the profit when you sell a property for more than you paid for it

When you sell a house, rental property, or land, the IRS taxes the difference between what you paid (your basis) and what you sold it for (your sale price). That difference is your capital gain. The tax rate depends on how long you owned the property and your total income for the year. Most homeowners owe nothing because the law lets you exclude up to $250,000 in gains if you're single, or $500,000 if you're married filing jointly — but only if you lived in the home as your primary residence for at least two of the last five years before the sale.

Rental properties and investment land do not get this exclusion. You pay tax on the full gain, at rates that range from 0% to 20% for federal tax, depending on your income bracket. Some states also charge state capital gains tax. The calculation starts the moment you close the sale, and you report it on your tax return for that year.

Key Takeaways

  • Capital gain is the profit you make — the sale price minus what you originally paid, plus the cost of major improvements you made to the property.
  • Primary residences can exclude up to $250,000 (single) or $500,000 (married) in gains if you lived there two of the last five years; rental properties have no exclusion.
  • The federal tax rate on capital gains is 0%, 15%, or 20% depending on your income, and some states add their own capital gains tax on top.
  • You report capital gains on Schedule D of your federal tax return in the year you sell, and you may owe estimated taxes before you file if the gain is large.

How your basis and improvements change what you owe

Your basis is what you paid for the property, including the purchase price, closing costs, and the cost of any major improvements you made — new roof, addition, new HVAC system, or foundation work. It does not include routine maintenance like painting or landscaping. When you sell, you subtract your basis from the sale price to find your gain.

Example: You bought a house for $300,000 (basis). You spent $50,000 on a kitchen renovation and $20,000 on a new roof. Your adjusted basis is now $370,000. You sell for $500,000. Your capital gain is $130,000 ($500,000 minus $370,000). If this is your primary residence and you meet the two-year rule, you owe nothing. If it is a rental property, you owe tax on the full $130,000.

Keep receipts and records for every improvement you make. The IRS may ask for proof if you claim a large basis. Improvements must add value to the property or extend its life — a new deck counts, but replacing a broken window does not.

The difference between long-term and short-term gains

If you own the property for more than one year before selling, your gain is long-term. Long-term gains get preferential tax rates: 0%, 15%, or 20% depending on your income. If you sell within one year of buying, your gain is short-term and taxed as ordinary income at your regular tax bracket — which can be as high as 37%.

For real estate, the one-year clock starts the day you take ownership. If you bought on March 15, 2023, you can sell on March 15, 2024, and may have access to for long-term rates. Selling one day earlier means short-term rates.

Most people who sell real estate hold it long enough to get long-term treatment. Short-term capital gains matter mainly if you buy and flip a property quickly, or if you inherit property and sell it soon after.

Primary residence exclusion: the $250,000 or $500,000 break

The IRS lets you exclude capital gains on your primary residence — the home where you actually live. Single filers can exclude up to $250,000 in gains. Married couples filing jointly can exclude up to $500,000. You pay no federal tax on gains within that limit.

To use this exclusion, you must have owned the home and lived in it as your main home for at least two of the five years before you sell. The two years do not have to be consecutive. If you owned it for three years and lived there for two of those three years, you may have access to. If you owned it for five years but lived there for only one year, you do not.

You can use this exclusion once every two years. If you sold a home and used the exclusion in 2022, you cannot use it again until 2024. If you are divorced or widowed, special rules may apply — check with a tax professional.

Capital gains tax rates and income brackets for 2024

Long-term capital gains are taxed at 0%, 15%, or 20% depending on your total taxable income for the year. These rates are lower than ordinary income rates. The brackets change each year and depend on your filing status.

Filing Status0% Rate15% Rate20% Rate
SingleUp to $47,025$47,025 to $518,900Over $518,900
Married Filing JointlyUp to $94,050$94,050 to $583,750Over $583,750
Head of HouseholdUp to $62,975$62,975 to $551,350Over $551,350

These are 2024 figures and will shift in 2025. Your capital gains are added to your other income to determine which bracket you fall into. If you have a large gain, it may push you into a higher bracket. A tax professional can model your situation before you sell.

State capital gains taxes and other costs

On top of federal tax, some states charge their own capital gains tax. As of 2024, only a handful of states have a dedicated capital gains tax: California, Connecticut, Illinois, Maryland, Minnesota, New Jersey, New York, Oregon, Vermont, and Washington. Most of these states tax capital gains at rates between 5% and 13.3%, though the rules vary widely.

Many other states tax capital gains as ordinary income through their regular income tax system. A few states have no income tax at all. Where you live when you sell matters. If you move to a no-income-tax state before selling, you may avoid state tax — but the IRS has rules about this, and some states tax gains on property located within their borders regardless of where you live.

You may also owe the Net Investment Income Tax (NIIT), a 3.8% federal tax on investment income if your modified adjusted gross income exceeds $200,000 (single) or $250,000 (married). Real estate gains can trigger this tax.

How to report capital gains on your tax return

You report capital gains on Schedule D (Capital Gains and Losses) when you file your federal tax return. You list the property, the date you bought it, the date you sold it, your basis, the sale price, and the gain or loss. You then transfer the total to Form 1040.

If you sold your primary residence and are using the exclusion, you still file Schedule D — you just report the gain as zero after applying the exclusion. If you had a loss (sold for less than your basis), you can use that loss to offset other capital gains, but you cannot deduct a loss on a personal residence.

If your gain is large, you may owe estimated taxes before you file your return. The IRS expects you to pay tax throughout the year, not just when you file. Talk to a tax professional or accountant before closing the sale if you think you will owe more than $1,000.

Frequently Asked Questions

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

No. You cannot deduct a loss on the sale of your primary residence. If you sell for less than you paid, you simply report zero gain on your tax return. The loss does not offset other income or capital gains.

What if I inherited the property — do I still owe capital gains tax?

Inherited property gets a "step-up in basis," meaning your basis becomes the property's fair market value on the date of death, not what the previous owner paid. If you sell soon after inheriting, you usually owe little or no capital gains tax. This is one of the largest tax breaks in the code.

Can I avoid capital gains tax by renting out my home instead of selling?

No. Once you convert your primary residence to a rental, you lose the primary residence exclusion. If you later sell, you will owe tax on the gain from the day you bought it. However, you can deduct rental expenses and depreciation while you own it, which may offset some of the gain.

What happens if I sell real estate as part of a business or investment partnership?

The rules are more complex. Gains from partnership interests or business real estate may be taxed differently, and you may owe self-employment tax in addition to capital gains tax. You need a tax professional to handle this.

Do I have to pay capital gains tax in the year I sell, or can I spread it over time?

You report the full gain in the year you sell. You cannot spread it over multiple years for tax purposes. However, if you structure the sale as an installment sale (buyer pays you over time), you can spread the gain across the years you receive payments. This is rare in real estate but possible.