If you’re selling a home, you might be concerned about the tax implications. Many homeowners who are selling a primary residence (the home you live in) won't owe capital gains taxes, though, due to generous federal exemptions.
However, if you're selling an investment property or your home has significantly increased in value, you need to understand how these rules work. Learn more about these legal ways to avoid paying taxes on the sale of a house to ensure you don't experience a nasty tax surprise.
How taxes work when you sell a home
A house is considered a capital asset, which is a significant piece of property. When you sell a home, you may owe capital gains taxes on the profit. A profit from a home sale is the positive difference between the sales price and purchase price (what you originally paid for the home), plus adjustments. These adjustments include your closing costs, real estate agent commissions, and settlement fees from when you sold the home.
The IRS allows you to further reduce your taxable gain on a sale to account for home improvements. If you sell it for a loss, there are no capital gains taxes.
When the home is your principal residence, which means you’ve lived in the home for at least two of the past five years, you can exempt up to $250,000 in capital gains tax ($500,000 for married filing jointly) from the sale of your home. In other words, if you made less than $250,000 from the sale of your home and are eligible, you won't owe any taxes on the sale.
For example, if you purchased a home that you lived in for two of the past five years for $250,000 and sold it for $350,000, you likely wouldn’t have to pay capital gains taxes, as your profit was $100,000 (and likely less once you figured in selling costs and other related expenses). This is well below the threshold of $250,000 for single filers and $500,000 for married couples filing jointly.
If the home is a rental property, your cost basis is reduced by the accumulated depreciation that you've claimed on prior tax returns. Depreciation is when you deduct the cost of buying and improving a rental property over time rather than taking one large deduction the year you bought or improved the property.
Short-term vs. long-term capital gains
If you are required to pay capital gains taxes on your home sale, it may be short-term or long-term. Short-term capital gains taxes are based on your ordinary income tax rate, which depends on your tax bracket. Short-term capital gains apply if you owned the asset for less than one year.
Many homeowners will pay the long-term capital gains tax rate if they’re required to pay capital gains taxes at all.
The chart below shares the income ranges for each federal long-term capital gains tax bracket for 2024.
|0% tax rate
|15% tax rate
|20% tax rate
|$0 - $47,025
|$47,025 - $518,900
|Married filing jointly
|$0 - $94,050
|$94,050 - $583,750
|Married filing separately
|$0 - $47,025
|$47,025 - $291,850
|Head of household
|$0 - $63,000
|$63,000 - $551,350
7 ways to avoid taxes on a home sale
When you sell a home that has gained in value, you may owe capital gains taxes when you file your federal taxes. Even if you use the best tax software, if you don't take advantage of the applicable tax laws, you could be paying more in taxes than you need to.
Here's how to avoid paying taxes on a real estate sale on your primary residence, rental property, vacation home, or other real property.
1. Live in the house for two years
The most common strategy to avoid paying taxes on the sale of a house is by living in it for at least two years. As your primary residence, the federal government allows you to exclude up to $500,000 in gains as a married couple that files taxes jointly or $250,000 for single filers.
The rules state that you qualify for this capital gains exclusion on the sale of a home as long as it was your primary residence for two of the previous five years from the date of sale. Some homeowners take advantage of this rule by living in a home for a two-year period, then converting it into a rental property for up to three years, and selling it before the five-year time period is up.
2. Move due to military service
Members of our U.S. military often have to move even if they don't want to. When the military changes the location of their assignment, they must move within a short period of time. In this situation, it can be difficult for the military homeowner to meet the "two in five" exemption that other homeowners benefit from.
An exemption allows qualified armed services, foreign service, or intelligence community members to suspend the five-year test period for up to 10 years.
To qualify, you must be moved to a duty station at least 50 miles from your home or reside in government housing under government orders for more than 90 days or an indefinite period. This rule allows eligible homeowners to postpone the sale of their home and still qualify for the exemption if they've lived in the home for at least two years.
3. Look for exceptions
Even if you don't meet the eligibility test of "two in five," you may qualify through an exception. The IRS rules allow for exceptions due to work, health, unforeseeable events, and other circumstances. Here are a few of the situations where you may qualify for an exception to avoid paying taxes on the sale of a house.
If you, your spouse, co-owner, or co-habitant of the home took a new job or transferred to an existing job that is at least 50 miles farther from your current home from your previous job, you may qualify for an exception. For example, if your current job is 10 miles away, the new position must be at least 60 miles away. The same is true for homeowners who didn't have a job but now have one that is at least 50 miles away.
When you, or anyone that you're living with, must move to diagnose, treat, mitigate, or cure a disease, illness, or injury, you may qualify for an exception. You may also qualify if you move to provide medical or personal care to a family member. A doctor's recommendation to move due to health problems also qualifies.
Unforeseen external events
When unexpected events happen, you may also qualify for an exception. This includes if your home was destroyed or condemned or if it suffered a casualty loss due to a natural disaster, man-made event, or terrorism.
Unexpected personal events
Additionally, you may be eligible if someone living at the home died, became divorced or legally separated, or gave birth to two or more children from the same pregnancy.
Unemployment or change in income
Becoming unemployed or experiencing a change in employment status that made you unable to pay basic living expenses are also valid reasons to sell and avoid taxes.
4. Keep track of home improvements
Many homeowners don't stop spending on their homes after making the initial purchase. They continue to spend on capital improvements that add value to the home. These value-added improvements are part of the reason why the home was able to sell for what it did. And it's a valuable lesson in how to manage your money to build your net worth.
Keeping track of the home improvements you make increases the cost basis of your home when it comes time to sell. In other words, your profits are lower because of these additional expenditures.
Adding a bedroom, converting a half-bath into a full bath, modernizing the kitchen, and building a new deck all count as home improvements that increase your cost basis.
Bear in mind that not all money spent on your home qualifies as a home improvement. Most repairs to keep your home in good condition are excluded. Examples of excluded repairs are painting the interior or exterior, fixing a leaky sink, or replacing broken hardware.
5. Use a 1031 exchange
Tax rules encourage investors to buy additional properties when they sell an existing one. A strategy known as a 1031 real estate exchange allows investors to purchase one or more properties with the proceeds from the sale of a property to avoid paying capital gains taxes. To take advantage of this process, there are certain steps you need to follow within a set time frame. But if you can make it work, you'll realize major tax savings when selling a property.
The basics of a 1031 exchange involve selling and buying "like-kind" assets like real estate through the use of an intermediary. When you sell your property, the funds must go to a qualified intermediary that acts as an escrow account for your money. Within 45 days of the sale of your property, you must identify a replacement property. Then, you must close on it within 180 days. Any gain from the like-kind exchange that is not reinvested in the new property is called "surplus" and is considered taxable.
6. Installment sale
Although most real estate transactions are finalized in one day, some allow the buyer to break the purchase into pieces over time. These are known as "installment sales," and they are a strategy that allows the seller to spread out tax gains over multiple tax years. By breaking the sale into multiple payments over many years, you can reduce the tax impact in a single year.
TipInstallment sales are especially attractive to taxpayers who may be subject to the Net Investment Income Tax. The NIIT is an additional tax owed on certain types of income, such as capital gains from the sale of investment real estate, for people with certain levels of adjusted gross income.
7. Offset with capital losses
If you do have to pay capital gains on a property you sold, you can offset those gains with capital losses. If you have more losses than gains, you can use up to $3,000 per year to offset your gains. This is also known as tax-loss harvesting.
What is the tax rate on capital gains?
The tax rate on capital gains depends on whether it’s short term or long term. The short-term capital gains tax rate is the same as your ordinary income tax rate. The tax rate on long-term capital gains from any asset varies based on your tax filing status and your adjusted gross income.
Many taxpayers qualify for a 0% capital gains tax rate based on their taxable income. For example, couples filing jointly have a 0% capital gains tax rate if their adjusted gross income is $94,050 or less.
Can you sell one house without paying taxes?
Yes, it is possible to sell a house and not pay any capital gains taxes. Federal law allows married homeowners who file jointly to exclude up to $500,000 ($250,000 for single filers) in long-term capital gains if they've lived in the home for two of the previous five years. Real estate investors can also avoid paying taxes on the sale of a house if they buy another eligible property using a 1031 exchange.
How long do you have to live in a house before you can sell it without paying taxes?
To qualify for the capital gains exemption on the sale of your home, you must have lived in the property for two of the previous five years. This means that you could live in the home for two years, then move out and still qualify as long as the sale closes before three years have passed.
Profiting from real estate appreciation doesn't have to mean that you'll be stuck with a big tax bill. Whether it's your primary residence, a second home, or an investment property, there are ways to avoid paying taxes on a real estate sale. And you can always consult a tax professional if you have questions.
To save even more money at tax time, here are some things you can do to reduce your taxes.
More from FinanceBuzz:
- Update your home so you can sell faster and for more
- All-inclusive service means you don’t have to lift a finger
- Small repairs to whole-home renovations, Curbio can do it all
- $0 due until the home sells with no interest charges