If you sell a house after three years of ownership, you will almost certainly owe no federal capital gains tax on the profit. Section 121 of the tax code lets you exclude up to $250,000 of gain from the sale of your main home, or $500,000 if you are married filing jointly, provided you owned it and used it as your primary residence for at least two of the five years before closing. Three years clears that bar with room to spare, so most sellers at this point keep the entire gain tax-free.
How the Two-Out-of-Five-Year Rule Works
The exclusion sits in Section 121 of the Internal Revenue Code. It applies to gain from the sale of a principal residence when your ownership and use of the home add up to at least two years during the five-year window ending on the sale date.1Office of the Law Revision Counsel. 26 USC 121 – Exclusion of Gain From Sale of Principal Residence The two years do not need to be back-to-back. Fourteen months, a stretch away, then ten more months at the property all counts.
The cap is $250,000 for single filers and $500,000 for married couples filing jointly. On a joint return, both spouses must meet the use test, and at least one must meet the ownership test.1Office of the Law Revision Counsel. 26 USC 121 – Exclusion of Gain From Sale of Principal Residence One further condition trips up some sellers: you cannot have used the exclusion on another home sale within the two years before this one. For someone selling a first or only home after three years, that restriction almost never bites.
When Three Years of Ownership Isn’t Three Years of Residence
Owning a home for three years is not the same as living in it for three years. If you rented the place out for a period, kept it as a second home, or spent long stretches elsewhere, you might not clear the two-year use test even though you have owned the property well beyond that.
The tax code offers a partial exclusion when the reason you fell short was a work move, a health issue, or an unforeseen circumstance.2Internal Revenue Service. Publication 523, Selling Your Home The qualifying triggers include:
- A job change or transfer to a workplace at least 50 miles farther from the home than your prior workplace.
- A move for medical care for yourself or a family member, or a doctor-recommended relocation.
- Unforeseen events such as destruction or condemnation of the home, divorce, or a job loss that qualifies you for unemployment.
The partial amount is prorated. Divide the months you met the requirement by 24, then multiply by $250,000 or $500,000. Eighteen months of qualifying use gets a single filer 18 ÷ 24 × $250,000 = $187,500 in exclusion.2Internal Revenue Service. Publication 523, Selling Your Home Less than the full shelter, but still enough to erase the gain on most three-year holds.
Figuring the Gain the Exclusion Applies To
The gain is not the sale price minus the purchase price. The IRS uses your adjusted cost basis, which starts with what you paid and adds certain acquisition costs and later improvements. A larger basis means a smaller gain, which matters if you are anywhere near the exclusion cap.
You can add title insurance, transfer taxes paid at purchase, recording fees, legal fees for the title search, and survey fees.2Internal Revenue Service. Publication 523, Selling Your Home Capital improvements also increase basis: a new roof, a kitchen renovation, an addition. Routine repairs and maintenance do not. The distinction the IRS draws is that an improvement adds value, extends the home’s life, or adapts it to a new use, while a repair keeps the property in its existing condition.
Mortgage-related charges stay out. Appraisal fees, loan origination points, mortgage insurance premiums, homeowner’s insurance, and prepaid escrowed taxes do not adjust your basis.2Internal Revenue Service. Publication 523, Selling Your Home Once basis is set, subtract it from the net sale price after selling expenses. The Section 121 exclusion applies against the resulting gain.
Taxes That Can Still Apply
Two federal taxes can reach into a home sale even when the Section 121 exclusion is available.
Net Investment Income Tax
A 3.8% surtax applies to net investment income when modified adjusted gross income exceeds $200,000 for single filers or $250,000 for joint filers.3Internal Revenue Service. Topic No. 559, Net Investment Income Tax Home-sale profit counts as investment income, but only the portion of the gain not excluded under Section 121 is exposed to the surtax. Sellers who fit inside the exclusion cap generally do not encounter it. It surfaces when the profit is unusually large or when other income already sits above the threshold.
Depreciation Recapture
If you claimed a home office deduction and depreciated part of the home while you owned it, Section 121 does not shelter the depreciation you already deducted. That amount is taxed as unrecaptured Section 1250 gain at a maximum rate of 25%.4Internal Revenue Service. Treasury Decision 8836 – Unrecaptured Section 1250 Gain The recapture applies only to the depreciation you took, not to the full value of the home-office space. Sellers who used the simplified home-office method or never claimed the deduction can ignore this. Anyone who used the actual-expense method should expect a small bill here even when the rest of the gain is excluded.
Rates on Any Leftover Gain
Gain that exceeds the exclusion is long-term capital gain, because you held the property for more than a year. The 2026 rates depend on total taxable income:5Internal Revenue Service. Revenue Procedure 25-32 – 2026 Adjusted Items
- 0% on taxable income up to $49,450 single or $98,900 joint.
- 15% from $49,451 to $545,500 single, or $98,901 to $613,700 joint.
- 20% above $545,500 single or $613,700 joint.
The 0% bracket does more work than people expect. A retired couple with modest income could realize a gain above the $500,000 exclusion and still owe nothing on part of it if the excess keeps them below the joint threshold. The 20% rate reaches only the income above the cutoff.6Internal Revenue Service. Topic No. 409, Capital Gains and Losses
If You Sell at a Loss
Not every three-year hold ends in profit. If the sale price comes in below your adjusted basis, you have a loss on paper, but the IRS does not let you deduct a loss on a personal residence.7Internal Revenue Service. Capital Gains, Losses, and Sale of Home That is the trade-off for the generous exclusion on gains: the code treats your home as personal-use property, and losses on personal-use property don’t offset other income the way investment losses would. Casualty losses from federally declared disasters follow separate rules.
Reporting the Sale on Your Taxes
Your settlement agent is generally required to file Form 1099-S with the IRS reporting the gross proceeds. An exception applies when the sale price is $250,000 or less ($500,000 for a married seller) and you sign a written certification that the property was your principal residence and the full gain is excludable.8Internal Revenue Service. Instructions for Form 1099-S, Proceeds From Real Estate Transactions Without that certification, the 1099-S is filed regardless of price.
On your return, you report the sale on Schedule D and Form 8949 if you can’t exclude all of the gain or if you received a 1099-S.9Internal Revenue Service. Instructions for Schedule D (Form 1040) When the full gain is excluded and no 1099-S was issued, no reporting is required. When reporting is required, the sale goes on Form 8949 as a long-term transaction, the excludable portion is entered as a negative adjustment, and the net carries to Schedule D. Keep your original purchase documents, receipts for improvements, and closing statements. If the exclusion or your basis is ever questioned, those records are your evidence.
Prepayment Penalty at the Three-Year Mark
Selling means paying off the mortgage, and a few loans still charge for early payoff. On a qualified mortgage, federal rules bar prepayment penalties after the loan’s first three years, and even inside that window the penalty is capped at 2% of the prepaid balance during years one and two and 1% during year three.10eCFR. 12 CFR 1026.43 – Minimum Standards for Transactions Secured by a Dwelling Adjustable-rate and higher-priced qualified mortgages cannot carry a prepayment penalty at all.
Selling right at three years puts you at the outer edge of the only period when a penalty could legally apply on a conforming loan. Non-qualified mortgages, including some jumbo and portfolio loans, follow their own contract terms and may have larger or longer-running penalties. Check the promissory note or the Closing Disclosure from your original purchase for a prepayment penalty section.11Consumer Financial Protection Bureau. Closing Disclosure Explainer If one exists, request the exact payoff figure from your servicer so the penalty is built into your net numbers before you commit to a sale price.