Email FacebookTwitterMenu burgerClose thin

How Capital Gains Tax on Home Sales Works

Share

Selling a home can be a significant financial milestone, but it also comes with important tax implications that homeowners need to understand. One of the key considerations is the capital gains tax on home sales, which can affect the profit you make from selling your property. Essentially, capital gains tax is levied on the profit realized from the sale of a non-inventory asset, such as real estate. However, the tax code provides certain exemptions and conditions that can help homeowners minimize or even eliminate this tax burden, such as a $250,000 exclusion for selling your home.

financial advisor can help you create a tax plan to maximize your investments.

Have Questions About Your Taxes?

A financial advisor may be able to help. Match with an advisor serving your area today.

Get Started Now

What Are Capital Gains Taxes?

Capital gains are the profits that you receive from selling an asset. When you sell an asset, your capital gains or losses are calculated as:

  • Sale Price – (Purchase Price + Additional Investment) = Capital Gain (Loss)

Your capital gains or losses are based on the original cost of your underlying investment, otherwise known as your tax basis. So, for example, say that you buy a bundle of stocks for $1,000. Later, you buy an additional bundle for another $500. This combined investment of $1,500 would be your tax basis. Then, you sell the entire portfolio for $2,500. Your capital gains would be:

  • $2,500 – ($1,000 + $500) = $1,000

Since capital gains are a form of income, they are subject to taxation. However, Congress has established a special, lower rate for long-term capital gains called the capital gains tax. In 2025, there are three long-term capital gains tax brackets:

  • 0% – Up to $48,350 Single/$96,700 Joint
  • 15% – Between $48,351 – $533,400 Single/Between $96,701 – $600,050 Joint
  • 20% – Above $533,400 Single/$600,060 Joint

So, for example, say that your job pays you $45,000 per year. This earned income is subject to both income and payroll taxes, for a minimum rate of 17.65% (10% income + 7.65% payroll). But, say that you are an investor who makes $45,000 off the sale of stocks. This is a capital gain subject to the capital gains tax, which is 0% for those earnings. 

Long-term capital gains rates apply only to assets that you have held for more than a year. If you hold assets for 12 months or less, they are taxed at the rate of ordinary income. As with all taxed income, capital gains are cumulative. At the end of each year, you pay taxes on all of your combined gains from various sources.

Real Estate Sales and Capital Gains

A woman researching capital gains tax brackets.

Real estate sales are considered capital gains, so when you sell a property you account for any profits or losses on your capital gains taxes. As always, your capital gain from selling the house is your sale price less the tax basis of the property.

Calculating the tax basis for a home sale can get fairly complicated. In general, the IRS allows you to consider any improvements and updates that you’ve made to the property as part of your overall investment, as well as many of the costs involved with marketing and selling the property. However, you cannot include costs for maintenance and repairs, nor can you claim financing costs. So as you own a property over the years, it’s worth keeping a record of any money you spend upgrading and improving it.

In broadest strokes, the IRS defines this difference by classifying improvements as spending that will “add to the value of your home, prolong its useful life, or adapt it to new uses.”

So, for example, say that you sell your home for $500,000. Over the years, you spent the following money on the property:

  • Purchase Price – $350,000
  • Interest on the mortgage – $25,000
  • New windows – $3,000
  • Deck repairs – $750
  • Listing and marketing fees – $1,000

You can include your purchase price, the new windows and the marketing fees in your property’s tax basis. You cannot include the deck repairs, since that’s maintenance, nor can you include your interest payments. So, your capital gains here are:

  • $500,000 – $354,000 = $146,000

You would have $146,000 of capital gains. If your total taxable income puts you in the 15% capital gains rate bracket (which is the most common), you would pay $21,900 on that gain (15% x $146,000).

These are the rules that will apply to most property sales. So, for example, say that you have a vacation house or a rental property. If you sell that home, you will calculate your tax basis, determine your capital gains and then pay taxes on those gains based on your overall tax rates

Home Sale Exclusion

For the most part, the rules around real estate and capital gains don’t change based on the nature of the underlying property. If you sell a house and make money, that profit is considered a taxable capital gain. 

However, there is a broad exclusion for the sale of your primary residence. When you sell your main home, you are allowed to exclude the first $250,000 single/$500,000 joint of the profits from your taxes. Importantly, this exclusion applies to your gains so you apply the exclusion after you adjust for the property’s tax basis. So, your math here is:

  • Sale Price – (Purchase Price + Qualified Spending) – Exclusion = Taxable Gains

To qualify for the home sale exclusion, otherwise known as the Section 121 Exclusion, you must meet what is known as the “ownership and use” test. This means that you must have owned the property and lived in it as your primary residence for at least 2 out of the past 5 years. This time can be nonconsecutive, but it must apply to the five years directly before the sale. The purpose of this test is to limit the home sale exclusion to a primary residence, rather than investments, vacation properties or flips. 

For individuals or couples, this exclusion means that you will typically pay little if any, taxes on all but the most lucrative sales.

Bottom Line

A woman thinking about how much she could invest in a new home after paying capital gains taxes on the sale of her old home.

Understanding how capital gains tax on home sales works is crucial for homeowners looking to maximize their profits when selling a property. When you sell your home, the profit you make—known as the capital gain—may be subject to taxation. However, the IRS provides significant exclusions that can help reduce or even eliminate this tax burden. It’s also important to keep meticulous records of any home improvements, as these can increase your home’s cost basis and further reduce your taxable gain. By understanding these rules and planning accordingly, you can make informed decisions that align with your financial goals.

Tips on Selling Your House

  • A financial advisor can help you build a comprehensive retirement plan. Finding a financial advisor doesn’t have to be hard. SmartAsset’s free tool matches you with vetted financial advisors who serve your area, and you can have a free introductory call with your advisor matches to decide which one you feel is right for you. If you’re ready to find an advisor who can help you achieve your financial goals, get started now.
  • Selling your home is a process that can require many steps. Many tasks required to sell your home can be broken down into 10 major steps.

Photo credit: ©iStock.com/dragana991, ©iStock.com/svetikd, ©iStock.com/dragana991