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 2020, your taxes are due on April 15, 2021.
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 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 $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.
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.
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.