Please ensure Javascript is enabled for purposes of website accessibility

This device is too small

If you're on a Galaxy Fold, consider unfolding your phone or viewing it in full screen to best optimize your experience.

Skip to main content

Taxes on Selling a House: What All Homeowners Should Know

Updated
The Ascent Staff
By: The Ascent Staff

Our Taxes Experts

Margo Winton Parodi
Check IconFact Checked Margo Winton Parodi
Many or all of the products here are from our partners that compensate us. It’s how we make money. But our editorial integrity ensures our experts’ opinions aren’t influenced by compensation. Terms may apply to offers listed on this page.

A capital gain occurs when you sell an asset for a net profit, relative to the amount you spent to acquire it. If you bought stock for $1,000 and sell it for $1,500, for example, you have a $500 capital gain.

However, selling a home is a different matter. There's a big capital gains tax exclusion that applies to many home sellers, and there are some special rules you need to know if you sell a primary home, vacation home, or investment property.

With that in mind, here's a quick guide to taxes on selling a house -- whether you'll have to pay taxes, how much they might be, when they're due, and some other important things to know about the potential tax implications before you sell your house.

Do you have to pay any taxes on selling a house?

So, you just put your house on the market, and offers are starting to roll in. And it looks like you're going to get significantly more than you paid for the house in the first place. You may be wondering if you'll owe the IRS any taxes after you sell.

The short answer is...maybe.

The IRS allows a loophole known as the home sale gain exclusion, or primary residence exclusion. Essentially, this allows sellers who file joint tax returns to exclude as much as $500,000 in capital gains from taxation, or single filers to exclude as much as $250,000, upon the sale of a primary home.

To qualify, the home must have been your primary residence for at least two of the preceding five years, and you must have owned the home for at least two of the preceding five years (although the ownership and residence requirements don't necessarily have to happen in the same two years). And, you can't have claimed the exclusion on another home within the two-year period before the sale.

Here's what this means. Let's say that you and your spouse bought your house 10 years ago for $300,000. You won't need to pay a penny in capital gains tax unless your net proceeds from the sale are higher than $800,000.

Cost basis and net sale price

It's not quite as simple as taking the home's sale price and subtracting your purchase price to figure out the gain. Your capital gain is the difference between your cost basis and net proceeds, so it's important to take a moment to define the terms:

  • Cost basis: The amount you paid to acquire an asset, including any acquisition costs or capital improvements. For example, if you paid $200,000 for your house and $5,000 in origination fees and other expenses, your cost basis is $205,000. You can also include value-adding improvements in your cost basis, even if they occurred years after you bought the home. This might include major renovations, appliance upgrades, additions, and more.
  • Net proceeds: The amount you sold your house for, after accounting for selling-related expenses like real estate commissions. If you sell your house for $400,000 but pay $25,000 in commissions and closing costs, your net proceeds are $375,000.

There are thorough lists of expenses that you can and cannot include in your cost basis in IRS Publication 523: Selling Your Home.

To be clear, this works in your benefit. For example, let's say that you paid $200,000 for your house and sold it for $300,000 a few years later. Sounds like a $100,000 gain. However, if you paid $5,000 in origination fees when you bought and another $20,000 in selling expenses, your capital gain is reduced to $75,000.

How much is capital gains tax?

If you sell your home for a net gain of more than $500,000 (couples filing jointly) or $250,000 (singles), the gain in excess of the threshold is subject to capital gains tax. For example, if you and your spouse bought your house for a cost basis of $200,000 and sold it for net proceeds of $1,000,000 many years later, that would be an $800,000 capital gain. Assuming you meet the requirements for the exclusion I mentioned earlier, $500,000 of this would be tax free and the other $300,000 would be a taxable capital gain.

Capital gains tax depends on your income and how long you owned your home. The IRS classifies capital gains into two broad categories:

  • Short-term capital gains occur when you've owned an asset for a year or less.
  • Long-term capital gains occur when you've owned the asset for longer than one year.

As you can probably imagine, most home sales fall into the latter category.

If your home sale produces a short-term capital gain, it is taxable as ordinary income, at whatever your marginal tax bracket is. On the other hand, long-term capital gains receive favorable tax treatment.

Long-term gains are taxed at rates of 0%, 15%, or 20%, depending on your overall taxable income. The current short- and long-term capital gains tax brackets are available at the link below.

LEARN MORE: Capital Gains Tax Rates

An example of calculating capital gains tax on a home sale

Here's an example. Let's say that you just sold your house, which you owned for 20 years, for $1,000,000 in net proceeds, and you have a $200,000 cost basis, just like in the example in the previous section. This gives you a $300,000 taxable capital gain. We'll say that you are married and file a joint tax return, and that your taxable income is $100,000 in 2020.

Based on the capital gains tax brackets, this gives you a 15% long-term capital gains tax rate. Applying this to the $300,000 taxable portion of your gain shows that you can expect $45,000 in capital gains tax from the sale.

As a final note for this section, it's worth mentioning that this just refers to federal capital gains tax. Depending on your situation, you might have to pay state and local taxes as well if you sell your home for a profit.

When is tax on selling a house due?

The short answer is that any capital gains taxes you owe on the sale of your home are due at the tax deadline for the year in which the sale closes. So, if you sold the home in 2022, your taxes are due on April 18, 2023.

However, there are some circumstances where you may be required to make estimated tax payments, so be sure to read the IRS's guidance on the issue. Even if you aren't required, it could be a smart idea to send your estimated capital gains tax to the IRS as soon as the sale closes -- after all, do you really want to have to write a big check when tax time rolls around?

Alternatively, you could choose to increase your withholdings throughout the year instead of sending the IRS a lump sum. For example, if your home sale closes in March and you estimate that you'll owe $10,000 in capital gains tax as a result of the sale, you could decide to increase your paycheck tax withholdings by $1,000 per month for the rest of the year to cover the bill.

This could be a good idea if you need all of the proceeds from your home sale -- say, to use as a down payment on your next home. However, this is a very simplified example, and I strongly suggest speaking to a tax professional if you're unsure about when and how to pay your capital gains tax.

Taxes on the sale of an investment property or vacation home

If you sell an investment property or vacation home, you generally won't qualify for the home sale gain exclusion. The only possible exception is if you lived in the property for at least two of the previous five years. Otherwise, any net gain would be taxable.

Also, if you depreciated the property during your ownership period, you'll have to pay depreciation recapture tax on it as part of the sale. Without getting too deep into a discussion on depreciation, the basic idea is that investment property owners can deduct the cost of the property itself over time in order to reduce their taxable rental income. The caveat is that once the property is sold, the IRS effectively taxes this benefit back through a tax known as depreciation recapture.

Depreciation recapture is taxed at a rate of up to 25% of your cumulative depreciation deductions. In other words, if you've claimed $100,000 worth of depreciation on an investment property over the years, you can expect to pay depreciation recapture tax of up to $25,000 upon the sale.

It's important to note that even if your investment property or vacation home does qualify to exclude some or all of the capital gains, depreciation recapture can never be excluded from taxation, unless you use a 1031 exchange to defer it to a later date (more on that in the next section).

How to avoid capital gains tax on selling a house

Aside from the home sale gain exclusion, there are a few other ways you could potentially avoid capital gains on the sale of a home.

1031 exchange

If you are selling an investment property, you can avoid a big capital gains tax bill by completing a 1031 exchange. This strategy involves selling one investment property and using the proceeds to buy another. What happens is that your original cost basis will simply transfer into the new property, and your capital gains tax liability will be deferred until you eventually sell it. Once you're ready to sell that property, you're free to complete yet another exchange, effectively deferring capital gains tax liability indefinitely.

Tax-loss harvesting

One of the most effective ways to avoid capital gains tax is to have losses that offset it. One popular strategy is known as tax-loss harvesting, which means selling poorly performing assets at a loss in order to offset capital gains taxes. For example, let's say that you have a $50,000 taxable capital gain on the sale of your home. We'll also say that you bought a mutual fund a few years ago, and it's now worth $20,000 less than you paid for it. By cutting your losses and selling that mutual fund, you can use the $20,000 capital loss to reduce your $50,000 taxable capital gain to just $30,000.

Don't sell (ever)

Obviously, this doesn't make sense in all circumstances. Most people who are moving to a new home need to sell their old one to make it work financially. Having said that, it's worth mentioning that one of the most effective ways to avoid capital gains on any type of asset is to hold on to it for your entire life. Upon your death, your heirs will inherit the asset and receive a step-up in basis.

This essentially means that their cost basis will be reset to the asset's value at the date of your death, thereby avoiding any capital gains taxes you would have paid if you sold during your lifetime. If you're a particularly wealthy individual, your heirs still may face estate taxes, but this can be a great strategy for avoiding capital gains tax in perpetuity.

When in doubt, ask the experts

As a final point, it's worth emphasizing (if it weren't obvious already) that capital gains taxes can be a rather complicated subject and there is quite a bit of gray area. Maybe you aren't sure if your vacation home counts as an investment property for 1031 exchange purposes. Or maybe you and your spouse file joint tax returns now, but you weren't yet married at the time you bought your primary residence, and you aren't sure if you qualify to exclude $250,000 or $500,000.

Of course, these are just two examples of possible areas of confusion, but the point is that if you run into anything you aren't 100% certain about, it's important to consult an experienced, qualified tax professional. The IRS tends to take a closer look at high-dollar tax breaks, and few personal tax breaks are more potentially lucrative than the $500,000 home sale tax exclusion or the ability to defer any amount of capital gains through a 1031 exchange, so it's very important to be sure you're following the rules.

Our Taxes Experts