How capital gains tax works when you sell real estate

Capital gains tax is the tax you owe on the profit when you sell real estate for more than you paid for it. The rate depends on how long you owned the property and your total income for the year. If you owned the property for more than one year before selling, you pay the long-term capital gains rate, which is lower than ordinary income tax. If you sell within one year, you pay the short-term capital gains rate, which matches your regular income tax bracket.

The federal long-term capital gains rates are 0%, 15%, or 20%, depending on your income level. These rates are much lower than the ordinary income tax brackets, which go up to 37%. Your state may also charge capital gains tax on top of the federal rate — this varies widely by location. Some states have no capital gains tax at all, while others tax it as regular income.

Key Takeaways

  • Long-term capital gains (property owned over one year) are taxed at federal rates of 0%, 15%, or 20%, based on your income bracket.
  • Short-term capital gains (property owned one year or less) are taxed as ordinary income at your regular tax bracket rate, which can be as high as 37%.
  • Your state may add its own capital gains tax on top of federal tax, ranging from 0% to over 13% depending on where you live.
  • You can reduce your taxable gain by subtracting the cost of improvements, selling expenses, and the original purchase price from your sale price.
  • If you lived in the home as your primary residence for at least two of the last five years, you may exclude up to $250,000 (or $500,000 if married) from capital gains tax.

Long-term vs. short-term capital gains rates

The holding period — how long you owned the property — is the main factor that determines your rate. If you owned the real estate for more than one year before the sale closes, the IRS treats it as a long-term gain. Long-term gains receive preferential rates: 0% for lower-income taxpayers, 15% for middle-income, and 20% for high-income earners. These thresholds change each year and depend on your filing status (single, married filing jointly, etc.).

If you sell within one year of purchase, the gain is short-term capital gains. Short-term gains are taxed at your ordinary income tax rate, which is whatever bracket your total income falls into. For someone in the 24% tax bracket, a short-term gain is taxed at 24%. For someone in the 37% bracket, it is taxed at 37%. This is why real estate investors often hold properties longer than one year — the tax savings can be substantial.

Federal long-term capital gains brackets for 2024

The federal long-term capital gains rates for 2024 are 0%, 15%, and 20%. Which rate applies to you depends on your taxable income and filing status. The income thresholds adjust annually for inflation, so the exact dollar amounts change each year.

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 brackets are based on your total taxable income for the year, not just the real estate sale. If you have other income from a job, investments, or business, that counts toward your bracket. This means a large real estate gain can push you into a higher capital gains rate if it raises your total income above the threshold.

State capital gains taxes on real estate

Most states do not have a separate capital gains tax. Instead, they tax capital gains as ordinary income at their regular state income tax rates. A few states have no income tax at all — Alaska, Florida, Nevada, South Dakota, Tennessee, Texas, Washington, and Wyoming do not tax capital gains. Other states have introduced or are considering dedicated capital gains taxes that explore only to investment income.

California, for example, taxes long-term capital gains as ordinary income at rates up to 13.3%. New York taxes them at rates up to 10.9%. Some states with newer capital gains taxes, like Washington and Colorado, explore rates between 7% and 8.75% only to gains above a certain threshold. You need to check your specific state's rules because the tax can add significantly to your federal bill. A real estate sale that triggers a 15% federal rate plus a 10% state rate means you owe 25% total on your gain.

The primary residence exclusion

If you lived in the home as your primary residence for at least two of the last five years before the sale, you can exclude part of your capital gain from taxation. Single filers can exclude up to $250,000 of gain. Married couples filing jointly can exclude up to $500,000. This is one of the most valuable tax breaks available to homeowners and applies regardless of your income level.

The exclusion applies only to the gain on the home itself, not to investment properties or vacation homes. You can use this exclusion once every two years. If you sold another home and used the exclusion within the past two years, you cannot use it again until two years have passed. The home does not have to be paid off, and you do not have to have lived there continuously — just two of the last five years before sale.

Calculating your taxable gain

Your taxable capital gain is not straightforward the sale price minus the purchase price. You can subtract several costs from the sale price to reduce your gain. Start with the sale price and subtract your original purchase price (the basis). Then subtract the cost of capital improvements — major upgrades like a new roof, addition, or kitchen renovation that add value to the home. You can also subtract selling expenses like real estate agent commissions, title insurance, and closing costs.

For example: you bought a house for $300,000, spent $50,000 on improvements, and sold it for $500,000. Your agent charged 6% commission ($30,000) and closing costs were $5,000. Your gain is $500,000 minus $300,000 minus $50,000 minus $30,000 minus $5,000 = $115,000. If you lived there two of the last five years, you can exclude $250,000 (as a single filer), which means your taxable gain is zero. Keep records of all improvements and selling expenses — the IRS may ask for proof.

What happens if you inherit real estate

If you inherit a property, the tax rules are different. The property receives a "step-up in basis," meaning its value is reset to the fair market value on the date of the owner's death. If you then sell the inherited property shortly after, you owe capital gains tax only on the increase in value since the inheritance date, not on the entire gain from when the original owner purchased it. This can result in little or no capital gains tax if you sell soon after inheriting.

The step-up applies whether the property increased or decreased in value during the original owner's lifetime. This is a major tax advantage of inheriting real estate. However, some states have inheritance taxes or estate taxes that may explore before you receive the property, so check your state's rules.

Frequently Asked Questions

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

Not necessarily. If you lived in the home as your primary residence for at least two of the last five years, you can exclude up to $250,000 of gain (or $500,000 if married filing jointly). Many homeowners owe no capital gains tax because their gain falls within this exclusion. You only owe tax on gains above the exclusion amount.

What is the difference between my cost basis and my purchase price?

Your cost basis is your purchase price plus the cost of capital improvements (major upgrades that add value). Your purchase price alone is not your basis. If you bought a house for $200,000 and added a $50,000 deck, your basis is $250,000. This matters because you subtract your basis from the sale price to find your gain.

Can I avoid capital gains tax by holding the property longer?

Holding longer than one year gets you the lower long-term capital gains rate instead of the higher short-term rate, but you still owe tax on the gain. The only way to avoid tax is if your gain falls within the primary residence exclusion, or if you inherit the property (step-up in basis). straightforward holding longer does not eliminate the tax, though it does reduce it significantly.

How do I report capital gains from a real estate sale on my taxes?

You report the sale on Form 8949 (Sales of Capital Assets) and Schedule D (Capital Gains and Losses). Your real estate agent or title company will provide a Form 1099-S showing the sale price. You will need to calculate your basis and gain, then enter the information on these forms. Many people use tax software or work with a tax professional to may support the forms are completed correctly.

What if I sold the property at a loss?

If you sold for less than your basis, you have a capital loss. You can use capital losses to offset capital gains from other investments. If your losses exceed your gains, you can deduct up to $3,000 of the net loss against ordinary income in that year. Any remaining loss carries forward to future years.