Will I Have to Pay Taxes on My Real Estate Sale?

If you sell real estate, here’s a quick guide to what you should expect at tax time.

Signed Contract and Ownership Keys Being Handed Over

Click to enlarge

Getty Images

Taxes on real estate sales can be difficult to understand. The amount of tax you owe on a profitable real estate sale depends on whether the property was used as your primary home, if you rented it out, how long you owned it for, and other factors.

With that in mind, here’s a beginners’ guide to how real estate sales are taxed and how to apply these rules to your real estate sale.

Did you sell your primary residence?

When it comes to taxes on the sale of real estate, the IRS groups sales into two main baskets: The sale of your primary home and everything else. Specifically, the profitable sale of your primary residence gets a nice tax break that other types of real estate sales don’t.

Before we get into that, it’s important to go over the IRS’s definition of a primary residence. To qualify, the home you sell must meet two qualifications, although not necessarily at the same time:

  • You must have owned the home for at least two of the five years before the sale.
  • You must have used the home as your main home for at least two of the five years before the sale.

Did you sell your primary residence?

When it comes to taxes on the sale of real estate, the IRS groups sales into two main baskets: The sale of your primary home and everything else. Specifically, the profitable sale of your primary residence gets a nice tax break that other types of real estate sales don’t.

Before we get into that, it’s important to go over the IRS’s definition of a primary residence. To qualify, the home you sell must meet two qualifications, although not necessarily at the same time:

  • You must have owned the home for at least two of the five years before the sale.
  • You must have used the home as your main home for at least two of the five years before the sale.
Single Family Home With Sold Sign Out Front

Click to enlarge

Getty Images

The primary residence exclusion

If your sale qualifies as a primary residence, you’re in luck. As much as $250,000 in capital gains on the sale of your home ($500,000 for a married couple) can be excluded from taxation. This is known as the primary residence exclusion.

As a simplified example, let’s say you’re single and buy a house for $300,000 and live in it full-time for the next three years. The house meets the IRS definition of a primary residence. We’ll say that after three years, you sell the property for $400,000, a profit of $100,000.

Because this is well under the $250,000 maximum that's excludable upon the sale of a primary home, you won’t have to pay a penny of tax on the sale.

Taxes are straightforward when it comes to the sale of a personal home. If your profit is within the applicable exclusion amount, you don’t have to pay taxes. If it's greater than the exclusion amount, you’ll pay capital gains tax on the difference. Since a primary residence has at least a two-year holding period, all taxable profits on a private home sale will be taxed as long-term capital gains.

Sales of secondary and vacation homes

One other case you may need to know is the sale of a second home or vacation home. Assuming you didn’t rent the home out more than a couple weeks a year and that you didn’t treat it as an investment property for tax purposes, here’s what you need to know:

  • Any net profit on the sale of a second or vacation home is taxable as capital gains.
  • If you owned the home for more than a year, the profit will be treated as a long-term capital gain, which is taxed at a favorable rate.
  • If you owned the home for less than a year, the profit will be treated as a short-term gain, which is taxable as ordinary income.

Know your cost basis

Before we go any further, it’s important to introduce the concept of cost basis. (A tax break can’t possibly be as simple as subtracting the purchase price from the sale price, could it?)

In a nutshell, your cost basis is your all-in cost of acquiring an asset. With real estate, this includes the purchase price and the costs you incur when you buy the property, such as legal expenses and certain other closing costs. It also includes value-adding expenses you incur while owning the property -- the adjusted cost basis. For example, if you spend $50,000 on an extensive kitchen and bathroom renovation, this could be added to your cost basis.

Let’s say that you and your spouse bought your primary residence in 1990 for $200,000. You’ve spent $100,000 on value-adding improvements over the years and had $10,000 in legal costs and other acquisition expenses. This gives you a total cost basis of $310,000.

If you now sell the property for $800,000, this is $490,000 more than your cost basis, which is within the $500,000 primary residence exclusion for married couples. Even though you sold your home for $600,000 more than the purchase price, your cost basis is the number that matters when it comes to determining profitability.

Investment properties: Two taxes to consider

Taxes are more complicated when you sell an investment property. There are two main taxes to worry about. If you sell your property at a profit relative to your cost basis, you may have to pay capital gains tax. And if you held your property long enough that you used a depreciation deduction on your tax returns, you may have to pay depreciation recapture tax.

Capital gains tax on a profitable sale

First, let’s look at capital gains. With investment properties, there's no excluded amount like there is with a primary home. If you sell an investment property and the net sale price is greater than your cost basis, all of your profit is subject to capital gains tax.

The only possible distinction is whether your gain is considered long-term or short-term, which makes a big difference for tax purposes.

A long-term gain occurs when you held the property for over a year. If you did, it's taxable at lower rates than ordinary income -- 0%, 15%, or 20%, depending on your income. Meanwhile, short-term gains made on a property you held for a year or less are taxed as ordinary income, meaning you’ll pay your marginal tax rate.

Depreciation recapture could be the bigger tax hit

One of the biggest advantages of real estate investing is depreciation. When you buy an investment property, you can deduct a certain amount of your cost basis every year until it’s all been deducted. For residential investment properties, the depreciation period is 27.5 years. Divide your cost basis by this factor to determine your annual depreciation deduction. Commercial properties have a 39-year depreciation period.

This allows investors to dramatically reduce their taxable rental income. Many profitable rental properties even show a loss for tax purposes.

The caveat is that once you sell the property, the IRS wants this benefit back. This is known as depreciation recapture. Any depreciation deduction you claim during the property’s holding period is considered ordinary income after you sell.

An example of an investment property sale

This may sound a bit complicated (and it is), so here’s a quick example of how it works.

Let’s say you buy a duplex for $300,000 and pay $15,000 in various acquisition expenses, making your cost basis $315,000. You hold the property for four full years and claim a total of $45,820 worth of depreciation expense over the holding period.

We’ll say that you’re in the 24% marginal tax bracket and that you pay 15% on long-term capital gains.

You sell the property for $350,000 (net of selling costs) at the end of the four years. This gives you a $35,000 capital gain on the sale, which are taxed at your 15% long-term capital gains rate, or $5,250. You’ll also pay your 24% tax rate on the $45,820 in depreciation recapture, which ads $10,997 to your tax bill.

In all, you’ll owe $16,247 to the IRS upon the sale of this property.

You could avoid taxes on your investment property sale -- at least for a while

As you can see, the tax bill on the sale of an investment property can be quite large. And our example was just for a four-year holding period and a mild profit. If you have a decade or more of depreciation and hundreds of thousands in capital gains, the tax bills on investment property sales can be huge.

Fortunately, there’s a way to avoid taxes on the sale of an investment property -- at least for a while. By using a 1031 exchange, you can defer both capital gains and depreciation recapture.

If you’re interested, we have an entire page dedicated to 1031 exchange information. The idea is that if you sell an investment property and reinvest the proceeds into a new property, you can essentially transfer the tax liability to the new property. There are several important rules and procedures to follow to be IRS-compliant, so learn the process well before attempting this.

Although it does involve considerable legwork on your part, a 1031 exchange can be well worth the time and effort, as it lets you effectively defer taxes indefinitely.

Consult an expert if you aren’t sure

There are some gray areas in the U.S. tax code, including taxes on the sale of real estate.

For example, maybe you aren’t sure whether a home that you own but no longer live in full time meets the definition of a primary home. Or maybe you don't know if a repair you made on a rental property should be expensed immediately or added to your cost basis.

I can't discuss every potential scenario in this article. Consult a tax attorney or reputable tax professional if you run into any issues. IRS officials keep a close eye on large tax breaks like personal residence exclusions and 1031 exchanges.

It’s certainly better to pay for some tax advice than risk an IRS audit.

The Motley Fool has a disclosure policy.
We do receive compensation from some partners whose offers appear here. Compensation may impact where offers appear on our site but our editorial opinions are in no way affected by compensation. Millionacres does not cover all offers on the market. Our commitment to you is complete honesty: we will never allow advertisers to influence our opinion of offers that appear on this site.