Imagine selling your home for far more than you paid for it, only to find out part of those earnings could go to taxes. It’s a surprise that catches many homeowners off guard, especially if they haven’t sold a property before. That’s why so many people want to know how to avoid capital gains tax before putting their house on the market.
How Much Is Your Home Worth Now?
As you look ahead and plan your next move, you can get a near-instant real estate house price estimate from HomeLight for free. Our tool analyzes the records of recently sold homes near you, your home’s last sale price, and other market trends to provide a preliminary range of value in under two minutes.
While there’s no magic loophole, there are legitimate IRS rules that may reduce or even eliminate what you owe. A little planning ahead can potentially save you thousands of dollars.
In this post, a leading tax analyst and a top-performing real estate agent break down the nitty-gritty of capital gains tax when you sell your home, so you can walk away with more of your home sale proceeds.
What are capital gains taxes?
Capital gains tax is the tax you may have to pay on the profit you make when you sell a capital asset that’s worth more than what you originally paid for it. For example, if you bought your home for $300,000 and later sold it for $500,000, your gain is $200,000.
Nathan Rigney, Director of Product Management at H&R Block, explains that real estate property is a capital asset, so it is subject to capital gains tax once it’s sold.
There are two types of capital gains: short-term and long-term. How do short-term vs. long-term capital gains taxes differ?
Short-term capital gains are what you pay when you sell the home you’ve owned for a year or less. These are taxed at the same rate as your regular income, so it could be pretty high, depending on your tax bracket.
Long-term gains, which you earn from the sale of a home held for over a year, are taxed at a lower rate (0%, 15%, or 20%), saving you money. Moreover, Rigney explains, “there are exclusions that are easy to qualify for if you know about them ahead of time.”
This is why holding assets longer and taking advantage of exclusions can mean way less tax stress when it’s time to sell.
“If you’re selling your main home and you’ve lived in it and owned it for at least two of the last five years, you can exclude possibly all of the gain,” says Rigney.
To break it down, this is how he puts it:
- If you’re a single tax filer and you sell your primary home, you can exclude up to a $250,000 gain.
- If you’re married and filing jointly, you can exclude up to a $500,000 gain in the sale of your primary home.
So, if you paid $200,000 for a house and, over the past 10 years of living in it, spent $50,000 to redo the kitchen and fix the roof, your cost basis is $250,000. If you sell it as a joint tax filer for $350,000, your capital gains will be $100,000, and you will not have to pay capital gains tax.
Sounds simple, right?
Well, it’s not that cut and dried. A wrong move here or there, like selling your home too soon, can increase your capital gains tax liability, and you want to take advantage of all the tax-free profit you can get.
When do I need to pay capital gains tax on my home sale?
You may have to pay capital gains tax if the profit from selling your home is more than the tax-free exclusion you qualify for. This is more common if you live in a hot real estate market where home values have jumped quickly or if you’ve owned your home for decades and it’s appreciated significantly. In those cases, your gain could end up exceeding the $250,000 limit for single filers or $500,000 for married couples filing jointly.
Here’s a closer look at when that can happen:
Your local real estate market has changed dramatically
If you maintain your house regularly throughout the time you own it, you stand to make a profit when you sell it. And in most cases, your profit will fall under the $250,000 (if single) or $500,000 (if married) threshold of capital gains tax, unless you own a home in a real estate market that has skyrocketed in recent years.
Take San Francisco, for example.
It’s not uncommon for the average selling price of a home in parts of San Francisco to be set at $1.7 million in the current market. In 2008, the average selling price was $763,000, a nearly one-million-dollar increase over the past two decades.
So, theoretically, married homeowners in San Francisco could stand to pay capital gains tax on up to half of their home sale profit.
Chris Carter, a top Lee’s Summit, Missouri, agent who has over 30 years of experience, shares that in the Midwest, getting hit with capital gains tax isn’t really a problem.
“The only time we really run into it is if somebody lived on a farm or inherited a farm as their primary residence, sold it, and then bought a house in town. They might get hit with some sort of capital gains tax at that point,” Carter says.
If you own a home in a market that has remained relatively steady since the time you purchased your home, you can relax. Your profits will most likely be exempt from the capital gains tax.
You’ve inherited a property or have owned it for a long period of time
If you’ve lived in your home for over 30 years or inherited a property that’s been in your family for decades, your home’s value may have increased exponentially.
“I’[ve worked] with a couple that has lived in their house for 52 years,” Carter says. “They paid $17,000 for it, and its market value [at the time of sale was] $200,000.”
“They’re married, so they don’t have to pay any capital gains tax on it, but somebody who’s in a house for an extended period of time could see huge market gains in terms of value and may be subject to capital gains tax,” he adds.
Decades of home appreciation: According to the most recent data from the U.S. Census Bureau, the median value of single-family homes in the United States rose from $30,600 in 1940 to $417,400 in 2025, after adjusting for inflation. Before adjusting for inflation, the median value of a single-family home in the U.S. in 1940 was just under $3,000.
Due to inflation, a property that you or your family has owned for an extended period of time might have a capital gain that doesn’t actually correlate with your profit. So, the longer you’ve owned the property, the more likely you’ll have to pay capital gains tax on the value inflation.
You’ve lived in the home for less than two years or excluded property from capital gains tax within the past two years
To qualify for the capital gains tax exclusion, you generally need to have lived in the home as your primary residence for at least two of the last five years. If you’ve already claimed the exclusion on another home sale within the past two years, you typically can’t claim it again yet.
The good news is that with a little planning, you may be able to avoid these situations altogether. The next section tackles simple strategies that can help you reduce or even skip capital gains tax.
How to avoid capital gains tax
1. Live in your house for at least two years
Again, if your house isn’t your primary residence for two years, you’ll have to pay capital gains tax when you sell it. So, even if you realize your house isn’t the forever home you originally thought it was, stick it out for a couple of years before you move on.
2. Don’t rent your house for long periods of time
Sure, renting out your house is a great way to make some extra income to help with your mortgage payments. But you can only meet the capital gains tax exclusion guidelines if your home is your primary residence.
Income properties or investment properties are subject to capital gains tax, and the IRS could ask for proof that you actually lived at the property for two years.
“Keep any records that you might need if there’s any question of whether you owned the home,” Rigney says. Records like utility bills and statements with your name and address on them will help you make your case in this situation.
3. Calculate your basis carefully
The higher your cost basis, the smaller your capital gain. So, a precise cost basis calculation could save you from exceeding the capital gain threshold ($250,000 gain for single tax filers and $500,000 gain for joint filers).
“When you’re including the cost of your improvements, you just need to have your invoices. If you hire a contractor, make sure you have invoices that show that amount.
“If you did it yourself, you can’t include the value of your services, but you can include all the materials that went into it and any permits that you have to pay for. You’re going to need records in case you get audited,” Rigney says.
4. Sell your house before filing for divorce
Joint filers have a larger threshold for tax-free capital gains, $500,000 of exempt gains, as opposed to $250,000 for single filers. So, if you are going through a divorce, sell the house before your split’s official to avoid paying capital gains.
Work with a tax professional who specializes in divorce and can act as a neutral third party in coordination with your real estate agent to keep you and your spouse’s financial best interests top of mind.
5. Plan to sell before your gain exceeds the exemption
If your local real estate market skyrockets, your home’s value will go up, up, and away in line with other properties in your area. If that applies to you, keeping track of your adjusted cost basis can help reduce your capital gains. Here’s the simple formula to use:
Original cost of asset
plus (+)
Improvements to asset
plus (+)
Repair of damages to asset
minus (-)
Depreciation to asset
minus (-)
Deducted casualty loss to asset
equals (=)
Adjusted basis of asset
That adjusted basis is your capital gains number. As soon as that number starts inching up close to or beyond the tax-free threshold for your filing status, you’ll have to pay taxes on your profit. So, plan your moves strategically to avoid a large, taxable gain.
6. Offset capital gains with capital losses
Offsetting capital gains with capital losses, also called tax-loss harvesting, is a savvy strategy to reduce your overall tax liability when selling a property.
Here’s how it works: if you’ve sold other investments, such as stocks or mutual funds, at a loss during the same tax year, you can use those losses to offset the taxable capital gain from your property sale.
For example, if your property sale resulted in a $50,000 gain but you have $10,000 in investment losses, you only pay taxes on $40,000. This strategy can be applied to short-term or long-term gains, depending on the type of loss incurred. If your losses exceed your gains, you can even offset up to $3,000 of regular income annually, carrying over excess losses to future years.
7. See if you qualify due to an unexpected move
Homeowners who don’t meet the full two-year residency requirement may still qualify for a partial capital gains tax exclusion in certain situations. This can apply if you need to move because of a job change, like starting a new job, getting transferred, or moving closer to your workplace.
“If something comes up, you get a new job in a new city, and you’ve only owned your home for a year and a half, you can still exclude a portion of your gain if you meet the qualifications to do that,” Rigney says.
He explains further that the following situations can help you reduce your capital gains tax if you sell your home and you fall outside of the general exclusion guidelines:
- You have to sell your home for health reasons.
- You got a new job in a different location.
- You unexpectedly have kids, and your house isn’t big enough.
Unexpected life events can make you eligible for a partial exclusion. Beyond the scenarios mentioned above, this may include situations like your home being destroyed or condemned, experiencing major damage from a natural disaster or other casualty event, the death of an owner or co-owner, a divorce, or certain family changes, such as having twins.
Basically, if something outside of your control forces you to sell sooner than expected, you may still get some tax relief.
Instead of getting the full $250,000 or $500,000 exclusion, you’ll usually qualify for a reduced amount based on how long you lived in the home before selling. For example, if you lived there for one year instead of the required two years, you may qualify for about half of the standard exclusion. The IRS has specific rules for what counts as a qualifying situation, so it’s worth checking your circumstances before assuming you’ll owe capital gains tax.
»Learn more: Capital gains taxes aren’t the only thing that can shrink your home sale profits. Before you celebrate your big payout, use our Seller Closing Cost Calculator to estimate your closing costs, factor in other home sale-related taxes, and see what you’ll really take home.
What are the capital gains tax rates in 2026?
As mentioned above, capital gains tax rates can vary depending on how long you’ve owned the property and your income level. If you sell a home after owning it for a short time, you may face short-term capital gains rates, while long-term gains usually get more favorable tax treatment.
Let’s break down the 2026 capital gains tax rates so you can see how short-term and long-term gains are taxed differently.
2026 short-term capital gains tax brackets
| Tax rate | Single filers | Married filing jointly | Head of household |
| 10% | $0 to $12,400 | $0 to $24,800 | $0 to $17,700 |
| 12% | $12,401 to $50,400 | $24,801 to $100,800 | $17,701 to $67,450 |
| 22% | $50,401 to $105,700 | $100,801 to $211,400 | $67,451 to $105,700 |
| 24% | $105,701 to $201,775 | $211,401 to $403,550 | $105,701 to $201,775 |
| 32% | $201,776 to $256,225 | $403,551 to $512,450 | $201,776 to $256,200 |
| 35% | $256,226 to $640,600 | $512,451 to $768,700 | $256,201 to $640,600 |
| 37% | $640,601 or more | $768,701 or more | $640,601 or more |
2026 long-term capital gains tax brackets
| Tax rate | Single filers | Married filing jointly | Head of household |
| 0% | $0 to $49,450 | $0 to $98,900 | $0 to $66,200 |
| 15% | $49,451 to $545,500 | $98,901 to $613,700 | $66,201 to $579,600 |
| 20% | $545,501 or higher | $613,701 or higher | Over $579,600 |
Editor’s note: The income thresholds and tax rates provided above are for tax year 2026. It’s always recommended to refer to official IRS publications or consult with a tax professional for accurate and up-to-date tax information.
Rigney provides some examples to help you put these tables into perspective:
- You’ll pay none: If you’re a single filer and your total income is less than $49,450, or you’re a joint filer and your total income is less than $98,900, then you’re in the 0% capital gains bracket.
- You’ll pay some: If you’re a single filer from $49,451 all the way up to $545,500, you’re in the 15% bracket. If you’re a joint filer and your total income is from $98,901 to $613,750, you’re in the 15% bracket. “So that’s a huge range,” Rigney adds.
- You’ll pay more: Once you earn more than $545,501 a year as a single filer and $613,701 for joint filers, you’ll be in the 20% bracket.
The higher your income, the more you’ll owe on capital gains. That is, if you don’t qualify for any exclusions.
HomeLight-recommended real estate agents are top-tier negotiators who understand the market data that helps you save as much as possible when buying your dream home.Save thousands when buying a home
Make the most money when you sell your home
With all the fees and costs associated with selling a home, the last thing you want is to deduct more of your profit. Your state taxes might be different, but federal taxes have specific requirements for taxes on capital gains.
Work with a top real estate agent and a trusted tax advisor to avoid any unnecessary deductions and make the most money selling your home.
Frequently asked questions (FAQs) about capital gains tax
No, not every state charges a capital gains tax. States like Florida, Texas, and Nevada don’t have a state income tax, so they generally don’t tax capital gains separately either. Other states may tax your capital gains as regular income, so where you live can make a big difference in how much you owe when you sell.
Yes, many states tax capital gains in addition to the federal capital gains tax. The amount you pay depends on where you live and how that state handles investment or home sale profits. A few states have no state income tax, which means they generally don’t charge a separate state capital gains tax.
Your cost basis is basically what you have invested in the property, not just what you originally paid for it. It usually includes the purchase price plus certain expenses and improvements, like a major remodel or adding a new room. When you sell, your cost basis helps determine your taxable profit by lowering the amount of gain you may have to pay taxes on.
A 1031 exchange lets real estate investors delay paying capital gains taxes by selling one investment property and putting the money into another qualifying property. Instead of paying taxes right away, the gain is deferred until the replacement property is eventually sold without another exchange. Keep in mind that this rule generally applies to investment or business properties, not your personal home.
Opportunity Zones are specific areas where investors can put money into approved funds that support economic development projects. In exchange, they may be able to delay or reduce certain capital gains taxes under specific rules. They’re mainly used by investors, so they may not apply to the average homeowner selling their primary residence.
Inherited property often gets a step-up in basis, which means the property’s tax value is adjusted closer to its fair market value when the previous owner passed away. This can significantly reduce the taxable gain if you sell the property soon after inheriting it. The rules can get complicated, though, so it’s a good idea to check with a tax professional before selling.
Editor’s note: This article is meant for educational purposes and should not be construed as financial or tax advice. HomeLight encourages you to reach out to a professional advisor regarding your own situation.
Header Image Source: (Acharaporn Kamornboonyarush/ Pexels)


















English (US) ·