6 Ways to Avoid Paying Capital Gains Tax on Your Home Sale

At HomeLight, our vision is a world where every real estate transaction is simple, certain, and satisfying. Therefore, we promote strict editorial integrity in each of our posts.

If you’ve owned your house for 7-10 years, your overall home appreciation rate may be as high as 50%. Even if you’ve only owned your property for 2-3 years, it’s likely you’ve built up some healthy equity.

But when you try to cash out on your biggest life investment, the IRS can swoop in to steal your thunder. That’s right… you have to pay taxes when you sell your home (unless you don’t).

The capital gains tax, the tax on the sale of a capital investment, could siphon off up to 20% of your profit. 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.

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.

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.

Capital gains tax on a home sale explained

Generally speaking, the capital gains tax is the tax imposed on the sale of a capital investment.

Nathan Rigney, a lead tax analyst at H&R Block, explains that real estate property is a capital asset, so it is subjected to capital gains tax once it’s sold. But, there are exclusions that are easy to qualify for if you know about them ahead of time.

“If you’re selling your main home and you’ve lived in it and owned it for at least 2 of the last 5 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.

But how do I determine my capital gain?

Well, the gain on your sale is, essentially, the profit that you’ve made on the investment.

According to Rigney, this is how you find the capital gain from your house sale:

  • Calculate your basis. Take the cost you paid for your house and add any improvements you’ve paid for since you’ve owned it (remodeled kitchen, new roof, etc.) Make sure you have the receipts!
  • Take the price you are selling your home for and subtract your basis to determine your capital gain.

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?

Just wait; 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?

There are a few scenarios in which your capital gain will exceed the tax-exemption threshold. If you’re in the real estate market where prices are increasing rapidly, or if you’ve owned a piece of property for so long that its value has skyrocketed, you might see a gain over that $250,000 or $500,000 cap.

Here, we’ll look at these possibilities more in-depth.

The 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, you’re 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. Whereas in 2008, the average selling price was $763,000 — a nearly 1 million dollar increase over the past 10 years.

So, theoretically, married homeowners in San Francisco could stand to pay capital gain tax on up to half of their home sale profit.

Chris Carter, who has 28 years of experience and ranks in the top 2% of agents in Jackson County, Missouri, says 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’m working with a couple right now that has lived in their house for 52 years,” Carter says. “They paid $17,000 dollars for it, and its market value right now is $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.

According to the U.S. Census Bureau, the median value of single-family homes in the United States rose from $30,600 in 1940 to $457,800 in 2022, 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 have owned for extended periods 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 for the value inflation.

You’ve lived in the home for less than 2 years or excluded property from capital gains tax within the past 2 years

The qualifications for capital gains exclusions require you to live in the property as your primary residence for at least 2 of the last 5 years — and if you’ve sold a property that was excluded from capital gains within the last 2 years, you aren’t allowed to exclude a property again.

To avoid these scenarios, be strategic with the timing and logistics of your home sale. The following tips will help you duck the capital gains tax with simple planning.

How to avoid capital gains tax

1. Live in your house for at least 2 years
Again, if your house isn’t your primary residence for 2 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 your house out 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 of 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. See if you qualify due to an unexpected move
If you’re forced to move for a reason outside of your control, you qualify for deductions from the capital gains tax.

“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.

4. 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.

5. 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.

6. 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.

In that case, you can mitigate your capital gains by keeping tabs on your adjusted cost basis using a basic formula:

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 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.

What are the capital gains tax rates in 2023?

Your capital gains tax rate depends on your tax bracket — so your income determines at which percentage your home sale profit will be taxed.

Please note that the income thresholds and tax rates provided below are for tax year 2023. It’s always recommended to refer to official IRS publications or consult with a tax professional for accurate and up-to-date tax information.

Tax rate Income threshold (single) Income threshold (married filing jointly)
37% Over $578,125 Over $693,750
35% Over $231,250 Over $462,500
32% Over $182,100 Over $364,200
24% Over $95,375 Over $190,750
22% Over $44,725 Over $89,450
12% Over $11,000 Over $22,000

 

Long-term capital gains rate Taxable income
Single filers
0% $0 to $44,625
15% $44,626 to $492,300
20% $492,301 or higher
Married filing jointly
0% $0 to $89,250
15% $89,251 to $553,850
20% $553,851 or higher

Source: IRS

Rigney provides some examples to help you put these tables into perspective:

  • You’ll pay none: If you are a single filer and your total income is less than $44,625, or you’re a joint filer and your total income is less than $89,250, then you’re in the 0% capital gains bracket.
  • You’ll pay some: If you’re a single filer from $44,626 all the way up to $492,300, you’re in the 15% bracket. If you’re joint and your income is $89,251 up to $553,850, you’re in the 15% bracket. “So that’s a huge range,” Rigney adds.
  • You’ll pay more: And then once you get over that $492,301 a year in the 20% bracket for single filers and $553,851 for joint filers, that gets you into 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.

Save thousands when buying a home

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.

Avoid the capital gains tax to make the most money when you sell your home

With all the costs incurred throughout the home sale process, 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.

Header Image Source: (Recha Oktaviani / Unsplash)