Saving & Spending Taxes

Capital Gains Tax and Home Sales: Will You Have to Pay It?

Do you qualify for a capital gains tax exclusion on your home sale? Or will you be hit with a tax bill? Here’s what you need to know.

Capital Gains Tax and Home Sales
Updated May 13, 2024
Fact checked

We receive compensation from the products and services mentioned in this story, but the opinions are the author's own. Compensation may impact where offers appear. We have not included all available products or offers. Learn more about how we make money and our editorial policies.

Whenever you sell an investment asset for more than you bought it, you’ll likely be subject to a capital gains tax. This could even include capital gains tax on a home sale if the sales price of the home exceeded the purchase price. Whether a house is your main home or an investment property, this tax liability could apply to you.

However, there are certain exceptions to paying capital gains tax on a primary residence, as well as other rules all homeowners should know. Here’s a look at what you need to know about paying capital gains tax on the sale of your home.

In this article

What is capital gains tax?

As you learn how to manage your money, you’ll be introduced to the idea of investing, and how it can help you finances. Owning assets through investing could be a way to grow your wealth. However, an investment asset can increase or decrease in value. And when you sell a capital asset — like stocks, bonds, or a house — for more than you paid for it, that’s known as a capital gain.

Capital gains are usually divided into two categories:

  • Short-term capital gains tax: Gains on assets held for a year or less are considered short-term capital gains and treated as ordinary income, which is taxed at your marginal income tax rate.
  • Long-term capital gains tax: Gains on assets held for more than a year are considered long-term capital gains and usually taxed at a more favorable rate, which is often lower than the marginal tax rate.

When paying taxes on long-term capital gains, your rate is determined by your income and tax filing status. The higher your income, the higher your capital gains tax rate. Lower-earning taxpayers, however, may not have to pay any taxes on long-term capital gains. Here’s what you can expect to pay on long-term capital gains, based on your filing status and taxable income for the 2023 tax year:

Single Joint Head of household Married filing separately
0% $0 - $44,625 $0 - $89,250 $0 - $59,750 $0 - $44,625
15% $44,626 - $492,300 $89,251 - $553,850 $59,751 – $523,050 $44,626 - $492,300
20% $492,301 or more $553,851 or more $523,051 or more $492,301 or more

And here are the long-term capital gains tax rates for the 2024 tax year:

Single Joint Head of household Married filing separately
0% $0 - $47,025 $0 - $94,050 $0 - $63,000 $0 - $47,025
15% $47,025 - $518,900 $94,050 - $583,750 $63,000 - $551,350 $47,025 - $291,850
20% $518,900 or more $583,750 or more $551,350 or more $291,850 or more

It’s worth noting that there are other categories of assets that have different top rates for capital gains. This includes selling small business stock, collectibles, and certain other property. Double-check your asset class before you begin the process of figuring out how much you owe in capital gains tax.

You can also make it a little easier to figure out your situation by using some of the best tax software available or by consulting with a tax professional.

Capital gains tax on a primary residence

When you buy a home, it’s considered an asset, and it is likely to appreciate in value. Because of this, technically, you’re supposed to pay capital gains on your home sale. However, you can exclude a portion of the gain if it’s your principal residence.

You’re allowed an exemption of up to $250,000 of the gain if you’re filing single and up to $500,000 if you’re married and file a joint return with your spouse. It’s important to note that you still need to report the sale on your taxes. After you report the sale, any exclusion will be figured and you won’t have to pay the capital gain tax if you qualify.

There are three main requirements and use tests you have to meet to receive the exclusion on your taxes:

  • Ownership: You must have owned the home for at least two years out of the five-year period leading up to the date of sale. For married couples, only one of the partners needs to meet the ownership requirement.
  • Residence: Likewise, you must also have lived in the home for at least two years out of the preceding five. However, both partners in a marriage must meet this test in order to qualify. The residence doesn’t have to be consecutive, as long as you were living in the house for at least 24 months (730 days) total during the five years leading up to the sale date.
  • Look-back: You can’t have already claimed the capital gains tax home sale exclusion in the two years previous to the date of your sale. So if you sold another home and took the exclusion, you can’t do it again so quickly.

There are also other ways to avoid the capital gains tax on your home sale, including major life events that force a sale, such as divorce or separation, the death of your spouse, or the home being destroyed or condemned. You may also receive leniency on the two-year period of living in the home if you were a service member on qualified official duty.

Before claiming the exclusion, carefully review the eligibility requirements from the IRS, and consider consulting with a tax professional to ensure that you file the paperwork properly.

As you’re figuring the capital gains, you can use money you’ve put into the property to reduce the amount of the actual gain. If you paid marketing and closing costs on the sale of the home, these can also be used to offset the amount of the gain you report on your taxes.

Additionally, home improvements that increase the value of the home or prolong its use can offset the gains. For example, if you decide to upgrade your home’s kitchen, it might cost you $25,000. When you sell the home, maybe you see a gain of $275,000. You can subtract that $25,000 in capital improvements from the gain for a net of $250,000, bringing you back down to the exception threshold if you’re a single filer.

Capital gains tax on rental property

Things are a little different when the property is a rental. First, if the space you’re renting out is inside the living area of the home, as in renting out a room, it can be included in the exclusion. For example, maybe you live in your home as a primary residence, and you are renting out a room to help you cover your mortgage payment. As long as the room is part of your main house, it can be used as part of the capital gains tax exclusion.

Next, you have to look at past use of the property for rental purposes. If you haven’t earned rental income from the space in the year you sell the home, and if you’ve used a former rental as a residence for two of the past five years, you can still apply the exclusion and avoid paying capital gains tax.

On the other hand, perhaps the rental property was part of your real estate investing effort. If you sell a rental property, you’ll need to go through the process of documenting how much of a gain you actually ended up with. As with other businesses, you can use the money you put into home improvements to reduce the amount of the gain.

In some cases, you might have claimed depreciation in tax years to reduce your rental property business income. If this is the case, you might need to recapture that depreciation, which means it needs to be included in your regular income.

The IRS provides worksheets that can help you work through the process and figure out how much capital gains tax on real estate you owe on a rental property. Also note that, as with other capital gains, if you fall into a low enough federal tax bracket, your liability for the gains will be 0%. It can get somewhat complicated, so it can be a good idea to get a tax professional such as a CPA to help you.

Capital gains tax on inherited property

What if the property you’re selling was inherited? One of the things you need to figure out is the cost basis of the home. Before figuring capital gains — and the subsequent taxes — you need to know the base value and how much the asset has appreciated.

With inherited property, the basis is determined by the fair market value of the property at the time the owner died rather than the original purchase price. This can be determined by the value of the property as listed on the federal estate tax return, or by the appraisal used for state inheritance taxes.

Surviving spouses must re-figure their basis in the home based on the date of death. In most cases, except in community property states, the basis is figured on one-half ownership. Later, when you sell the home, you’ll base your capital gain on the adjusted basis.

Once you know the gain, you can then figure out whether you owe capital gains tax on the inherited property based on the difference between the cost basis and the selling price. If you’ve lived in the home and meet the exclusion requirements, you might be able to avoid paying the tax.

How to avoid capital gains tax on your home sale

If you want to reduce the chance that you’ll owe capital gains tax on your home sale, there are a few things you can do:

  • Live in the house for two years. If the home has been your principal residence for at least two of the past five years before the sale date, you might qualify for the exclusion of up to $250,000 (single) or $500,000 (married) in gains.
  • Own the home for at least two years. Likewise, if you’ve owned the home (meaning you’re not flipping houses) for at least two out of the past five years, you could qualify for the exclusion.
  • Keep receipts for improvements. Keep records of what you’ve paid to make improvements on the property. This can be used to create a tax break by reducing the amount of the total gain.
  • Track your marketing and closing costs. You can also reduce the amount of your gain by subtracting what you spent on marketing closing costs as you put the home up for sale.
  • Time your rental property sale for a year you have low income. Because the capital gains tax is 0% for some income brackets, it can make sense to hold off on the sale until you meet the threshold for paying no capital gains tax.
  • Use tax-loss harvesting. It’s possible to use capital losses to offset capital gains. If you have some investments in your portfolio that have taken a hit and lost, and you’d like to sell and move your money, you could potentially use those losses to reduce your gains to the point where they’re canceled out.
  • Use a 1031 exchange on your rental property. If you plan to buy another income-generating property, you could use the proceeds from your sale to make the purchase. When you do that, you defer the need to pay the capital gains tax on the rental property — and may even avoid it — because you’re putting the proceeds to use. There are time limits involved, so make sure you put the money to work quickly.

FAQs

How much are capital gains taxes on the sale of a house?

When you sell a home, you generally have to pay capital gains. Your capital gains tax rate is based on your income. Long-term capital gains (on assets held longer than a year) are taxed at a favorable rate, which is usually lower than your regular, or marginal, tax rate. When selling your home, though, you might qualify to exclude a portion of your capital gains, effectively bring your bill to $0.

At what age can you sell your home and not pay capital gains?

In the past, a law excluded people 55 and older from paying the capital gains tax on a home sale. That law allowing tax-free home sales no longer applies. Anyone who sees a gain on their home needs to pay the capital gains tax.

How does the IRS know if you sold your home?

When you complete a home sale, the real estate agent that settles the sale is required to file a Form 1099-S with the IRS and send you a copy. Because the IRS receives a copy of the 1099-S, it is aware that you’ve completed a real estate transaction.

Do you have to report the sale of inherited property?

Yes, when you sell a property that you inherited, you’re expected to report that when you file your taxes. The IRS offers worksheets that can help you figure how much capital gains tax you pay on an inherited property or if you don’t owe anything.


Bottom line

When you sell a home, you’re receiving a large chunk of capital. If that capital represents a situation in which you sold the home for more than you paid, it’s considered a taxable gain and you’re expected to pay capital gains tax on the increase.

However, you don’t necessarily end up being liable for taxes on the entire amount of the appreciation. You can exclude some of the gains from selling a primary residence, and the capital gains tax is 0% for some tax brackets. Consult a tax professional if you have questions about reducing your capital gains tax liability and improving your tax planning ability when it comes to your personal finances.

Easy Tax Relief Benefits

  • Eliminate your tax debt
  • Potentially reduce the amount you owe
  • Stop wage garnishments and bank levies
  • Communicates with the IRS on your behalf