The basic calculation: sale price minus what you paid, minus improvements

Capital gains tax on a home sale starts with three numbers: what you sold it for, what you paid for it, and the cost of improvements you made. Subtract your purchase price and improvement costs from the sale price. That result is your capital gain. You only owe tax on the gain, not the full sale price.

The calculation looks like this: Sale Price − Purchase Price − Improvement Costs = Capital Gain. If you bought for $300,000, spent $50,000 on a new roof and kitchen, and sold for $500,000, your capital gain is $150,000. That $150,000 is what gets taxed, not the $500,000 sale price.

You will also subtract selling costs — real estate agent commissions, title insurance, attorney fees, and inspection costs — from the sale price before calculating the gain. These reduce the amount you owe tax on.

Key Takeaways

  • Your capital gain is the sale price minus your purchase price, minus the cost of improvements and selling expenses.
  • Most homeowners owe no federal tax on home sales because of the exclusion: $250,000 if single, $500,000 if married filing jointly, as long as you owned and lived in the home two of the last five years.
  • Improvements that add value (a new roof, kitchen, bathroom) count toward your cost basis, but maintenance and repairs do not.
  • State and local taxes on home sales vary widely; some states have no capital gains tax, while others tax it like ordinary income.
  • You report the sale on Form 8949 and Schedule D, even if you owe no tax, because the exclusion must be documented.

What counts as an improvement versus a repair

The difference between an improvement and a repair matters because only improvements reduce your taxable gain. An improvement adds value to the home or extends its useful life. A repair keeps the home in working condition but does not add value.

A new roof is an improvement. Repairing shingles on an existing roof is a repair. Adding a deck is an improvement. Painting the existing deck is maintenance. A new HVAC system is an improvement. Servicing the existing system is a repair. A kitchen renovation with new cabinets and counters is an improvement. Replacing a broken cabinet door is a repair.

The IRS does not publish a single list of what qualifies, so the line can be unclear. If you are uncertain, keep the receipts and documentation anyway. When you file, you will list the improvements you claim, and if the IRS questions them, you will have proof of what was done and what it cost.

The federal exclusion: $250,000 or $500,000

Most homeowners do not owe federal capital gains tax on a home sale because of the Section 121 exclusion. If you are single, you can exclude $250,000 of gain from tax. If you are married filing jointly, you can exclude $500,000. This means if your capital gain is less than the exclusion, you owe no federal tax.

To use the exclusion, you must have owned the home and lived in it as your main residence for at least two of the five years before the sale. The two years do not have to be consecutive. If you owned it for three years and lived there for two, you may have access to. If you owned it for five years but lived there for only one, you do not.

You can use the exclusion only once every two years. If you sold a home and used the exclusion two years ago, you can use it again now. If you sold one year ago, you cannot use it on a second home sale until two years have passed from the first sale.

When your gain exceeds the exclusion

If your capital gain is larger than the exclusion, you owe federal tax on the excess. A single person with a $400,000 gain can exclude $250,000, leaving $150,000 subject to tax. A married couple with a $600,000 gain can exclude $500,000, leaving $100,000 subject to tax.

The tax rate on long-term capital gains (gains from assets held more than one year) is 0%, 15%, or 20%, depending on your income. These rates are lower than ordinary income tax rates. The rate you pay depends on your total income for the year, not just the home sale gain. You will need to calculate your total taxable income including the gain to know which rate applies.

If you owned the home for one year or less, the gain is taxed as ordinary income at your regular tax rate, which is usually higher. Most home sales do not fall into this category because people typically own homes longer than a year.

State and local taxes on home sales

Federal tax is only part of the picture. Your state and local government may also tax the gain. Some states have no capital gains tax at all. Others tax capital gains as ordinary income. A few states have a separate capital gains tax that applies only to investment income, not home sales.

States with no capital gains tax include Alaska, Florida, Nevada, South Dakota, Tennessee, Texas, Washington, and Wyoming. If you live in one of these states, you owe no state capital gains tax on the home sale, though you may owe other state taxes like income tax on other sources.

States that tax capital gains as ordinary income include California, New York, and most others. If your state has a 10% income tax rate and your capital gain is $100,000, you would owe $10,000 in state tax on that gain (before any deductions or credits). Some cities and counties also impose local taxes on home sales, which vary by location.

How to report the sale on your tax return

You report a home sale on Form 8949, Sales of Capital Assets, and then transfer the information to Schedule D, Capital Gains and Losses. Even if you owe no tax because of the exclusion, you must file these forms to document that you claimed it.

On Form 8949, you list the sale date, the address of the property, your cost basis (purchase price plus improvements minus selling costs), the sale price, and the gain or loss. You indicate whether you are claiming the Section 121 exclusion. The form asks for the date you acquired the property and the date you sold it so the IRS can verify you meet the ownership and use requirements.

Schedule D summarizes your capital gains and losses for the year. If you have other investment sales, they go on the same form. The total determines whether you owe tax and at what rate. If you use tax software, it will guide you through these forms. If you file by hand or work with a tax preparer, they will complete them based on the information you provide.

Frequently Asked Questions

Do I have to report the sale if I owe no tax because of the exclusion?

Yes. You must file Form 8949 and Schedule D even if your gain is fully covered by the exclusion. The IRS needs to see that you claimed it and that you meet the requirements. Filing these forms protects you if the IRS ever questions the sale.

What if I inherited the home from a parent?

Inherited property receives a step-up in basis. Your cost basis becomes the fair market value on the date of death, not what your parent paid. If your parent bought for $200,000 and it was worth $400,000 when they died, your basis is $400,000. If you sell shortly after for $410,000, your gain is only $10,000. You still need to own and live in it two of the five years before the sale to use the exclusion.

Can I use the exclusion if I rented out part of the home?

The exclusion applies only to the portion you used as your main residence. If you rented out one room or a basement apartment, that portion of the gain is taxable. You must calculate what percentage of the home was rental space and explore the exclusion only to the owner-occupied portion. The rental portion is taxed at capital gains rates on the gain.

What if I sold the home at a loss?

You cannot deduct a loss on the sale of your main residence. If you bought for $300,000 and sold for $250,000, the $50,000 loss cannot be used to offset other income or gains. The loss straightforward disappears for tax purposes. You still must report the sale on Form 8949 and Schedule D to show there was no gain.

Do I need to report the sale if I sold it for less than I paid?

You do not have to report a loss on your main residence, but you may want to file the forms anyway to document the transaction. If you ever face an audit, having the paperwork shows you were transparent about the sale. Check with a tax preparer about whether filing is necessary in your situation.