How to avoid capital gains tax on a home sale (2024)

If you’re a homeowner, finding out your place has gone up in value can feel like you’ve hit the jackpot. But if you sell a home for a profit, capital gains taxes may take a big bite out of your earnings.

Fortunately, whether you’re selling your primary residence or an investment property, you can use tax exclusions and deductions to lower how much you’ll owe the IRS and maximize your profit.

What are capital gains taxes?

Key terms

  • Capital gain: Profit on an investment’s sale minus any losses you’ve had from the asset.
  • Primary residence: The house you live in for most of the year.
  • Investment property: A property you buy to earn income through a rental or a rise in the home’s value.

Capital gains taxes are what you owe when you sell an asset (in this case, a home) for a net profit. For instance, say you bought a home for $500,000 and sell it for $600,000. In that case, your capital gain—would be $100,000.

That amount is taxable when you file your federal 1040 for the year you make the sale. But there are ways to lessen the blow. For example, you may be able to lower your profit by deducting money you put into the home: If you had a $100,000 capital gain but spent $40,000 on improvements, you’ll owe taxes on just $60,000 (the profit minus your expenses).

Like ordinary income taxes, capital gains taxes are progressive—your tax rate increases as your income does. Which tax rate applies to your gains depends on how long you owned the home before you sold:

  • Long-term capital gain: Profit from a home sold after owning it for over a year
  • Short-term capital gain: Profit from a home sold after owning it for up to a year

How much are capital gains taxes?

With a home sale, your capital gains tax rate will depend on four key factors:

  • Household income. Generally, you owe more in taxes if your household income (HHI) is high.
  • Marital status. If you file a joint return, you may be able to deduct more of your capital gains than someone who’s single.
  • Type of property. You may be able to exclude capital gains tax if you sell a primary home. (Investment properties generally don’t qualify for this.)
  • Holding period. Long-term capital gains usually trigger lower tax rates than short-term gains. If you sell a home within a year of owning it, the tax is calculated like your regular income tax (up to 37%). But if you’ve owned the home for over a year, you usually owe no more than 20% of the profit you make from the sale.

What are the current capital gains tax rates?

Uncle Sam usually taxes short-term capital gains at the same rates as regular income (10%–37% for 2023). For long-term gains, three rates—including 0%—can apply:

Long-term capital gains tax rates for 2023–2024

0% rate

15% rate

20% rate

Filing status

Taxable income


$44,625 or below

$44,626 to $492,300

$492,300 or above

Married filing jointly

$89,250 or below

$89,251 to $553,850

$553,850 or above

Married filing separately

$44,625 or below

$44,626 to $276,900

$276,900 or above

Head of household

$59,750 or below

$59,750 to $523,050

$523,050 or above

Example: Suppose you file a joint return with your spouse, and your household income is $200,000. If you earned $100,000 in long-term capital gains, you’d fall in the 15% tax bracket, so you’d owe $15,000 on the gain.

How to avoid capital gains tax when selling your primary home

You may not have to pay as much, if any, tax if you’ve profited from selling your “primary residence”—the home you’ve lived in for most of the tax year. (This can be anything from an apartment to a houseboat.) Thanks to the IRS’s "Section 121," single tax filers can deduct up to $250,000 of a capital gain, while joint filers can write off up to $500,000.

Even so, to qualify you must pass an “ownership and use” test: You must have lived in your home for at least two years over a five-year period before selling. (You don’t have to live in the home for two consecutive years, though. For instance, you can alternate between renting and living there during the five-year time window.)

Also, if you sell two properties, you can’t use the exclusion on both homes in the same two-year period. And if the home was an investment property—that is, you didn’t live there for at least two of the five years before the sale—you can’t snag the tax break at all.

This doesn’t mean that real estate investors can’t tame capital gains taxes—but they may have to go an extra mile to do so.

How to avoid capital gains tax on an investment property

Investment properties like rentals and commercial buildings aren’t eligible for the same exclusions as primary residences. Because of this, real estate investors can pay a lot in taxes. However, tax-savvy homesellers may have several ways to avoid capital gains:

Make the home your own for two years

Even if you rely on a home mainly for income, you can use the primary residence exclusion if you live there for two out of the five years before you plan to sell to qualify.

The amount you save could be substantial. For example, say you’ve lived in the home for two of the five years before you sell. If you make a $300,000 net profit, you can exclude $120,000 (two-fifths of $300,000) from your capital gain and only owe tax on the other $180,000.

Reinvest in new property

Thelike-kind (aka "1031") exchangeis a popular way to bypass capital gains taxes on investment property sales. With this transaction, you sell an investment property and buy another one of similar value. By doing so, you can defer owing capital gains taxes on the first property. In fact, you can do this over and over.

The types of properties don’t matter—one can be a penthouse, another a plot of land—but they must pass directly to the new owner with each sale. The benefit: Eventually, you’ll face a lower tax rate on a long-term capital gain than you would on a short-term gain.

A key caveat: If youdownsize—swap your property for a cheaper one—you’ll likely owe tax on the gains you receive during the exchange.

Also, while it may seem simple, this strategy can get complicated, especially if you claim depreciation (and a tax deduction) on a property that later sells at a profit. In that case, the IRS can“recapture” the depreciation —basically, the government takes back the money from your old deduction and taxes it as ordinary income.

For instance, say you bought a property for $300,000 and claimed $50,000 in depreciation, lowering the home’s value to $250,000. If you sell in a like-kind exchange, the $50,000 you’d claimed in depreciation is subject to recapture and taxed as regular income. That’s usually at a higher rate than on long-term capital gains.

Nuances like this are why you should speak to a tax advisor before picking a strategy for lowering your capital gains taxes.

Take qualifying deductions

You may be able to lower your capital gains taxes by deducting expenses such as for major home improvements before you sell or costs you incurduring the sale.

For example, if you spent $75,000 on a new kitchen and made $300,000 on your home sale, only your $225,000 profit will be taxed.

Time your sale strategically

By spreading your income from a home sale across multiple tax years, you can stay within your current tax bracket or even move to a lower one. If you and the buyer agree to aninstallment sale, they’ll buy the property with multiple payments instead of a single sum. To get a tax break, though, you must receive at least one paymentfollowingthe tax year of your home sale. (You’d report the gain under the “installment method” using IRS Form 6252 when you file your taxes for the year in which the sale occurred, along with each year of the installments.)

These two scenarios illustrate how capital gains taxes apply with and without an installment sale:

Scenario 1: Single-payment sale

John’s ordinary income is $100,000, and he makes $80,000 in profit (capital gain) from the home sale. This brings his taxable income up to $180,000—and puts him in the 15% tax bracketfor this transaction. So, he owes $12,000 in capital gains tax ($80,000 x 15%) on it.

Scenario 2: Installment sale

Alice’s ordinary income is also $100,000, and she gets $80,000 in capital gains from the home sale. However, she spreads the sale equally across two years (the buyer makes a $40,000 payment in each tax year). In the first year, Alice’s taxable income totals $140,000 ($100,000 in ordinary income plus a partial capital gain of $40,000). She still lands in the 15% tax bracket, so she owes $6,000 ($40,000 x 15%) in capital gains tax for that year.

The following year, she receives the second $40,000 payment. But let’s say Alice also chooses to retire that year. Because she hasn’t yet claimed Social Security benefits, her onlytaxableincome for the year will come from that second $40,000 in capital gains. In this case, she’d fall to the0%tax bracket and won’t owe any federal taxes. Result: By taking installment payments, Alice saves more than half in capital gains taxes versus a single-payment sale.

One note: Real estatedealersales—made by someone in the business of selling propertiesother than their primary residencewith the purpose of making a profit (think real estate flippers)—don’t qualify for the installment method.

Offset your capital gains with losses

Tax-loss harvestingis a tactic that involves selling investments at a loss to offset capital gains from other investment sales. In this case, if you made a profit on your home sale, you can use losses from other investments to reduce your taxes. For example, if you earn $300,000 in capital gains on a home sale but lose $100,000 after sellingotherassets, only $200,000 will be taxed.

Also, be aware of limitations like thewash-sale rule: You can’t claim an investment as a loss if you repurchase it within 30 days.

Navigating capital gains taxes can be challenging, especially if you’re selling an investment property. You should speak to a tax advisor to ensure you make the most effective move for your financial situation.

Prudential doesn’t provide tax or legal advice. Please consult your tax and legal advisors for guidance on your situation.

Author details

Alani Asis has covered topics like taxes, investing, and insurance for AARP, Forbes, and others.

For Compliance Use Only:1075064-00001-00

How to avoid capital gains tax on a home sale (2024)


How to avoid capital gains tax on a home sale? ›

You must have lived in the house for at least two years in the five-year period before you sold it. Owning the home isn't enough to avoid capital gains on the sale — the IRS also wants to make sure that you actually intended to live in the house, at least for a certain period of time.

What is a simple trick for avoiding capital gains tax? ›

Hold onto taxable assets for the long term.

The easiest way to lower capital gains taxes is to simply hold taxable assets for one year or longer to benefit from the long-term capital gains tax rate.

How to avoid capital gains when selling a house? ›

Yes. Home sales can be tax free as long as the condition of the sale meets certain criteria: The seller must have owned the home and used it as their principal residence for two out of the last five years (up to the date of closing). The two years do not have to be consecutive to qualify.

What items can be home improvements to not be considered capital gains? ›

While small repairs and home maintenance are not generally considered capital improvements, they may be if the repairs are a part of a larger project. For example, painting a home's interior is not typically a capital improvement; however, repainting after a fire as part of the repair might be considered one.

Are there any loopholes for capital gains tax? ›

A few options to legally avoid paying capital gains tax on investment property include buying your property with a retirement account, converting the property from an investment property to a primary residence, utilizing tax harvesting, and using Section 1031 of the IRS code for deferring taxes.

At what age do you not pay capital gains? ›

Capital Gains Tax for People Over 65. For individuals over 65, capital gains tax applies at 0% for long-term gains on assets held over a year and 15% for short-term gains under a year. Despite age, the IRS determines tax based on asset sale profits, with no special breaks for those 65 and older.

What are the two rules of exclusion on capital gains for homeowners? ›

Sale of your principal residence. We conform to the IRS rules and allow you to exclude, up to a certain amount, the gain you make on the sale of your home. You may take an exclusion if you owned and used the home for at least 2 out of 5 years. In addition, you may only have one home at a time.

How do you beat capital gains tax on real estate? ›

Is there a way to avoid capital gains tax on the selling of a house? You will avoid capital gains tax if your profit on the sale is less than $250,000 (for single filers) or $500,000 (if you're married and filing jointly), provided it has been your primary residence for at least two of the past five years.

Do I have to buy another house to avoid capital gains? ›

You can avoid capital gains tax when you sell your primary residence by buying another house and using the 121 home sale exclusion. In addition, the 1031 like-kind exchange allows investors to defer taxes when they reinvest the proceeds from the sale of an investment property into another investment property.

What closing costs are deductible from capital gains? ›

In addition to the home's original purchase price, you can deduct some closing costs, sales costs and the property's tax basis from your taxable capital gains. Closing costs can include mortgage-related expenses. For example, if you had prepaid interest when you bought the house) and tax-related expenses.

Is painting a selling expense? ›

As a general rule, any repairs or maintenance requested by a buyer are considered selling expenses. Some of the most common repair and maintenance issues that come up during a buyer's inspection include painting, fixing leaking faucets, and repairing damaged flooring.

Is painting a capital improvement? ›

Just to confuse things, it should be noted that, according to the IRS, while painting is usually not considered a capital improvement, it must be capitalized if it is part of a large-scale improvement plan.

Do you have to pay capital gains after age 70? ›

As of 2022, for a single filer aged 65 or older, if their total income is less than $40,000 (or $80,000 for couples), they don't owe any long-term capital gains tax. On the higher end, if a senior's income surpasses $441,450 (or $496,600 for couples), they'd be in the 20% long-term capital gains tax bracket.

How long to live in a house to avoid capital gains? ›

Thanks to the IRS's "Section 121," single tax filers can deduct up to $250,000 of a capital gain, while joint filers can write off up to $500,000. Even so, to qualify you must pass an “ownership and use” test: You must have lived in your home for at least two years over a five-year period before selling.

Should I get a 1099 when I sell my house? ›

Sellers of real property, under guidelines established by the I.R.S., are required to have the dollar amount of their gross proceeds from the sale reported on a Form 1099S.

What is the 2 out of 5 year rule? ›

When selling a primary residence property, capital gains from the sale can be deducted from the seller's owed taxes if the seller has lived in the property themselves for at least 2 of the previous 5 years leading up to the sale. That is the 2-out-of-5-years rule, in short.

Do I pay capital gains if I reinvest the proceeds from sale? ›

Do I Pay Capital Gains if I Reinvest the Proceeds From the Sale? While you'll still be obligated to pay capital gains after reinvesting proceeds from a sale, you can defer them. Reinvesting in a similar real estate investment property defers your earnings as well as your tax liabilities.

Can I sell stock and reinvest without paying capital gains? ›

With some investments, you can reinvest proceeds to avoid capital gains, but for stock owned in regular taxable accounts, no such provision applies, and you'll pay capital gains taxes according to how long you held your investment.

Top Articles
Latest Posts
Article information

Author: Sen. Emmett Berge

Last Updated:

Views: 5679

Rating: 5 / 5 (60 voted)

Reviews: 83% of readers found this page helpful

Author information

Name: Sen. Emmett Berge

Birthday: 1993-06-17

Address: 787 Elvis Divide, Port Brice, OH 24507-6802

Phone: +9779049645255

Job: Senior Healthcare Specialist

Hobby: Cycling, Model building, Kitesurfing, Origami, Lapidary, Dance, Basketball

Introduction: My name is Sen. Emmett Berge, I am a funny, vast, charming, courageous, enthusiastic, jolly, famous person who loves writing and wants to share my knowledge and understanding with you.