Most home sellers don’t need to pay capital gains taxes. Thanks to the Taxpayer Relief Act of 1997, if you’ve owned and lived in your house for more than two years, the first $250,000 of the profit on your home sale is tax-free. If you’re married and filing jointly, you won’t pay capital gains on the first $500,000.
You have to meet certain requirements to be eligible for this tax exemption, though. And if you’re on the hook for capital gains taxes, the rate can be significant — up to 37% of the gains, depending on your filing status and how long you hold the house before selling it. If you’re facing a hefty capital gains tax burden, you’ll want to explore ways to legally avoid or reduce your taxes.
Real estate decisions are complicated. Our partners at Clever Real Estate can connect you with a local agent who will help you sort through your options as you start the selling process. And, when you sell with Clever, you’ll save thousands on commission.
The scoop: What are your options?
The strategies for curbing your capital gains liability depend on the nature of the house you’re selling. If you’re selling a primary residence (your main home), you may be eligible for Section 121 exclusion.
But if you’re selling a house as an investment property, a different method may be right for you:
|Section 121 exclusion||Selling a primary residence that you’ve owned and lived in for at least two years|
|Converting to a primary residence||Selling an investment property that you would be willing to live in|
|1031 exchange||Selling an investment property when you’re interested in buying another at the same time|
|Tax-loss harvesting||Selling an investment property when you hold another investment that has lost value|
|Monetized installment sale||Selling an investment property when no other options are a good fit|
We’ll dive into these strategies below. But first, it helps to understand what capital gains taxes are and how they apply to real estate.
What are capital gains taxes on real estate?
A capital gains tax is a tax on the gains you realized from the sale of an asset. The net profit on a home sale is considered a capital gain and can be taxed.
You are taxed on any profit if you sell your home within two years of buying it. If you hold the property for one year or less (for example, as a house flipper), you’re liable for short-term capital gains, which are taxed as ordinary income. You’ll pay the same federal rate on these gains as on wages and other earnings — ranging from 10–37%, depending on your household income.
If you sell after more than one year of ownership, your profits will be taxed as long-term capital gains, which have lower tax rates — ranging from 0–20%.
But here’s the good news. If you have owned and used your home for at least two years, you only pay those taxes on any profit over a certain amount — the $250,000 or $500,000 thresholds for individuals or married joint owners respectively, as mentioned above.
So, how much do I owe in capital gains taxes?
Use this capital gains tax calculator to get a rough idea of how much you’ll owe when selling your house:
Here’s an example. Say you bought your house for $250,000 and are selling it after five years for $350,000. First you need to figure out your adjusted cost basis:
Original cost + cost of improvements + cost of repairs = adjusted cost basis
Let’s say you spent $50,000 on improvements and repairs:
$250,000 (original cost) + $50,000 (improvements & repairs) = $300,000
So your adjusted cost basis is $300,000. Now plug that figure into the following formula to calculate your capital gains (or losses):
Sale price – (commissions, legal fees, and marketing fees paid during sale) – adjusted cost basis = capital gain or loss
In our example, the numbers could look like this:
$350,000 – $25,000 (commissions, etc.) – $300,000 = $25,000
So you’re left with a capital gain of $25,000 on this property.
Long-term capital gains tax rates in 2021
|Filing status||0% rate||15% rate||20% rate|
|Single||Up to $40,400||$40,401–445,850||Over $445,850|
|Married, filing separately||Up to $40,400||$40,401–250,800||Over $250,800|
|Married, filing jointly||Up to $80,800||$80,801–501,600||Over $501,600|
|Head of household||Up to $54,101||$54,101– 473,750||Over $473,750|
Now let’s discuss how home sellers can exclude all or part of these gains from taxation.
What is Section 121 exclusion?
Section 121 is a provision of the tax code that allows home sellers to exclude a certain amount of their gains from taxation. It applies if they’re selling a primary residence and meet other requirements.
In order to qualify for Section 121 exclusion, you must meet both the ownership test and the use test. This means that you must have owned the home for at least two of the past five years, and you must have lived in it as your main home for at least two of the past five years. (You don’t need to have lived in it and owned it at the same time.)
Assuming you meet the ownership and use tests, if you’re single, you don’t need to pay capital gains taxes on the first $250,000 of profit from the home sale. If you’re married and filing jointly, you’re exempt from taxes on the first $500,000.
How do I qualify for Section 121 exclusion?
First and most importantly, hold the property for at least two years! Section 121 exclusion only kicks in after two years of ownership.
Next, check whether your home sale qualifies for this exclusion. Again, Section 121 exclusion applies to the sale of your main home (primary residence) only.
Also note that Section 121 applies to many types of housing, including:
- Single-family home
- Mobile home
The IRS offers complete information about these and other eligibility rules in Publication 523.
According to the document, the exclusion does not apply if you’re transferring your home to a spouse or ex-spouse, because in that case the IRS considers there to be no capital gain or loss. (The exception would be if your spouse/ex-spouse is a nonresident alien, in which case you will likely have a capital gain or loss from the transfer.)
You should also know the home’s date of sale to qualify for Section 121 exclusion.
Next, you will determine how much of your gain is tax-exempt.
Can I get maximum exclusion of gain?
The eligibility test, as the IRS calls it, determines whether a home seller can get the maximum exclusion ($250,000 if you’re single or $500,000 if you’re married).
The eligibility test has six steps. Check the table below and see if these conditions apply to you.
If you don’t meet this test, you may qualify for partial exclusion, explained in more detail below the table.
|Step 1||Automatic disqualification||If you acquired the property through a 1031 (“like-kind”) exchange or if you’re subject to expatriate tax, then you aren’t eligible to benefit for the maximum exclusion of gain under Section 121. |
A 1031 exchange (explored more fully below) allows you to defer paying capital gains taxes when you sell a property and reinvest the proceeds in another.
|Step 2||Ownership requirement||You meet this requirement if you owned the home for at least two of the last five years before closing. For married couples filing jointly, only one spouse needs to own the home.|
|Step 3||Residence requirement||You meet this requirement if you owned the home and used it as residence for at least two of the last five years. This residence period need not have been a single block of time. |
A vacation or short absence still counts as time that you resided in the home. Any time you spend in a care facility counts towards the two-year residence requirement as long as you lived in the home for at least one year.
|Step 4||Look-back requirement||You meet this requirement if you didn’t sell another home during a two-year period before the date of sale or you did sell another home but didn’t take capital gains exclusion.|
|Step 5||Exceptions to eligibility test||If any of the following situations apply, they may affect your qualification: |
|Step 6||Final determination of eligibility||Your home sale is eligible for the maximum exclusion if you meet the above tests.|
Service member exception
You’ll notice that Step 5 includes an exception for service members, that is, members of the military, intelligence community, or Foreign Service. The bottom line is that the IRS will modify the two-year residence requirement for you if your service pulled you away from home.
Remember the rule that you need to have lived in the home for at least two years in the five-period prior to the sale? Under certain circumstances, service members can suspend that five-year period for up to 10 years to allow for the time you were away on duty.
Claiming your exclusion
The fun starts once you’ve determined your eligibility for the exclusion. Use Worksheet 1 in IRS Publication 523 to calculate your exclusion limit, and use Worksheet 2 in Publication 523 to calculate your gain or loss from the home sale.
When you’re filing your annual tax return:
❌ Don’t report the home sale if all of your gain is tax exempt.
✅ Do report the entire gain on Form 8949 if you have a taxable gain.
✅ Do report the sale if you received Form 1099-S, even if you have no taxable gain.
Do I qualify for partial exclusion of gain?
Even if you don’t meet the eligibility test for full exclusion of gain, you may qualify for partial exclusion.
People can qualify for partial exclusion if they sold their home because of a work-related move, a health-related move, or a major unforeseeable event such as the death of a spouse or their home being destroyed or condemned.
Check the IRS site for more details about which situations and circumstances qualify.
Section 121 doesn’t apply to me. What now?
Even if you don’t meet the requirements for Section 121 exclusion, there are other ways to trim your capital gains tax burden or avoid it entirely. But these strategies involve the sale of an investment or rental property, rather than a primary residence.
The most common ways to reduce capital gains tax exposure include 1031 exchanges, converting a rental property to a primary residence, tax-loss harvesting, and monetized asset sales.
If you can’t use any of these methods to avoid a hefty tax hit, selling with a low commission realtor could help you offset your costs.
Swap properties using a 1031 exchange
A 1031 exchange allows you to defer paying capital gains taxes when you sell one investment property and use the proceeds to buy another. The other property must be of “like-kind,” which generally means any piece of real estate can be exchanged for another piece of real estate, as long as they’re held for investment purposes.
There are some restrictions to keep in mind. After the initial sale, you have 45 days to identify the property that will be acquired, and you have to close on it within 180 days. The good news is that you can use 1031 exchanges repeatedly and defer capital gains taxes each time.
Convert your property to a primary residence
If you have a rental property, you can move into it and make it your primary residence. The sale of the home will qualify for capital gains exclusion after you’ve owned and lived in it as your primary residence for two years.
This strategy also works in reverse order — the house is eligible for capital gains exclusion if you lived in it for two years before turning it into a rental property, as long as that residence period occurred during the five years before the sale.
There are limits on how much you can exclude, however. First, you can only exclude capital gains from the period when you actually lived in the house as your primary residence. If you rented out the home for three years and then moved in for two years, only 40% of the gain is eligible for exclusion.
Another caveat is that the capital gains tax exclusion doesn’t apply to any depreciation-related capital gains. Capital gains attributable to depreciation during the time you rented out the property can be taxed at a rate of 25%.
For example, if you claimed $25,000 of depreciation while renting out your home for two years, the cost basis of the property will be adjusted down by $25,000, resulting in more capital gains when you sell. But you can only exclude from taxation the capital gains above the original cost basis of the home.
Always consult a tax professional regarding your specific situation. In general, the following conditions apply when you convert a rental property to a primary residence to curb your capital gains taxes:
- You need to have owned and lived in the property for at least two years.
- The property cannot have been purchased in a 1031 exchange in the last five years.
- Any previous capital gains exclusion claims must have occurred more than two years prior to the sale.
Use tax-loss harvesting
Tax-loss harvesting, also known as tax-loss selling, allows you to offset capital gains from one property sale against losses from another. You can consider this strategy if you’re selling a house for a gain and have another property that has depreciated in value.
In this scenario, you sell the losing investment at the same time that you sell the profitable asset. This allows you to make the best of a bad situation by lowering the net capital gain that is taxed.
Consider a monetized installment sale
A monetized installment sale (MIS) is a complex arrangement that’s often touted as a viable strategy to reduce capital gains taxes. However, the IRS has discouraged this approach. In May 2021, the IRS released a document calling the transactions “problematic” and highlighting six ways certain MIS deals may not provide the tax benefits being sought.
In a nutshell, the MIS transaction structure involves five parties: a seller, a buyer, an intermediary, a lender, and an escrow agent. The seller temporarily sells the property to an intermediary in exchange for a 30-year, interest-only installment contract. The intermediary pays the interest on the installment contract into an escrow account.
The intermediary flips the property to the final buyer for cash. Meanwhile, the third-party lender steps in and lends the original seller an amount equal to 95% of the final buyer’s purchase price. The escrow agent pays the interest payments on this 30-year note, canceling out the interest income on the installment loan, which is flowing through the same escrow account.
This structure theoretically allows the seller to postpone capital gains recognition on the home sale for 30 years. Again, the IRS doesn’t recommend it, so if you’re considering this strategy, explore your options with a CPA.
The bottom line
If you’re selling your primary residence at least two years after you bought it, see if you qualify for Section 121 exclusion. If you’re selling an investment property, consider whether another strategy is right for you.
A professional real estate agent can advise you about your specific situation and options. Our friends at Clever Real Estate can help you save even more by pre-negotiating low commission fees with top local agents nationwide. Get matched with multiple agents to interview, compare marketing plans, and pick the best fit. And, you’ll get full service and support for just 1.5%!
FAQs about avoiding capital gains tax when selling a house
What is my capital gains tax rate when selling a house?
Your capital gains tax rate depends on how soon you sell your house. If you hold the house for one year or less, you pay short-term capital gains. This is taxed as ordinary income, so you’ll pay 10–37%, depending on your household income. If you sell after more than one year of ownership, your profits will be taxed as long-term capital gains, which have lower tax rates, ranging from 0–20%.
Why should I hold the house for two years before selling?
If you own a house for at least two years before you sell, you're likely eligible for Section 121 exclusion. This means that the first $250,000 of the profit on your home sale is tax-free. The tax-free amount doubles to $500,000 if you’re married and filing jointly.
If you do need to sell before you've owned for two years, use our capital gains tax calculator to find out how much you could owe.
What is Section 121 exclusion and how can I qualify?
Section 121 is a provision of the tax code that allows home sellers to exclude $250,000 (individuals) or $500,000 (married, filing jointly) of their capital gains from taxation, depending on their filing status. If you're selling a primary resilience that you've owned and lived in for at least two of the past five years, you likely qualify for this exclusion.
Am I eligible to exclude my capital gains from taxation?
Compare your situation against the eligibility test offered by the IRS. Factors such as how long you’ve owned and lived in the house, whether you’ve taken a capital gains exclusion on a prior home sale, and special situations like serving in the military will decide whether you are eligible to have the maximum amount of capital gains excluded from taxation.
How can I reduce my capital gains tax when selling an investment property?
If you’re selling an investment property (as opposed to a primary residence), your options include a 1031 exchange, converting the property to a primary residence, tax-loss harvesting, and a monetized asset sale.
How Much Does it Cost to Sell a House?: Offloading your home is one of the biggest financial transactions you’ll ever make. Find out more about the various costs involved and what the average seller pays.
20 Ways You Can Save Money When You Sell Your House: There are many ways to save money when you sell a house. Check out our guide to the key tactics home sellers use to minimize expenses and keep more profit in their pocket.
Selling a House After 1 Year or Less? You Need to Read This: Not everyone can hold on to their house long enough to reduce their capital gains tax exposure. If you’re looking for a quick exit from your home purchase, learn about the costs and how you can protect yourself financially.