How Capital Gains Tax on Home Sales Works

A woman calculating capital gains tax on the sale of a home.

If you sell your home for a profit, the IRS considers this a taxable capital gain. This rule applies to all home sales, including vacation or investment properties. However if you sell your primary residence, you may be able to exclude $250,000 of gain per individual from your taxes. As a result, in most cases, it’s unlikely that you will owe taxes on the sale of your home. Here’s how it works.

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

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:

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:

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 2024, there are three long-term capital gains tax brackets:

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:

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:

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, then determine your capital gains, 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:

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

If you sell a home, or any other piece of real estate, any profits you make from the sale will be considered capital gains. For any house other than your primary residence, you will pay capital gains taxes on the entire amount. For your primary residence, you can exempt $250,000 per person from your taxes.

Tips on Selling Your House

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

Eric ReedEric Reed is a freelance journalist who specializes in economics, policy and global issues, with substantial coverage of finance and personal finance. He has contributed to outlets including The Street, CNBC, Glassdoor and Consumer Reports. Eric’s work focuses on the human impact of abstract issues, emphasizing analytical journalism that helps readers more fully understand their world and their money. He has reported from more than a dozen countries, with datelines that include Sao Paolo, Brazil; Phnom Penh, Cambodia; and Athens, Greece. A former attorney, before becoming a journalist Eric worked in securities litigation and white collar criminal defense with a pro bono specialty in human trafficking issues. He graduated from the University of Michigan Law School and can be found any given Saturday in the fall cheering on his Wolverines.

Read More About Taxes

Tax Credits & Deductions Tax Credits You Can Use to Reduce Your 2024 Taxes February 28, 2024 Read More

A self-employed worker reviewing rules to deduct contributions from his solo 401(k).

How a Solo 401(k) Is Taxed and What Is Deductible? November 17, 2023 Read More

A father researching how the additional child tax credit (ACTC) works.

What Is the Additional Child Tax Credit (ACTC)? January 12, 2024 Read More

An entrepreneur calculating how much an S Corporation could help her save on self-employment taxes.

How Creating an S Corporation Can Reduce Your Self-Employmen. November 30, 2023 Read More

More from SmartAsset

Subscribe to our Newsletter Join 200,000+ other subscribers Subscribe Get in touch SmartAsset Get Social Legal Stuff

SmartAsset Advisors, LLC ("SmartAsset"), a wholly owned subsidiary of Financial Insight Technology, is registered with the U.S. Securities and Exchange Commission as an investment adviser. SmartAsset's services are limited to referring users to third party advisers registered or chartered as fiduciaries ("Adviser(s)") with a regulatory body in the United States that have elected to participate in our matching platform based on information gathered from users through our online questionnaire. SmartAsset receives compensation from Advisers for our services. SmartAsset does not review the ongoing performance of any Adviser, participate in the management of any user's account by an Adviser or provide advice regarding specific investments.

We do not manage client funds or hold custody of assets, we help users connect with relevant financial advisors.

This is not an offer to buy or sell any security or interest. All investing involves risk, including loss of principal. Working with an adviser may come with potential downsides such as payment of fees (which will reduce returns). There are no guarantees that working with an adviser will yield positive returns. The existence of a fiduciary duty does not prevent the rise of potential conflicts of interest.