Capital Gains on a Home Sale: What You Owe and How to Cut It

Selling your house? See how the $250,000/$500,000 exclusion works, how to calculate your taxable gain, and what inherited, rental and Michigan sales change.

Selling your house? See how the $250,000/$500,000 exclusion works, how to calculate your taxable gain, and what inherited, rental and Michigan sales change.

Most people who sell the home they live in owe no federal capital gains tax. If you owned and lived in the house for at least two of the last five years, the IRS lets you exclude up to $250,000 of gain, or $500,000 if you are married and file jointly. Tax only applies to profit above that amount, or to the whole gain if you do not qualify. This guide shows how to check where you stand, how to run the numbers, and what changes for inherited, rental, vacant and distressed homes.

HouseGoodbye
Compare Cash Offers for Your Home
HouseGoodbye lets Michigan homeowners compare as-is offers from vetted local cash buyers, with no required repairs or agent commissions.
Compare cash offers

TL;DR

  • Main home, two-year rule: own it and live in it 24 months or more in the 5 years before closing, and you can exclude up to $250,000 of gain ($500,000 for joint filers).
  • Gain is not the sale price. It is what you receive, minus selling costs, minus your adjusted basis (what you paid plus improvements).
  • Anything over the exclusion is taxed at 0%, 15% or 20% if you owned the home more than a year, plus Michigan income tax and possibly a 3.8% surtax for high earners.
  • Inherited homes usually get a stepped-up basis, so the taxable gain is often small. Rentals and second homes get no exclusion.
  • Selling as-is for cash does not change the tax rules. Your tax depends on price, basis and use, not on how fast you close.

Table of Contents

Do you have to pay capital gains tax when you sell your house?

Not necessarily. Capital gains tax applies to profit, not to the sale price, and the federal tax code carves out a large exclusion for a principal residence. Section 121 of the tax code says gain is excluded from income when you owned and used the property as your principal residence for periods adding up to two years or more during the five years ending on the sale date. The cap is $250,000.

Three outcomes are possible:

  1. Your gain is within the exclusion. You owe no federal capital gains tax.
  2. Your gain is above the exclusion. You owe tax only on the excess.
  3. You do not qualify. The entire gain is taxable.

If you exclude all of the gain, you generally do not need to report the sale unless you receive a Form 1099-S. If the closing agent sends you one, report the sale even when no tax is due.

Who qualifies for the $250,000 and $500,000 exclusion

The rules sit in IRS Publication 523. In plain terms:

  • Ownership test: you owned the home for at least 24 months during the 5 years before the sale.
  • Use test: you lived in it as your main home for at least 24 months in that same window.
  • Look-back rule: you generally cannot have excluded gain from another home sale during the previous two years.
  • Exceptions: the exclusion does not apply if you acquired the property in a 1031 exchange within the past five years or you are subject to expatriate tax.

The 24 months do not have to be consecutive. Twelve months in the house, a year away, and another twelve months back still counts, as long as it all falls within the five-year window.

Married couples

To get the full $500,000, you file jointly, and only one spouse needs to meet the ownership test, but each spouse must meet the use test. The use does not have to overlap or have happened during the marriage. If only one of you meets the use test, you are generally limited to $250,000.

Unmarried co-owners

If two unmarried people own a home together and file separately, each must meet both the ownership and use tests to exclude gain on their own share. The same source notes that your principal residence is decided on all the facts and circumstances, and the biggest factor is where you spend most of your time.

Divorce and separation

Divorce is one of the most common times a house gets sold, and the timing of the sale and who stays in the home can change how much you can exclude. Our guides on the home sale exclusion and divorce and on how to keep the $500,000 exclusion in a Michigan divorce walk through the common scenarios. Your tax preparer or divorce attorney should confirm the details for your case.

How to calculate your taxable gain

The IRS method has five steps, laid out in Publication 523:

  1. Sale price. All the money you receive, plus any debt the buyer takes on.
  2. Subtract selling expenses such as commissions, advertising, legal fees and mortgage points paid by the seller. The result is your amount realized.
  3. Total your basis. The purchase price plus settlement fees, improvements and special assessments.
  4. Adjust the basis. Subtract items like depreciation and casualty losses to get your adjusted basis.
  5. Subtract. Amount realized minus adjusted basis is your gain.

The IRS explains it this way: if the amount you realize exceeds your adjusted basis, you have a capital gain.

What counts as an improvement

Improvements that add value or extend the life of the home raise your basis: a new roof, an addition, a finished basement, a replaced furnace. Routine repairs and maintenance, like repainting a room or fixing a leaky faucet, generally do not. Keep receipts, permits and contractor invoices. Years later, they are what turn a tax bill into zero.

A worked example

Say you bought a Michigan home for $180,000 and paid $4,000 in closing costs. Over the years you added a $26,000 kitchen remodel and a $10,000 roof. You sell for $420,000 and pay $12,000 in selling costs.

Line Amount
Sale price $420,000
Selling expenses $12,000
Amount realized $408,000
Purchase price + closing costs $184,000
Improvements $36,000
Adjusted basis $220,000
Gain $188,000

A single filer who meets the two-year tests excludes up to $250,000, so the whole $188,000 is excluded. No federal tax is due. Change the sale price to $520,000 and the gain becomes $288,000, leaving $38,000 taxable for a single filer and nothing for a qualifying couple filing jointly.

To see how selling costs and loan payoff change what you walk away with, read our breakdown of seller net proceeds.

Losses

If you sell your main home for less than your adjusted basis, you cannot deduct the loss.

What rate applies to gain above the exclusion

How long you owned the home decides the rate. Short-term gains, from a home held a year or less, are taxed as ordinary income. Long-term gains, from a home held longer than a year, are taxed at 0%, 15% or 20%, depending on your taxable income. For 2026, the published thresholds put the 0% rate up to $49,450 for single filers and $98,900 for joint filers. The 15% rate runs up to $545,500 for single filers and $613,700 for joint filers, and 20% applies above that.

Filing status (2026) 0% up to 15% up to 20% above
Single $49,450 $545,500 $545,500
Married filing jointly $98,900 $613,700 $613,700

Two add-ons are worth knowing:

How much tax on a $400,000 gain?

A single filer who qualifies for the full exclusion has $150,000 of taxable gain, since $400,000 minus $250,000 is $150,000. A qualifying couple filing jointly owes nothing federally, because $400,000 is under their $500,000 limit. The tax on that $150,000 depends on your total income that year, which can land you in the 0%, 15% or 20% bracket. Most people with a gain that size fall in the 15% bracket.

Single and joint filer home sale gain comparison

Reporting the sale

Per Publication 523, you report the sale on Form 8949 and Schedule D if you have a taxable gain, if you received a Form 1099-S, or if you choose not to take the exclusion. Gain you fully exclude, with no 1099-S, generally goes unreported.

When the exclusion does not apply

Inherited homes

When you inherit a house, your basis generally steps up to its fair market value on the date of the owner’s death, which wipes out the gain that built up during the original owner’s life. If you sell soon after inheriting, the taxable gain is often small or zero, because the sale price is close to the stepped-up value. The Section 121 exclusion itself applies only if you live in the house yourself for two or more years.

That same source adds a planning point: a home gifted during life keeps the giver’s original basis, so the recipient can inherit a large built-in gain. Estates have other moving parts, and we cover them in our guide to common mistakes when selling inherited properties. If you are in Michigan, see how selling a house in probate works.

Inherited homes

Rental and second homes

The IRS is clear that the exclusion covers only your main home, and gain on any other home is taxable. For a rental, depreciation you claimed over the years is also taxed separately when you sell, usually at a higher rate than standard long-term rates. A tax professional should run those numbers before you list or accept an offer. If you are selling a rental with tenants in place, our rental property page explains how that works.

Foreclosure, short sales and distressed homes

Sales under financial pressure can carry extra tax paperwork, such as a Form 1099-C if a lender cancels debt. Keep every lender letter and tax form. If you are behind on payments, selling before foreclosure gives you more control over the outcome. See our pages on how to sell to avoid foreclosure and how to sell a house when you are behind on the mortgage. For anything involving canceled debt, talk to a CPA or enrolled agent first.

Ways to lower or avoid the tax, legally

  • Meet the two-year tests before you close. If you are close to 24 months, the timing of your closing date can be the difference between a $250,000 exclusion and none. Count the months carefully.
  • Track every improvement. A higher basis means a lower gain. Gather old closing statements, receipts and permits now.
  • Include all selling costs. Commissions, legal fees and seller-paid points reduce the amount realized.
  • File jointly when it helps. Spouses who each meet the use test get the doubled exclusion.
  • Watch your income in the sale year. The 0%, 15% and 20% brackets are based on taxable income, so a year with lower wages or higher deductions can mean a lower rate on any taxable gain.
  • Skip the 1031 trap. If you picked up a property through a 1031 exchange, the five-year wait matters before the exclusion applies.

These are not loopholes. They are the rules as written, so work through them with a tax professional before you sign a contract.

Perspective

Sellers often ask us whether a fast cash sale means a bigger tax bill. It does not. The IRS looks at your sale price, your basis and how long you lived in the house. It does not care whether you closed in a week or in ten weeks.

What speed does change is your carrying costs. Every month a house sits listed, you keep paying the mortgage, taxes, insurance and utilities. Those costs eat into what you keep, and they are not tax deductions on a main home. Our guide to holding costs shows how fast they add up.

This is why we built HouseGoodbye as a marketplace. Several vetted Michigan cash buyers bid on the same house, you see every offer, and you can walk away if none work. There are no agent commissions and no repairs, so you know your net number early, and that is the number your tax math starts from. Selling without commission is explained in our piece on why a cash sale eliminates agent fees.

Run your gain on paper before you accept anything, and bring that number to a CPA.

Bryan

Compare cash offers before you decide

If you are selling a Michigan house as-is, whether it is inherited, vacant, damaged or part of a divorce, we can show you what multiple local cash buyers will pay, with no obligation. Enter your address on our competing cash offers page and compare the numbers side by side. Our typical close is about 7 days, against about 73 days on the MLS, and there are no listing fees or commissions.

HouseGoodbye

If you want to start with the basics, see how we buy houses as-is. Selling an inherited home? Our inherited house page covers the process.

FAQ

Do I have to pay capital gains tax when I sell my house?

Only if your gain exceeds the exclusion or you do not qualify for it. If you owned and lived in the home for two of the last five years, up to $250,000 of gain ($500,000 for joint filers) is excluded from federal income. Michigan taxes capital gains as ordinary income, so check the state side too.

How can I avoid capital gains tax on a home sale?

Meet the ownership and use tests, document your improvements to raise your basis, and subtract all eligible selling costs. Married couples filing jointly can double the exclusion if both meet the use test. A CPA can check timing before you close.

How much capital gains tax will I pay on the sale of my home?

It depends on your gain, filing status and income. After the exclusion, long-term gain is taxed at 0%, 15% or 20%, and high earners may owe an extra 3.8%. Michigan adds its own income tax. Calculating your gain first, as in the worked example above, gives you the starting figure.

Do I owe capital gains tax on an inherited house?

Often very little. The basis generally steps up to the home’s value at the date of death, so only growth after that date is taxed when you sell. Selling soon after inheriting usually keeps the gain small. Ask the estate’s attorney or a tax professional for the date-of-death value.

Does selling for cash change my taxes?

No. The tax rules look at price, basis and how you used the home, not the buyer type or closing speed. A cash sale can reduce your costs, such as commissions and carrying costs, which can improve your net proceeds.

Sources

Get started

Ready to sell fast?

Get a free, no-obligation cash offer on your house. Request your cash offer or fill out the form below—buyers will compete to give you their best offer, usually within 24 hours.

Step 1: Get a Cash Offer on Your House

No obligation. Takes 2 minutes.