Capital Gains on a Home Sale: What You Owe and How to Reduce It
Most people know that selling a home for more than you paid is a good thing. What fewer people think about is that the IRS has an opinion on that profit, and in some cases they want a share of it.
Capital gains tax on a home sale is real, but it is also manageable when you understand the rules ahead of time. The federal tax code includes a significant exclusion specifically for homeowners that protects most sellers from owing anything at all. But the exclusion has conditions, and there are situations where you can still owe even when you think you are fully covered.
This post walks through exactly how capital gains tax works on a home sale, how to calculate what you actually owe, and what you can do before you sell to reduce your exposure. And as always, consult a qualified tax professional before making any decisions based on your specific situation.
What Is Capital Gains Tax on a Home Sale?
When you sell an asset for more than you paid for it, the profit is called a capital gain. The IRS taxes that gain. When the asset is your home, the result is capital gains tax on a home sale.
The key word is "gain." You do not owe tax on the full sale price. You owe tax only on the profit, which is the difference between what you sold for and what you paid, adjusted for improvements and other factors. Understanding that distinction is the foundation of the whole calculation.
Short-Term vs. Long-Term Capital Gains Rates
The federal rate that applies to your gain depends on how long you owned the property.
Short-term capital gains apply when you sell a property you have owned for one year or less. These gains are taxed as ordinary income at your regular federal income tax rate, which can be as high as 37% depending on your overall income.
Long-term capital gains apply when you have owned the property for more than one year. The federal long-term rates are 0%, 15%, or 20%, depending on your taxable income and filing status.
Most homeowners who have lived in their home for several years will qualify for long-term rates, and the Section 121 exclusion described below will likely eliminate the federal tax entirely on the first $250,000 or $500,000 of gain.
The Section 121 Exclusion: The Rule That Protects Most Sellers
The most important piece of the capital gains puzzle for homeowners is the Section 121 exclusion. Under this provision of the federal tax code, you can exclude up to $250,000 of capital gains from the sale of your primary residence from federal income tax. If you are married and filing jointly, that exclusion doubles to $500,000.
Per IRS Publication 523, the exclusion rules are:
You must have owned the home for at least two of the last five years before the sale date
You must have used the home as your primary residence for at least two of the last five years before the sale date
You cannot have claimed this exclusion on another home sale within the past two years
The two-year ownership and use periods do not need to be consecutive. You just need to satisfy both requirements within the five-year window preceding the sale.
Example: You purchased your home eight years ago for $175,000 and sell it today for $430,000. Your gross gain is $255,000. If you are single, you can exclude $250,000 of that gain and will owe federal capital gains tax only on the remaining $5,000. If you are married filing jointly, the full $255,000 gain falls within the $500,000 exclusion, and you owe no federal capital gains tax at all.
Per IRS Topic 701, this exclusion applies to your main home and cannot be used for investment properties or vacation homes.
How to Calculate Your Capital Gain
The taxable gain is not simply the sale price minus what you paid. The actual calculation involves your adjusted basis in the property, and getting this right can significantly reduce what you owe.
Your Starting Basis
Your basis begins with the purchase price of the home, plus certain closing costs you paid when you bought it. Many closing costs do count toward your basis, including title insurance fees and recording fees paid at purchase. Loan origination fees and prepaid interest typically do not.
What Increases Your Basis (and Reduces Your Taxable Gain)
Permanent improvements to the property increase your basis. This matters because a higher basis means a smaller gain when you sell.
Qualifying improvements include work that adds value to the home, extends its useful life, or adapts it to new uses. Examples include:
Adding a room, finishing a basement, or converting a garage
Installing a new roof
Replacing the HVAC system or water heater
Adding a deck, patio, or in-ground pool
A full kitchen or bathroom remodel
Routine maintenance does not count. Painting, cleaning, fixing a leaky faucet, or replacing a broken window are maintenance items, not capital improvements, and they do not increase your basis.
Keep records. Most homeowners never track their improvement costs carefully, and it costs them at tax time when they sell.
What Decreases Your Basis
Certain events reduce your basis and therefore increase your eventual taxable gain:
Depreciation you claimed if you rented the property, even partially, during your ownership
Casualty loss deductions you previously took on the property
Certain tax credits you claimed for energy-efficient improvements
If you ever rented out part or all of your home, the depreciation claimed during that period will factor into your basis calculation and may also affect how much of your gain qualifies for the exclusion.
Selling Costs That Reduce Your Taxable Gain
Beyond your adjusted basis, you can subtract legitimate selling costs from the sale price when calculating the gain. These include:
Real estate agent commissions
Attorney fees directly related to the sale
Title insurance paid by the seller
Transfer taxes and recording fees paid at closing
Advertising and staging expenses
The full calculation:
Adjusted Basis = Purchase Price + Buying Closing Costs + Capital Improvements, minus any Depreciation Recapture
Gain = Sale Price, minus Selling Costs, minus Adjusted Basis
Situations Where You May Still Owe Tax
The Section 121 exclusion is powerful, but there are circumstances where you may still owe capital gains tax, or at least part of it.
Your Gain Exceeds the Exclusion
If you are a single filer and your gain is $350,000, the first $250,000 is excluded and you will owe federal capital gains tax on the remaining $100,000. If your gain is large enough, the exclusion does not eliminate the entire bill.
You Did Not Meet the Two-Year Requirement
If you have owned or lived in the home for less than two years, you do not qualify for the full exclusion. A partial exclusion may be available if you sold due to a job change, health reasons, or certain other unforeseen circumstances, but specific IRS criteria must be met to use it.
You Used Part of the Home for Business or Rental
If you claimed depreciation on a home office, rented a room, or operated a short-term rental through any platform, the portion of the gain tied to the non-residential use may not qualify for the exclusion. Any depreciation you claimed while renting or operating a business from the home is typically "recaptured" and taxed as ordinary income at the time of sale, even if the rest of the gain is excluded.
This is a common surprise for homeowners who listed on short-term rental platforms without realizing the tax consequences it creates at sale.
The Net Investment Income Tax
If your total income exceeds $200,000 as a single filer or $250,000 for married filing jointly, you may also owe the 3.8% Net Investment Income Tax on the portion of your home sale gain that is not excluded under Section 121.
Inherited Property and the Step-Up in Basis
If you received a home through inheritance rather than purchase, the tax rules work differently, and they are often favorable.
When you inherit property, your basis is generally stepped up to the fair market value of the property on the date of the original owner's death. This is called a step-up in basis. If a parent bought a home in Chicagoland decades ago for $80,000 and it was worth $350,000 when they passed away, your basis as the heir is $350,000, not $80,000.
If you sell the inherited property shortly after inheriting it at or near that fair market value, your taxable gain may be minimal or zero, regardless of how much the property appreciated during the original owner's lifetime.
If you hold the inherited property and it continues to appreciate, you will eventually owe tax on the gain above your stepped-up basis. If you move in and use it as your primary residence for at least two years, the Section 121 exclusion may also apply to reduce that future gain.
Illinois State Income Tax on a Home Sale
Federal tax is only part of the picture for homeowners in Illinois.
Illinois does not have a separate capital gains tax rate. Instead, the state treats capital gains as ordinary income and taxes them at the state's flat income tax rate of 4.95%, per the Illinois Department of Revenue. Unlike the federal tax code, Illinois does not offer a preferential long-term rate. A gain held for two years and a gain held for twenty years are taxed at the same 4.95% rate at the state level.
Illinois also does not offer a state-level equivalent to the Section 121 exclusion. However, because Illinois calculates state income tax starting from federal adjusted gross income, a gain that is fully excluded at the federal level is also excluded from Illinois taxable income. If your gain falls entirely within the federal exclusion, you will not owe Illinois state income tax on it either.
The issue arises when your gain exceeds the federal exclusion. The excess amount that is subject to federal capital gains tax is also subject to Illinois income tax at 4.95%.
Example: You are a single filer with a capital gain of $300,000. The first $250,000 is excluded federally. The remaining $50,000 is subject to federal long-term capital gains tax and also to Illinois income tax. At 4.95%, the Illinois state tax on that $50,000 is $2,475, on top of whatever you owe federally.
Practical Ways to Reduce Your Capital Gains Exposure
Document Every Improvement You Make
Every capital improvement increases your basis and reduces your eventual gain. A $25,000 kitchen remodel, a $15,000 roof replacement, or a $10,000 HVAC system upgrade should all be tracked carefully. Keep contractor invoices, permits, and receipts. Most homeowners do not do this, and they pay more tax than necessary when they sell.
Time the Sale Around the Two-Year Mark
If you have lived in the home for 22 months and need to sell, waiting two more months to cross the two-year threshold could mean the difference between qualifying for the Section 121 exclusion or missing it entirely. The exclusion is worth up to $250,000 in excluded gain for a single filer. Two months of patience has obvious financial merit.
Be Thoughtful About Rental Use Before You Sell
Renting even part of your home, including through short-term rental platforms, can affect your eligibility for the full exclusion and will generate depreciation recapture at the time of sale. If you are considering renting your home and may want to sell within a few years, discuss the tax implications with a CPA before you list it.
Work with a Tax Professional Before You Close
Capital gains calculations are not always straightforward. Improvements, rental periods, inherited property, prior exclusion use, home office deductions, and the Net Investment Income Tax all interact in ways that require professional analysis. A qualified CPA or tax attorney can accurately calculate your basis, confirm your exclusion eligibility, and identify any strategies available to you before the sale closes, not after.
There is very little you can do to reduce your tax bill once the transaction is complete. Planning before closing is what makes the difference.
This post is for general educational purposes only and does not constitute tax or legal advice. Tax laws change and individual situations vary. Consult a qualified tax professional before making any decisions related to your home sale.
Ready to sell your home as-is? We make the process simple and stress-free! At Elevated Home Solutions, we buy homes in any condition, offering a fast and fair cash offer without the need for repairs. Skip the hassle of traditional listings and sell your home as-is today. Contact us now to get started!