When you sell your house, you usually owe no federal capital gains tax at all. A longstanding rule lets a single filer exclude up to $250,000 of profit from the sale of a primary home, and married couples filing jointly can exclude up to $500,000.1Office of the Law Revision Counsel. 26 U.S. Code 121 – Exclusion of Gain From Sale of Principal Residence Profit above those limits is taxed at the long-term capital gains rate of 0%, 15%, or 20%, depending on your income. A loss on the sale of a personal home is not deductible.
Who Qualifies for the Exclusion
The exclusion under Section 121 of the Internal Revenue Code requires two things. You must have owned the home for at least two of the five years before the sale, and you must have used it as your main home for at least two of those same five years. The two periods don’t have to overlap perfectly, and neither has to be consecutive. Fourteen months of living there, a year away, then ten more months in the home adds up to the required 24 months of use.1Office of the Law Revision Counsel. 26 U.S. Code 121 – Exclusion of Gain From Sale of Principal Residence
For a couple to claim the full $500,000, at least one spouse must meet the ownership test and both must meet the use test. Neither spouse can have used the exclusion on a different home sale in the previous two years.1Office of the Law Revision Counsel. 26 U.S. Code 121 – Exclusion of Gain From Sale of Principal Residence
The $250,000 and $500,000 limits are not indexed for inflation and have not changed in decades. As home prices rise, more sellers bump against them.
Selling Before the Two-Year Marks
Sell early and you may still get a reduced exclusion if the reason for the sale is a workplace relocation, a health issue, or an unforeseeable event such as a natural disaster or job loss. The prorated amount equals the days you met the shorter of the ownership or use test, divided by 730, times your full exclusion. A single seller who lived in the home for 365 days before a qualifying job transfer gets 365 ÷ 730 × $250,000 = $125,000.2Internal Revenue Service. Publication 523, Selling Your Home
Figuring Out Your Gain
Before the exclusion means anything, you need the gain itself: the amount realized on the sale minus your adjusted basis.
The amount realized is the sale price minus selling costs, which include real estate commissions, advertising, legal fees, and any loan charges you paid for the buyer.2Internal Revenue Service. Publication 523, Selling Your Home Staging and cosmetic pre-sale repairs sit in a gray area and shouldn’t be assumed deductible without professional advice.
Your adjusted basis is what you have put into the property for tax purposes: the original purchase price, acquisition costs like title insurance and settlement fees, plus every capital improvement you have made. Capital improvements are permanent additions that add value or extend the home’s life, such as a new roof, a kitchen remodel, or a finished basement. Routine repairs like patching drywall, fixing a faucet, or repainting don’t count.
A higher basis means a smaller gain. Keep the closing documents from your purchase, contractor invoices, and permits for every improvement while you own the home, and hold onto them for at least three years after you file the return reporting the sale.3Internal Revenue Service. Publication 583, Starting a Business and Keeping Records
Rates on the Taxable Portion
Any gain above your exclusion is taxed as a capital gain. If you owned the home for more than a year, the long-term rates apply. For the 2026 tax year, those rates are 0%, 15%, or 20%.4Internal Revenue Service. Revenue Procedure 2025-32
- 0% for single filers with taxable income up to $49,450, or joint filers up to $98,900.
- 15% for single filers between $49,450 and $545,500, or joint filers between $98,900 and $613,700.
- 20% for single filers above $545,500, or joint filers above $613,700.
The taxable gain stacks on top of your other income for the year, so a gain can push part of itself into a higher bracket even if your salary alone wouldn’t.
Owned for a year or less? The gain is short-term and taxed at your ordinary income rate, which can reach 37% for 2026.
The 3.8% Net Investment Income Tax
Higher earners pay an extra 3.8% on the taxable portion. The Net Investment Income Tax applies when modified adjusted gross income exceeds $200,000 for single filers or $250,000 for joint filers, and hits the lesser of your net investment income or the amount over that threshold.5Internal Revenue Service. Topic No. 559, Net Investment Income Tax Gain you successfully exclude under Section 121 is not net investment income, so only the taxable portion is exposed.6Internal Revenue Service. Questions and Answers on the Net Investment Income Tax At the top, a high-income single filer can face a combined federal rate of 23.8% on taxable home-sale gain.
The NIIT thresholds were set in statute and have never been indexed, so more sellers cross them every year.
When Prior Rental Use or a Home Office Changes the Math
If you used the property for something other than your main home after December 31, 2008, part of your gain may fall outside the exclusion. The IRS calls this “non-qualified use,” and it commonly shows up when someone rents a home first, then moves in.1Office of the Law Revision Counsel. 26 U.S. Code 121 – Exclusion of Gain From Sale of Principal Residence
The non-excludable fraction is the number of non-qualified-use days (after 2008 and before the last date you used the whole property as your main home) divided by the total days you owned the property. That share of the gain stays taxable no matter how big your exclusion would otherwise be.2Internal Revenue Service. Publication 523, Selling Your Home
Say you owned a home for five years, rented it for the first two, and lived in it for the last three. The non-qualified fraction is 2/5. On a $300,000 gain, $120,000 is taxable and the remaining $180,000 can be excluded.
Separately, any depreciation you claimed while renting the home or using part of it as a home office is recaptured at sale. Recaptured depreciation is taxed at a federal rate of up to 25% and cannot be sheltered by the exclusion.7Internal Revenue Service. Property (Basis, Sale of Home, Etc.) 5
Life Events That Change the Rules
Surviving Spouses
A widow or widower who sells within two years of the spouse’s death can still take the full $500,000 exclusion, provided they haven’t remarried, they meet the ownership and use tests (counting the late spouse’s time if needed), and neither spouse used the exclusion on another home in the prior two years.2Internal Revenue Service. Publication 523, Selling Your Home After the two-year window, the limit drops back to $250,000.
Divorce
If you receive the home in a divorce, you inherit your ex-spouse’s ownership time. If a divorce decree lets your former spouse live in the home, that time counts as your use of it as a principal residence too, even after you have moved out.1Office of the Law Revision Counsel. 26 U.S. Code 121 – Exclusion of Gain From Sale of Principal Residence
Military and Foreign Service
Members of the uniformed services or Foreign Service on qualified extended duty can elect to suspend the five-year look-back for up to 10 years. A service member deployed for eight years could sell up to 13 years after buying the home and still meet the two-out-of-five-year use test.8eCFR. 26 CFR 1.121-5 – Suspension of 5-Year Period for Certain Members of the Uniformed Services and Foreign Service
Inherited Homes
Inherited property gets a stepped-up basis equal to the fair market value on the date the prior owner died.9Internal Revenue Service. Gifts and Inheritances A house your parent bought for $80,000 in 1985 and worth $400,000 at their death starts at a $400,000 basis in your hands. Sell for $420,000 and the taxable gain is $20,000. Any gain on an inherited home is treated as long-term regardless of how quickly you sell. If you then move in and use it as your primary home for two of the following five years, the Section 121 exclusion stacks on top of the stepped-up basis.
What About Selling at a Loss?
A loss on a personal home is not deductible. The IRS treats a home you lived in as personal-use property, and only losses tied to a trade or business, a transaction entered into for profit, or certain casualty and theft events qualify for a deduction.10Office of the Law Revision Counsel. 26 U.S. Code 165 – Losses Sell your residence for $50,000 less than you paid, and that $50,000 simply disappears for tax purposes.11Internal Revenue Service. Capital Gains, Losses, and Sale of Home If part of the property was used for business or rental, that portion of the loss may be deductible; the personal-use portion is not.
State Taxes Are Separate
Everything above is federal. Most states tax capital gains as ordinary income, and rates vary. Some states impose no income tax on real estate gains; others charge rates that can exceed 13%. Check your state’s rules before assuming the federal answer is the whole answer.
Reporting the Sale
Whether tax is owed and whether the sale must be reported are two different questions. The closing agent generally files Form 1099-S with the IRS and sends you a copy.12Internal Revenue Service. Instructions for Form 1099-S (04/2025) If your gain is fully excludable and no Form 1099-S is issued, you typically don’t need to report the sale at all.13Internal Revenue Service. Important Tax Reminders for People Selling a Home
If you do receive a 1099-S, report the sale even when no tax is due. It goes on Form 8949, with totals flowing to Schedule D. For a fully excluded gain, you enter adjustment code “H” and record the exclusion as a negative number, which zeroes the gain out before it reaches Schedule D.14Internal Revenue Service. Instructions for Form 8949 (2025) When only part of the gain is excluded, the adjustment shelters the excludable portion and the rest flows through to Schedule D at the applicable rate.