26 USC 121: Home Sale Exclusion, Ownership Tests, and Reporting

Under Section 121 of the Internal Revenue Code, you can exclude up to $250,000 of profit from the sale of your main home, or up to $500,000 on a joint return, as long as you owned and lived in the home for at least two of the five years ending on the sale date. The Section 121 principal residence exclusion is one of the largest tax breaks available to individual filers, and any gain above the cap is taxed at long-term capital gains rates of 0% to 20%.1Office of the Law Revision Counsel. 26 USC 121 Exclusion of Gain From Sale of Principal Residence

High earners may owe an additional 3.8% Net Investment Income Tax on gain above the exclusion, but the excluded portion is not subject to the NIIT.2Internal Revenue Service. Topic No. 559, Net Investment Income Tax3Internal Revenue Service. Net Investment Income Tax You also can’t use the exclusion more than once every two years. If you claimed it on another home sale in the 24 months before your current closing, you’re out, though a partial exclusion may still be available in specific hardship situations.1Office of the Law Revision Counsel. 26 USC 121 Exclusion of Gain From Sale of Principal Residence

The Ownership and Use Tests

Two separate tests have to be satisfied. The ownership test asks whether you held legal title for at least two years during the five-year period ending on the sale date. The use test asks whether the home was your principal residence for at least two years (730 days) during that same window.1Office of the Law Revision Counsel. 26 USC 121 Exclusion of Gain From Sale of Principal Residence

The two years don’t have to be consecutive. You could live there twelve months, move out for a year, move back for another twelve months, and still pass. Ownership means your name on the deed. Paying the mortgage or contributing to expenses without title doesn’t count.

For the use test, the IRS looks at where you actually lived: the address on your tax returns, voter registration, driver’s license, utility bills. Weekend stays at a place you mainly treat as a vacation home won’t qualify it as your principal residence. The five-year lookback runs strictly from the closing date, so someone who moved out more than three years before selling can fail the use test even after decades in the home. Timing the sale matters.

Your principal residence can be a house, condo, co-op, mobile home, or houseboat, as long as it has sleeping, cooking, and bathroom facilities.4Internal Revenue Service. Publication 523, Selling Your Home Vacation homes, rentals, and investment properties don’t qualify unless you convert them into your main home and satisfy both tests.

Calculating Your Gain

Your taxable gain is the difference between your net sale proceeds and your adjusted basis. Getting both numbers right is where real dollars are saved.

Start with the sale price and subtract selling expenses: real estate commissions, legal fees, title insurance, and any transfer taxes you paid as the seller. That’s your amount realized.4Internal Revenue Service. Publication 523, Selling Your Home

Your basis starts with what you paid for the home, including closing costs at purchase. Add the cost of capital improvements. Subtract any depreciation you claimed. The IRS draws a firm line between improvements and repairs. Improvements add value, extend the home’s life, or adapt it to a new use: room additions, new roofing, kitchen remodels, central air, new flooring, landscaping, fencing, built-in appliances. Routine maintenance like painting, patching cracks, and fixing leaks does not increase basis. One exception: repairs done as part of a larger renovation project count as part of the improvement.4Internal Revenue Service. Publication 523, Selling Your Home

A quick example. You sell for $650,000 and pay $39,000 in selling costs, so your amount realized is $611,000. You bought for $400,000 and put in $50,000 of capital improvements, giving you an adjusted basis of $450,000. Your gain is $161,000. Single, meeting both tests, you exclude the entire $161,000 and owe nothing on it.

Depreciation Recapture and Nonqualified Use

If part of the home was used exclusively for business or produced rental income, you don’t split the sale into separate transactions. But you cannot exclude the portion of your gain that equals depreciation you claimed (or were entitled to claim) after May 6, 1997. That amount is recaptured and taxed at up to 25% as unrecaptured Section 1250 gain.4Internal Revenue Service. Publication 523, Selling Your Home If you deducted $8,000 for a home office over several years, that $8,000 is carved out of the exclusion.

A separate rule applies when the home was used for something other than your principal residence at any point after 2008, most commonly a stretch as a rental before you moved in. Divide the total post-2008 nonqualified use by your total ownership period. That fraction of the gain cannot be excluded. Own a property ten years, rent it the first four (after 2008), then live in it six, and 40% of your gain falls outside the exclusion.1Office of the Law Revision Counsel. 26 USC 121 Exclusion of Gain From Sale of Principal Residence

Three exceptions soften the rule. Time after you stop using the home as your residence but before the sale isn’t nonqualified use, which protects sellers who move out and take time to close. Up to ten years of qualifying military service is excluded. And temporary absences of up to two years for job changes, health, or unforeseen circumstances don’t count.5Office of the Law Revision Counsel. 26 US Code 121 – Exclusion of Gain From Sale of Principal Residence Depreciation recapture is calculated separately and comes out before the nonqualified-use ratio is applied.

Partial Exclusion When You Have to Sell Early

If you sell before hitting the full two-year mark on ownership or use, you can still claim a reduced exclusion when the sale was primarily driven by a job change, health issue, or unforeseen circumstance.4Internal Revenue Service. Publication 523, Selling Your Home

A work-related move qualifies when the new job is at least 50 miles farther from the home than the old workplace (or at least 50 miles from the home if you had no prior job). Health-related moves qualify if you relocated to get or provide medical care for yourself or a family member, or if a doctor recommended the move. Unforeseen circumstances include the home being destroyed or condemned, a natural disaster, death of a spouse, divorce, job loss, or inability to pay basic living expenses because of an employment change. The same triggers work if they happen to your spouse, a co-owner, or anyone else who lived in the home.

To compute the reduced cap, take the shortest of three periods: how long you lived in the home during the five-year window, how long you owned it, or the time since your last excluded sale. Divide the days by 730 (or months by 24), then multiply by $250,000. Married couples filing jointly run the calculation for each spouse and add the results.4Internal Revenue Service. Publication 523, Selling Your Home A single filer who lived in the home 15 months before a qualifying job transfer would get 15 ÷ 24 × $250,000 = $156,250. Not the full amount, but a substantial break that many sellers assume isn’t available to them.

Married Couples, Surviving Spouses, and Divorce

For joint filers to claim the full $500,000, only one spouse needs to meet the ownership test, but both spouses must independently meet the use test, and neither spouse can have used the exclusion on another home sale in the prior two years.1Office of the Law Revision Counsel. 26 USC 121 Exclusion of Gain From Sale of Principal Residence If only one spouse meets both tests, the couple can still file jointly and claim up to $250,000.

A surviving spouse can still claim the full $500,000 exclusion, but only if the sale closes within two years of the spouse’s death, the survivor hasn’t remarried, neither spouse used the exclusion on another sale in the prior two years, and the two-year ownership and use requirements are met (the late spouse’s time counts).1Office of the Law Revision Counsel. 26 USC 121 Exclusion of Gain From Sale of Principal Residence After the two-year window closes, the cap drops to $250,000.

In a divorce, the spouse who receives the home inherits the transferring spouse’s ownership period. And if a divorce or separation decree gives your former spouse the right to live in the home, you’re treated as using it as your principal residence during that period even after you’ve moved out.5Office of the Law Revision Counsel. 26 US Code 121 – Exclusion of Gain From Sale of Principal Residence

Military, 1031 Exchanges, and Inherited Homes

Members of the uniformed services or Foreign Service on qualified official extended duty can elect to suspend the five-year lookback for up to 10 years, effectively stretching the window to as long as 15 years.6eCFR. 26 CFR 1.121-5 Suspension of 5-Year Period for Certain Members of the Uniformed Services and Foreign Service Without this rule, a long deployment could push a service member past the five-year window.

If you acquired the home through a Section 1031 like-kind exchange, converting an investment property into your residence, the exclusion is off the table until you’ve owned it for at least five years after the exchange. The two-year use test still applies on top of that.5Office of the Law Revision Counsel. 26 US Code 121 – Exclusion of Gain From Sale of Principal Residence

For an inherited home, your basis is generally the fair market value on the date the previous owner died, not what they paid. That stepped-up basis often shrinks the gain enough to make the exclusion less critical. If a federal estate tax return was filed, the value on that return is your basis; otherwise, a date-of-death appraisal establishes it. For jointly owned property, the deceased spouse’s half steps up while the survivor’s half keeps its original basis, except in community property states, where both halves step up.4Internal Revenue Service. Publication 523, Selling Your Home To claim Section 121 on an inherited home, you’d still need to move in and satisfy the two-year ownership and use tests yourself.

Reporting the Sale

If the closing agent issues Form 1099-S, you must report the sale on Form 8949 and Schedule D of your Form 1040, even when the entire gain is excludable.7Internal Revenue Service. About Form 8949, Sales and Other Dispositions of Capital Assets

You can sometimes prevent the 1099-S from being issued. If the sale price is $250,000 or less ($500,000 for a certified married seller), you can give the closing agent a written certification under penalties of perjury that the home is your principal residence, the full gain is excludable, and there were no periods of nonqualified use after 2008. A valid certification relieves the closing agent from filing.8Internal Revenue Service. Instructions for Form 1099-S

When only part of the gain qualifies, report the whole sale. The excludable portion is shown as an adjustment on Form 8949, and the rest flows to Schedule D at capital gains rates. Depreciation recapture is reported separately and taxed at up to 25%.4Internal Revenue Service. Publication 523, Selling Your Home Missing recaptured depreciation is one of the errors the IRS most consistently catches, and it comes with penalties and interest on top of the underlying tax.