Most people who sell their primary home pay no federal capital gains tax on the sale. The Internal Revenue Code lets a single filer exclude up to $250,000 of profit, and a married couple filing jointly can exclude up to $500,000, provided you owned and lived in the home for at least two of the five years before the sale.1Office of the Law Revision Counsel. 26 USC 121 – Exclusion of Gain From Sale of Principal Residence Any profit above those limits is taxed at long-term capital gains rates of 0%, 15%, or 20%, depending on your income.2Internal Revenue Service. Topic No. 409, Capital Gains and Losses
Who Qualifies for the $250,000 or $500,000 Exclusion
The exclusion, known as the Section 121 exclusion, has two tests, and you have to pass both during the five-year period ending on the sale date. You must have owned the home for at least 24 months, and you must have used it as your principal residence for at least 24 months. The two periods don’t have to overlap, and they don’t have to run consecutively. Separate stretches of residency can be added together to reach the threshold.3eCFR. 26 CFR 1.121-1 – Exclusion of Gain From Sale or Exchange of a Principal Residence
For the full $500,000 amount on a joint return, at least one spouse must meet the ownership test, both spouses must meet the use test, and neither spouse can have claimed the exclusion on another sale in the previous two years.1Office of the Law Revision Counsel. 26 USC 121 – Exclusion of Gain From Sale of Principal Residence
That two-year cooldown catches people. You can only use the exclusion once every two years. Sell a second qualifying home inside that window and the full gain on the second sale is taxable.1Office of the Law Revision Counsel. 26 USC 121 – Exclusion of Gain From Sale of Principal Residence
Selling Before the Two-Year Mark
Sometimes you have to sell early. If a job relocation, a health condition, or certain unforeseen circumstances force the sale before you’ve met the ownership or use requirement, the IRS lets you claim a prorated exclusion.1Office of the Law Revision Counsel. 26 USC 121 – Exclusion of Gain From Sale of Principal Residence
The formula is the number of qualifying months divided by 24, multiplied by $250,000 or $500,000. A single filer who lived in the home for 15 months before a qualifying job transfer would get 15 ÷ 24 × $250,000, or $156,250 of exclusion.4Internal Revenue Service. Publication 523, Selling Your Home
How to Figure Your Gain
The gain is not the same as the check you walk away with at closing. It’s the sale price minus selling expenses (real estate commissions, legal fees, advertising) minus your adjusted basis in the home.4Internal Revenue Service. Publication 523, Selling Your Home
Your adjusted basis starts with the purchase price.5Office of the Law Revision Counsel. 26 USC 1012 – Basis of Property Cost You add certain acquisition closing costs, such as title search fees, legal fees tied to the purchase, recording fees, survey fees, transfer taxes, and owner’s title insurance. Costs of getting the mortgage itself, such as appraisal fees, points, and credit reports, do not increase basis.4Internal Revenue Service. Publication 523, Selling Your Home
You then add capital improvements made during ownership. The IRS distinguishes improvements from repairs. Improvements add value, extend the home’s useful life, or adapt it to new uses: a new roof, a bathroom addition, central air, a deck. Repairs simply maintain the home in its current condition and don’t count on their own, though repair work done as part of a larger remodel can be rolled in.4Internal Revenue Service. Publication 523, Selling Your Home
Keep the receipts. Contracts, invoices, and settlement statements are what you’ll use to defend your basis if a return is questioned. A $40,000 kitchen remodel you can’t document is $40,000 you don’t get to add.
Once you have the total gain, compare it to your exclusion. If the gain is at or below the applicable limit, you owe no federal capital gains tax. If it exceeds the limit, only the excess is taxable. A married couple with a $600,000 gain and the $500,000 exclusion pays tax on $100,000.
Tax Rates on the Taxable Portion
Almost every home sale gets long-term capital gains treatment because the property was held longer than a year. Long-term rates are 0%, 15%, or 20%, set by your taxable income.2Internal Revenue Service. Topic No. 409, Capital Gains and Losses
For the 2026 tax year, the income breakpoints are:
- 0% rate: taxable income up to $49,450 (single), $98,900 (married filing jointly), or $66,200 (head of household).
- 15% rate: income above those floors up to $545,500 (single), $613,700 (married filing jointly), or $579,600 (head of household).
- 20% rate: income above those ceilings.6Tax Foundation. 2026 Tax Brackets and Federal Income Tax Rates
Most sellers land in the 15% band. If you happen to sell a primary residence you’ve held one year or less, the gain is short-term and taxed at your ordinary income tax rate instead.2Internal Revenue Service. Topic No. 409, Capital Gains and Losses
The 3.8% Net Investment Income Tax
Higher earners pay an additional 3.8% surtax on net investment income, including taxable capital gain from a home sale. It kicks in when modified adjusted gross income exceeds $200,000 for single filers, $250,000 for joint filers, or $125,000 for married filing separately.7Office of the Law Revision Counsel. 26 USC 1411 – Imposition of Tax The 3.8% applies to the lesser of your net investment income or the amount your MAGI is over the threshold, so it doesn’t necessarily hit the whole gain.8Internal Revenue Service. Questions and Answers on the Net Investment Income Tax
Situations That Change the Calculation
Homes That Were Rented or Used for Business
If you rented the home or used it for business before making it your primary residence, the gain assigned to those “nonqualified use” periods can’t be excluded. The allocation is proportional. Own the home for 10 years and rent it out for the first 4, and 40% of the gain falls outside the exclusion.1Office of the Law Revision Counsel. 26 USC 121 – Exclusion of Gain From Sale of Principal Residence
Rental use after the last date you lived in the home does not count as nonqualified use. Someone who moves out and rents the property for a few years before selling gets a better result than they might expect.9Internal Revenue Service. Sales, Trades, Exchanges
Separately, any depreciation you claimed (or could have claimed) for periods after May 6, 1997, cannot be excluded. That depreciation-related gain is taxed as unrecaptured Section 1250 gain at a federal rate of up to 25%.2Internal Revenue Service. Topic No. 409, Capital Gains and Losses For a home office located within the home itself, you don’t split the gain into business and personal portions, but the depreciation recapture rule still applies.9Internal Revenue Service. Sales, Trades, Exchanges
Inherited and Gifted Homes
An inherited home gets a stepped-up basis equal to its fair market value on the date the previous owner died. A parent who paid $80,000 for a home worth $400,000 at death leaves the heir with a $400,000 basis; a quick sale for $410,000 produces only $10,000 of gain.10Office of the Law Revision Counsel. 26 USC 1014 – Basis of Property Acquired From a Decedent
A gifted home works differently. The recipient generally takes the donor’s original basis, called a carryover basis. In the same example, if the parent gifted the home while alive rather than leaving it at death, the child’s basis for figuring gain would still be $80,000. Gift tax paid by the donor can bump the basis somewhat, but the tax gap between inheritance and lifetime gift is often large.11Office of the Law Revision Counsel. 26 USC 1015 – Basis of Property Acquired by Gifts and Transfers in Trust
Surviving Spouses
A surviving spouse can still claim the full $500,000 exclusion if the home sells within two years of the date of death, provided the other standard requirements were met immediately before the spouse died. After that window, the survivor (filing as single) is limited to $250,000.1Office of the Law Revision Counsel. 26 USC 121 – Exclusion of Gain From Sale of Principal Residence
Divorce
Two rules matter here. If the home was transferred to you in a divorce, your ownership period includes the time your former spouse owned it. And if you moved out but your spouse or ex-spouse continues to live there under a divorce or separation agreement, you’re still treated as using the home as your primary residence during that time. The non-resident spouse doesn’t lose eligibility for the exclusion because of the decree.1Office of the Law Revision Counsel. 26 USC 121 – Exclusion of Gain From Sale of Principal Residence
Military and Foreign Service
Members of the uniformed services, the Foreign Service, and certain intelligence community employees can suspend the five-year testing period for up to 10 years while on qualified official extended duty at a station at least 50 miles from the home. The lookback window can effectively stretch to 15 years, which makes meeting the two-year use test workable across long deployments and reassignments.1Office of the Law Revision Counsel. 26 USC 121 – Exclusion of Gain From Sale of Principal Residence
State Tax Is Separate
Federal isn’t the whole bill. Most states tax capital gains too, typically at the same rate as ordinary income. Eight states have no income tax on capital gains: Alaska, Florida, Nevada, New Hampshire, South Dakota, Tennessee, Texas, and Wyoming. Rates in the taxing states run from roughly 3% to more than 13%. Check your state tax agency for the current figure, especially if part of your gain will exceed the Section 121 limit.
Reporting the Sale
Your settlement agent generally files Form 1099-S reporting the gross sale proceeds to the IRS.12Internal Revenue Service. Instructions for Form 1099-S, Proceeds From Real Estate Transactions If your entire gain is excluded under Section 121 and certain conditions are met, you may not need to report the sale at all. But if you receive a 1099-S, or if any part of your gain is taxable, you report the sale on Form 8949 and carry the totals to Schedule D. The excluded amount is entered as a negative adjustment so the reportable gain zeroes out or drops to the taxable portion only.13Internal Revenue Service. Instructions for Form 8949
Make sure the numbers on your return line up with the 1099-S. The IRS receives its own copy and mismatches routinely trigger automated notices. Selling expenses typically aren’t on the 1099-S, so account for them as adjustments on Form 8949 to keep the figures reconciled.