Key takeaways
- Capital gains tax applies only to the net profit from selling real estate, calculated by subtracting the original purchase price plus documented improvements and closing costs (the cost basis) from the net sale price.
- Homeowners who lived in a property for at least two of the last five years can exclude up to $250,000 in gains if single or $500,000 if married filing jointly, while properties owned for over one year are taxed at long-term rates of 15% or 20% depending on income.
- Investment properties do not qualify for the primary residence exclusion, may face a 25% depreciation recapture tax, and can defer capital gains only through strategies like a 1031 exchange or by timing and structuring the sale carefully.
It’s an exciting achievement to sell a home for more than you paid for it. The money earned from the sale can amount to a notable payday and propel your next purchase, but the capital gains tax can eat into your profits.
What is capital gains tax?
“A capital gain tax is a special tax on a capital asset, which are long lived assets like stocks, bonds, treasuries, arts and real estate,” says Robert Russo, managing partner at the New York City CPA firm, Russo CPA, P.C.
The tax is only charged on the net profit, which is the capital gain from the sale of rental property, your primary home or commercial investments.
How capital gains tax is calculated
Capital gains are calculated in two steps. First, you determine the property’s adjusted cost basis — generally the purchase price, plus certain acquisition costs and the cost of major improvements, minus any depreciation taken. Then, you subtract that figure from the net sale proceeds, which is the sale price minus commissions and other selling costs. The difference is the taxable capital gain.
For example, if your purchase price after closing costs was $250,000 and you made $50,000 in improvements while you owned it, your cost basis would be $300,000. If you sell it for $375,000 after closing costs and fees, the taxable profit would be $75,000.
The tax rate you are charged on the gain of the sale is impacted by the following factors:
- How long you owned the property
- If the property was used as a rental or primary residence
- Your taxable income
- Your filing status
Short-term vs. Long-term capital gains tax
“If it’s eligible for a capital gain, there are two types of capital gains,” said Russo. Short term capital gains tax rate is applied to property owned for one year or less. “The tax rate is the same as your ordinary tax rate, which can be anywhere from 10% to 37%,” Russo explained.
If it’s held longer than a year, “you are charged a long-term capital gains rate, which is only 15% or potentially 20% if your income is above a certain threshold, usually around $500,000,” he added.
Homeowners can often avoid paying capital gains tax altogether thanks to the capital gains tax exclusion outlined in Section 121, which can be called the primary residence exemption. However, the IRS has created other opportunities to reduce the tax burden if you don’t meet that exclusion.
Capital gains tax on primary residences
The primary residence exemption allows homeowners who have lived in the property for at least two of the last five years to exclude up to $250,000 in gains if single or filing separately, or up to $500,000 if married and filing jointly.
Any gains above those exclusions are subject to capital gains tax based on your current income tax rates.
You can use this exclusion once every two years. It applies within the last five years, provided that you have lived in the home for two consecutive years or a combined period that equals two years. If you’re in the Uniformed Services, the Foreign Service or intelligence services, the IRS extends this timeline to two out of 10 years.
Capital gains on rental properties
Vacation homes, rental properties and other real estate investments don’t have the same gains exclusion opportunities as a primary residence. They follow the same short-term or long-term capital gains tax rate guidelines outlined above, but also have depreciation to consider.
Depreciation is a legal write-off that helps reduce the tax burden while owning an investment property. It allows you to write off a percentage of the property value over a specified period to account for general wear and tear. The amount you can depreciate depends on the property type and is spread over 27.5 to 30 years.
When you sell a property, the entire depreciated amount is recaptured. There are special rules for taxing depreciation, depending on the type of property. In general, depreciation recapture is subject to a flat 25% tax.
Then, you are charged the capital gains tax rate on the remaining profit at a 0%, 15% or 20% rate, depending on your income.
Strategies to defer capital gains tax
Some common strategies used to limit capital gains taxes on stocks such as qualified small business stock exemptions or tax‑loss harvesting — don’t apply to real estate. For property owners, the options are more limited, and often more complex.
“A 1031 exchange is really the only way to defer gains on real estate investments,” said Russo.
1031 exchange
A 1031 exchange, also known as a like‑kind exchange, allows investors to defer capital gains taxes by rolling the proceeds from a sale into the purchase of a similar property of equal or greater value.
“It can be a way of saving money because you defer your gains, but it’s also a way to increase the size and quality of your portfolio by rolling those gains into a similar or better property,” said Russo.
However, 1031 exchanges come with strict rules, including the use of a qualified intermediary and tight timelines for identifying and closing on a replacement property. Because of their cost and complexity, they are most often used for higher‑value investment properties where the potential tax bill is significant.
Charitable contribution
Another option is donating real estate to a qualified charity. In this case, the owner does not receive sale proceeds but may be able to deduct the property’s fair market value, based on a certified appraisal. This strategy is typically used by high‑net‑worth individuals looking to reduce taxable income rather than generate cash.
Lastly, speak with a tax specialist who is familiar with capital gains strategies to make an informed and smart financial decision before selling.
Ways to minimize capital gains
The best way to minimize capital gains tax is to plan and time the sale strategically. Given the complex nature of capital gains taxes and tax law, it’s always a good idea to speak with a knowledgeable tax adviser before your real estate agent lists your home for sale.
A tax professional can help you understand your potential tax burden and recommend when (or how) you sell to reduce your capital gains tax.
They may advise strategies like a 1031 exchange or installment sale, where you sell the property by giving a loan to the buyer. This way, you are paid back over a longer period and reduce the profit that you receive in a given year.
If you own a vacation or rental property, you may also consider making it your primary residence for at least two years to qualify for the exclusion. While this won’t work for every investment property or individual, it can help you save big on your tax bill.
Try not to sell a property if you’ve owned it less than a year so it won’t be taxed as ordinary income. If you can, live in it for at least two years to take advantage of the exemption amount. This is the easiest way to reduce or eliminate your capital gain tax burden.
“If you own property for business, a rental or as your home, it’s extremely important you keep any renovation records,” said Russo.
Renovations can reduce your cost basis and help you pay less capital gain taxes. However, you need to prove the improvements were made to be able to claim the deduction and avoid any financial repercussions if you’re audited.
This story was updated April 16.