Capital gains tax on a home sale is the federal tax on the profit you make when you sell your house for more than your adjusted cost. The good news is that many sellers owe nothing. The IRS lets you exclude up to $250,000 of gain, or up to $500,000 if you file a joint return, when you sell your main home and meet a few tests.
This guide explains who qualifies, how to figure your gain, which tax rates apply to any taxable part, and how to report the sale. We wrote it for homeowners in Northwest Indiana, so we also cover how Indiana treats the gain. The goal is to help you plan before you list, not after you close.
Quick Summary
For most sellers, capital gains tax on home sale profit is zero. You can exclude up to $250,000 of profit ($500,000 for married couples filing jointly) if you owned and lived in the home for at least 2 of the last 5 years. Any gain above the limit is taxed as a long-term capital gain, usually at 0%, 15%, or 20%, and high earners may also owe a 3.8% surtax. A loss on your personal home is not deductible.
- The exclusion: up to $250,000 of gain for one filer and up to $500,000 for joint filers.
- The tests: you must pass the ownership test, the use test, and the look-back test.
- The math: selling price minus selling expenses, minus your adjusted basis, equals your gain.
- The rates: long-term gain above the exclusion is taxed at 0%, 15%, or 20% depending on taxable income.
- Reporting: if you receive Form 1099-S, you must report the sale even when the gain is fully excluded.
Quick rule of thumb: subtract what you paid and what you put into the house from what you will net at closing. If the result is under $250,000 ($500,000 for a couple) and you have lived there 2 of the last 5 years, you likely owe nothing. If it is close, or if you rented part of the home, run the numbers before you sign a contract.
- What is capital gains tax on a home sale?
- How much of your home sale gain is tax free?
- Who qualifies for the home sale exclusion?
- How do you figure your gain?
- What counts toward your cost basis?
- What tax rate applies to the taxable part?
- Do you owe the 3.8% net investment income tax?
- What if you sell before living there two years?
- Which situations change the result?
- How do you report a home sale?
- How does Indiana tax a home sale gain?
- What mistakes should you avoid?
- When should you talk to a CPA before selling?
- Frequently asked questions
- What is the next step?
- About the author
What Is Capital Gains Tax on a Home Sale?
A capital gain is the profit when you sell a capital asset for more than your adjusted basis. The IRS treats a home as a capital asset, just like stocks or bonds. If you hold the home for more than one year, the profit is a long-term capital gain.
Two points surprise many sellers. First, the tax only applies to your profit, not to the full sale price. Second, a special home sale rule can remove most or all of that profit from your income.
- Gain: you sold for more than your adjusted basis, so you have a profit to measure.
- Loss: you sold for less, but the IRS does not let you deduct a loss on a personal home.
- Short-term gain: if you owned the home one year or less, the gain is taxed at ordinary income rates.

How Much of Your Home Sale Gain Is Tax Free?
You can exclude up to $250,000 of gain if you file as single or head of household. You can exclude up to $500,000 if you file jointly with your spouse. The IRS calls this the home sale exclusion, and it comes from Section 121 of the tax code.
The exclusion applies to the sale of your main home only. A main home can be a house, condo, co-op, mobile home, or houseboat. You can have only one main home at a time. If you own more than one place, the IRS looks at facts such as where you spend the most time, your mailing address, your voter registration, and your driver’s license.
A second home, vacation home, or rental property does not qualify for this exclusion on its own.
Who Qualifies for the Home Sale Exclusion?
You qualify for the full exclusion when you pass three tests. Each test looks at a window of time that ends on the closing date.
- Ownership test: you owned the home for at least 24 months during the 5 years before the sale. On a joint return, only one spouse has to meet this test.
- Use test: you lived in the home as your main home for at least 24 months during the same 5 years. On a joint return, both spouses must meet this test. The 24 months do not have to be one block.
- Look-back test: you did not exclude gain from another home sale during the 2 years before this sale. You can use the exclusion only once every 2 years.
You can meet the ownership and use tests in different 2-year periods, as long as both fall inside the 5-year window. Short absences such as vacations count as time you lived there, even if you rented the home out for a short period.

How Do You Figure Your Gain?
You figure your gain by subtracting your adjusted basis from your amount realized. The amount realized is the selling price minus your selling expenses. Follow these steps:
- Find your selling price. This is everything you received for the home. Form 1099-S, if you get one, shows the gross proceeds.
- Subtract selling expenses. These include agent commissions, advertising, legal fees, and loan charges you paid that were normally the buyer’s cost.
- Find your adjusted basis. Start with what you paid, add closing costs from the purchase and the cost of improvements, and subtract certain adjustments.
- Subtract basis from amount realized. The result is your gain or loss.
- Apply your exclusion. Subtract $250,000 or $500,000 if you qualify. Anything left is taxable.
What do the numbers look like for real sellers?
The examples below use made-up figures. They show how the exclusion can erase a large gain, and when a taxable amount remains.
| Seller | Amount realized | Adjusted basis | Gain | Exclusion limit | Taxable gain |
|---|---|---|---|---|---|
| Married couple: sold for $450,000, paid $27,000 in selling costs, bought for $200,000, added $30,000 of improvements | $423,000 | $230,000 | $193,000 | $500,000 | $0 |
| Married couple: sold for $950,000, paid $55,000 in selling costs, bought for $250,000, added $50,000 of improvements | $895,000 | $300,000 | $595,000 | $500,000 | $95,000 |
| Single seller: sold for $380,000, paid $22,000 in selling costs, bought for $180,000, added $20,000 of improvements | $358,000 | $200,000 | $158,000 | $250,000 | $0 |
| Single seller: sold for $640,000, paid $38,000 in selling costs, bought for $150,000, added $10,000 of improvements | $602,000 | $160,000 | $442,000 | $250,000 | $192,000 |
In every case, the buyer’s price is not the number that matters. What matters is the profit after selling costs and your basis, compared with your exclusion limit.
What Counts Toward Your Cost Basis?
Your cost basis is the total amount you have invested in the home. A higher basis means a smaller gain, so it pays to track it. Basis usually includes these items:
- The purchase price, including your down payment and the amount you borrowed.
- Purchase closing costs, except financing-related costs.
- Improvements that last, such as an addition, a new roof, or a finished basement.
- Special assessments for local improvements that are not simply maintenance.
- Repairs after damage, when you fix damage to the home or the land.
Routine maintenance and repairs, such as painting a room or fixing a faucet, do not add to basis. If you inherited the home or received it as a gift, your basis follows different rules, so check with your CPA before you estimate your gain.
Keep receipts for every improvement for as long as you own the home. Our record retention guide explains how long to keep tax records.

What Tax Rate Applies to the Taxable Part?
Any gain above your exclusion is a long-term capital gain if you owned the home more than one year. Long-term gains are taxed at 0%, 15%, or 20%, depending on your total taxable income. The table shows the 2026 cutoffs for the two lower rates.
| Filing status | 0% rate up to taxable income of | 15% rate up to taxable income of | 20% rate |
|---|---|---|---|
| Single | $49,450 | $545,500 | Above $545,500 |
| Married filing jointly | $98,900 | $613,700 | Above $613,700 |
| Head of household | $66,200 | $579,600 | Above $579,600 |
These figures come from the IRS inflation adjustments for tax year 2026. They apply to your total taxable income, which includes the taxable part of your home gain. The IRS adjusts them each year, so check the current numbers when you file.
A few gains are taxed at higher rates. The part of a gain tied to depreciation you claimed on real property, called unrecaptured Section 1250 gain, is taxed at a maximum of 25%.
Do You Owe the 3.8% Net Investment Income Tax?
The net investment income tax is an extra 3.8% tax on investment income for higher earners. It applies to the lesser of your net investment income or the amount your modified adjusted gross income exceeds a threshold.
- $250,000 for married filing jointly or a qualifying surviving spouse.
- $200,000 for single or head of household.
- $125,000 for married filing separately.
The part of your home gain that you exclude is not subject to this tax. Only the taxable part counts, so a large gain on a high-income return may still trigger it. Form 8960 is used to compute the tax.
What If You Sell Before Living There Two Years?
You may still get a partial exclusion if the main reason for the sale was a work move, a health issue, or an unforeseeable event. A partial exclusion is a smaller exclusion amount, based on how long you owned and lived in the home compared with the full 2 years.
- Work-related move: a new job location at least 50 miles farther from the home than your old one.
- Health-related move: a move to get or provide care for you or a family member, or on a doctor’s advice.
- Unforeseeable events: a disaster or casualty loss, death, divorce or legal separation, job loss that qualifies for unemployment, or multiple births from one pregnancy.
The IRS also looks at facts and circumstances when your situation does not match a listed event. If you are close to a move, a CPA can help you document the reason before closing.
Which Situations Change the Result?
Several common situations change how the exclusion works. The table lists the ones we see most often and what the IRS rule says.
| Situation | What the IRS rule says | What to do |
|---|---|---|
| Home office or rental use after May 6, 1997 | You cannot exclude the part of gain equal to depreciation allowed or allowable after that date. It may be recaptured and taxed. | Gather depreciation records and tell your CPA before you sell. |
| Surviving spouse | You may keep the $500,000 limit if you sell within 2 years of your spouse’s death and have not remarried. | Confirm the date of death and sale date. |
| Divorce or separation | A home transferred between spouses as part of a divorce settlement generally creates no gain or loss at transfer. | Keep the divorce decree and the original purchase records. |
| Military, Foreign Service, intelligence, or Peace Corps duty | You may suspend the 5-year test period for up to 10 years while on qualified extended duty. | Make the election on the return for the year of sale. |
| Second home or vacation home | The exclusion applies to your main home only. | Review which property is your main home before you list. |
| Installment sale | If the buyer pays over time, the installment method may apply and the exclusion is still available. | Ask your CPA how to report each year’s payment. |
How Do You Report a Home Sale?
You must report the sale in two cases. First, if you receive Form 1099-S, which shows the sale proceeds, you report the sale even when you exclude all of the gain. Second, if you cannot exclude all of the gain, you report the taxable part.
- Form 8949 lists the sale of the home as a capital asset.
- Schedule D of Form 1040 summarizes your capital gains and losses.
- Form 8960 applies if the net investment income tax is owed.
If you have a taxable gain, you may also need to make estimated tax payments for the year of the sale. Waiting until April can lead to a surprise bill and a possible penalty.
Bring your closing statement, your original purchase papers, and your improvement receipts to your tax meeting. Our tax preparation checklist lists other documents to bring.
How Does Indiana Tax a Home Sale Gain?
The Indiana individual return starts with your federal adjusted gross income. That means any taxable gain from your home sale flows into your Indiana return, and any gain you excluded federally is not part of the starting number. Indiana then applies its own add-backs, deductions, and exemptions.
The Indiana individual income tax rate is 3% on the 2025 return and 2.95% for 2026. Many Indiana counties also charge a county income tax. If your gain is fully excluded on your federal return, you generally have no Indiana income tax on that sale either. If part of it is taxable, plan for the state and county tax in addition to the federal tax.
What Mistakes Should You Avoid?
Most problems come from missing records or a wrong assumption. Watch for these:
- Using the sale price as your gain. You are taxed on profit, not on the full price.
- Forgetting improvements. A missing receipt can cost you a higher basis.
- Selling days before the 2-year mark. A few weeks can decide whether you qualify for the full exclusion.
- Ignoring rental or home office history. Depreciation can create taxable gain even when you qualify.
- Skipping the return when you got a 1099-S. The sale must be reported.
- Counting a second home. The exclusion covers only your main home.
When Should You Talk to a CPA Before Selling?
You can often estimate your gain yourself. A CPA adds the most value before you list the home, when you can still change the timing. Consider help in these cases:
- Your estimated gain is near or above your exclusion limit.
- You are selling just before the 2-year mark.
- You used part of the home for business or as a rental.
- You inherited the home or received it as a gift.
- You are divorcing, widowed, or on military or similar duty.
- You expect a large sale to push your income into a higher bracket.
Our tax services include planning and return preparation for individuals. If you are comparing firms, read how to choose a CPA in Northwest Indiana.
Frequently Asked Questions
How much tax do you pay when you sell a house?
It depends on your gain, not the sale price. If you qualify, the first $250,000 of gain ($500,000 on a joint return) is excluded. You pay tax only on gain above that limit, usually at 0%, 15%, or 20%.
How long do you have to live in a house to avoid capital gains?
You generally need to have owned the home and lived in it as your main home for at least 24 months during the 5 years before the sale. The 24 months do not have to be in a row.
Is there a $250,000 exclusion for everyone?
No. The $250,000 limit applies to one filer, and $500,000 applies to joint filers who both meet the use test. You also must pass the ownership and look-back tests, and the home must be your main home.
Do I pay capital gains if I buy another house?
Buying another home does not change the exclusion rules. The exclusion applies whether or not you reinvest. Your gain is measured on the sale you made, and any gain above the limit remains taxable.
Can I deduct a loss when I sell my home for less than I paid?
No. The IRS does not allow a deduction for a loss on the sale of a personal home. A loss also does not create a tax bill.
Do I have to report the sale if all my gain is excluded?
Yes, if you receive Form 1099-S. You must report the sale even when the gain is fully excludable. If you do not get a 1099-S and the entire gain is excluded, you generally do not need to report it.
What if I use part of my home for a business?
You may owe tax on gain equal to depreciation claimed or allowable after May 6, 1997. The rest of the gain can still qualify for the exclusion if you meet the tests. Bring your depreciation records to your CPA.
Does Indiana tax the gain on my home sale?
Indiana starts from your federal adjusted gross income, so a taxable federal gain flows into the Indiana return. A fully excluded federal gain is generally not part of Indiana income either. County income tax may also apply.
What Is the Next Step?
Thinking about selling your home? Tell us when you bought it, what you have spent on improvements, and when you plan to close. We will help you estimate your gain and plan the timing. Call us at 219.924.3450 or contact our team.
You can also learn more about our tax services for individuals.
About the Author
McMahon & Associates CPAs is a locally owned accounting firm at 10010 Calumet Avenue, Munster, Indiana 46321. The firm was established in 1971 and serves Northwest Indiana and Chicago’s South Suburbs. Our team provides accounting and bookkeeping, payroll, tax, consulting, and audit services to businesses and individuals. Call 219.924.3450 or visit our team page to meet the people behind the work.
