Skip to content
AAPL209.08-2.06%
MSFT447.68-0.31%
NVDA122.44+0.55%
AMZN197.66-0.06%
GOOGL177.65-0.90%
META500.15-0.73%
BRK.B451.71+0.96%
LLY815.54-0.58%
AVGO164.92+0.62%
TSLA255.15+2.37%
JPM207.41+0.73%
V275.38-0.19%
XOM110.56-2.85%
UNH494.84-1.17%
MA463.64+1.26%
JNJ147.17-0.42%
PG167.30-0.17%
HD345.70+0.46%
COST835.79-1.19%
ORCL138.35-1.50%
AAPL209.08-2.06%
MSFT447.68-0.31%
NVDA122.44+0.55%
AMZN197.66-0.06%
GOOGL177.65-0.90%
META500.15-0.73%
BRK.B451.71+0.96%
LLY815.54-0.58%
AVGO164.92+0.62%
TSLA255.15+2.37%
JPM207.41+0.73%
V275.38-0.19%
XOM110.56-2.85%
UNH494.84-1.17%
MA463.64+1.26%
JNJ147.17-0.42%
PG167.30-0.17%
HD345.70+0.46%
COST835.79-1.19%
ORCL138.35-1.50%
Housing

Do You Pay Tax When You Sell Your House? Home-Sale Capital Gains

Selling your home can leave you with a large gain — and the fear of a large tax bill. The good news is that most people who sell their main home pay nothing at all, thanks to a generous exclusion, but the rules have traps for second homes, rentals and short stays. Here is how capital gains tax on a home sale works, how much you can exclude, and when you actually owe.

IM
Ivan Mártir
Finance enthusiast & founder
Updated July 26, 2026 · 13 min read
One person handing over the keys to a house to another after a sale, illustrating capital gains tax when you sell your home.

Do you pay tax when you sell your house?#

For most people, selling their home is the biggest single transaction of their lives, so the worry is natural: after years of rising prices, will a huge chunk of the gain go to the taxman? The reassuring answer, at least in the United States, is that the great majority of home sellers pay no capital gains tax at all, because the law lets you shelter a very large amount of profit on your main home.

But that generosity has conditions and sharp edges, and the rules change completely for a second home, a rental, or a place you have not lived in long enough. This guide explains how capital gains tax on a home sale works, how much gain you can exclude, when you genuinely owe, and how to calculate the number that matters. As always, this is general education rather than tax advice, and the rules differ sharply from one country to the next.

  • Most main-home sales are tax-free — a large gain exclusion covers them.
  • You can exclude $250,000 of gain ($500,000 for a married couple).
  • You must pass the 2-of-5-year test — owned and lived in as your main home.
  • Second homes and rentals get no exclusion — the full gain is taxable.

The big exclusion that covers most sellers#

The heart of the US rules is the home-sale exclusion under Section 121 of the tax code, set out in the overview of capital gains tax. If the home you are selling is your main home, you can exclude up to $250,000 of the gain from tax if you are single, or up to $500,000 if you are married and file jointly. Only the gain above that amount is potentially taxable.

To put that in perspective, a couple who bought for $300,000 and sell for $750,000 have a $450,000 gain — and owe nothing, because it falls entirely within the $500,000 exclusion. This is why the sale of a long-held family home so often produces no tax at all. The exclusion is not indexed to inflation, though, so over decades of price growth more sellers are starting to bump against the ceiling.

Advertisement

The two-of-five-year test#

The exclusion is not automatic; you have to qualify by meeting the ownership-and-use test. In broad terms, you must have owned the home and used it as your main home for at least two of the five years immediately before the sale. The two years do not have to be continuous, and short absences still count as use.

There is also a frequency limit: you generally cannot claim the exclusion more than once every two years. These rules are designed to reserve the break for genuine homes rather than quick flips, so a property you bought and sold within a year, or a home you never really lived in, will usually not qualify. If you are planning a sale, checking the calendar against this test can be worth a great deal.

When you do owe: gain above the exclusion#

If your gain exceeds the exclusion, only the excess is taxed, and it is taxed as a long-term capital gain provided you owned the home for more than a year, at the favourable rates of 0%, 15% or 20% depending on your income. High earners may also face an additional 3.8% net investment income tax on top.

So the couple with a $450,000 gain owe nothing, but a couple with an $600,000 gain would exclude $500,000 and pay long-term capital gains tax on the remaining $100,000. The rate is far gentler than ordinary income tax, and because it applies only to the portion above the exclusion, even sellers who do owe usually owe far less than they feared.

Advertisement

Calculating your gain the right way#

The gain is not simply your sale price minus what you paid; it is the sale price minus your cost basis, and getting the basis right can save you a lot. Your basis starts at the purchase price and increases with the cost of capital improvements over the years — a new roof, an addition, a renovated kitchen — which is why keeping receipts matters. You also subtract selling costs such as the agent’s commission.

A worked example: buy for $300,000, spend $70,000 on improvements, sell for $600,000 with $36,000 in selling costs, and your gain is $600,000 − $36,000 − $370,000 = $194,000 — comfortably inside a couple’s exclusion. The official IRS guidance on selling your home walks through the calculation, and good records of every improvement are the single best way to shrink a taxable gain.

Second homes, rentals and depreciation recapture#

The exclusion is only for your main home. A second home or a pure investment property does not qualify, so the entire gain is a taxable capital gain when you sell. This is a common and expensive surprise for people who assumed the tax-free rule applied to any property they own.

Rentals carry an extra sting. If you claimed depreciation while renting the property out, that depreciation is "recaptured" on sale and taxed at a rate of up to 25%, even if the rest of your gain is covered. Converting a former home into a rental, or a rental into a home, creates complicated part-taxable, part-excluded situations, so anyone selling a property that has been rented should map the numbers carefully or take advice.

A partial break for life changes#

What if you have to sell before hitting the two-year mark? The law makes room for real life. If you sell early because of a change of workplace, a health problem, or certain unforeseen circumstances — a divorce, a job loss, a birth of multiples — you may still qualify for a partial exclusion, prorated for the time you did meet the test.

So a single person who lived in a home for one of the required two years before an out-of-state job forces a sale might exclude around half of the usual $250,000. This safety valve means an early, genuinely forced sale is rarely the tax disaster people fear, but you do need the qualifying reason and the arithmetic to back it up.

Reporting the sale and keeping records#

When a home is sold, the closing agent often issues a Form 1099-S reporting the proceeds to the tax authorities, so the sale is on the record whether or not you owe. If your entire gain is covered by the exclusion and you receive no 1099-S, you may not need to report it at all; if you do owe, or receive the form, the sale goes on your return.

Either way, the golden rule is records. Keep the original purchase documents, receipts for every improvement, and the closing statements from both buying and selling, ideally for years after the sale. Reconstructing a decade of home improvements from memory under audit is miserable; a simple folder of receipts is the cheapest insurance in tax there is.

Common home-sale tax mistakes#

A handful of avoidable errors cause most of the trouble, so watch for these.

  • Assuming every property qualifies — the exclusion is only for your main home.
  • Losing improvement receipts, which would have raised your basis and cut the gain.
  • Selling months short of the two-year mark and forfeiting the whole exclusion.
  • Forgetting depreciation recapture on a home that was ever rented out.
  • Not reporting a sale when a 1099-S was issued or gain exceeds the exclusion.

Selling, buying and the bigger picture#

A home sale rarely happens in isolation; usually you are moving, which means buying again or renting, so it pays to see the whole move as one financial event. Whether you buy or rent next is its own decision, weighed in our guide to renting versus buying a home, and the proceeds of a tax-free sale can transform what you can afford next.

If you are trading up, the gain you keep tax-free becomes the deposit on the next place, which ties into how much you can borrow and what a lender will offer, as covered in how much house you can afford. Planning the sale and the purchase together, rather than in sequence, usually produces a better result than treating them as separate problems.

Home-sale tax versus other property taxes#

It helps to keep the home-sale tax separate in your mind from the other taxes on property, because they are often confused. The capital gains tax here is a one-off on the profit when you sell, whereas the annual property tax you pay while you own is a different thing entirely, and the general rules on capital gains tax cover assets like shares as well as homes.

Coordinating a home sale with the rest of your tax picture can also open up savings, and it is worth reading our guide on how to reduce your taxes before a big sale. Timing a sale across tax years, harvesting other losses, and making sure your basis is fully documented are all levers that can lower the bill when a sale does produce a taxable gain.

Canada and beyond: it differs by country#

Cross a border and the logic changes. Canada is even more generous on your home: the principal residence exemption wipes out the *entire* gain with no dollar cap, one home per family per year, though since 2016 you must still report the sale. Other property is taxed on part of the gain under Canada’s capital-gains inclusion rules.

Elsewhere the structures differ again — some countries exempt the main home entirely, some tie the break to how long you owned it, and some add a separate local tax on the land’s value. If you sell property in more than one country, or you are not resident where the property sits, never assume the rules travel with you; check the local law, because the difference on a big gain can be enormous.

The bottom line on selling your home#

For most American homeowners, capital gains tax on a home sale is a worry that never materialises, because the $250,000 or $500,000 exclusion swallows the whole gain. The real work is qualifying — meeting the two-of-five-year test — and keeping the records that prove your basis so that, if you do owe, the number is as small as it should be.

Checking the home-sale rules in the tax code can help you sense-check a sale before you sign, and pairing the move with a clear budget keeps the proceeds working for your next step rather than slipping away. Understand the exclusion, watch the traps around rentals and second homes, and a home sale becomes one of the most tax-friendly windfalls in personal finance.

#Housing#Capital Gains Tax#Real Estate#Taxes#Personal Finance
Advertisement

Frequently asked questions

Frequently asked questions

In most cases, no. If the property is your main home and you meet the requirements, US law lets you exclude a large amount of the gain from tax entirely: up to $250,000 of profit if you are single, or up to $500,000 if you are married and file a joint return. Only gain above that exclusion is potentially taxable, so the great majority of ordinary home sales produce no capital gains tax at all. To qualify, you must pass the ownership-and-use test — you must have owned the home and used it as your main home for at least two of the five years before the sale — and you generally cannot have used the exclusion on another home in the past two years. The catch is that this break applies only to your main home. If you are selling a second home, a vacation property, or a pure investment property, there is no exclusion and the whole gain is taxable. And if the home was ever rented out and you claimed depreciation, that depreciation is recaptured and taxed separately when you sell. For a typical family selling the home they have lived in for years, though, the exclusion usually covers everything, and the feared tax bill simply does not appear.

Educational content — not personalised financial advice.