The Capital Gains Tax Exclusion When Selling Your Primary Residence

You can often sell your primary residence tax-free

A stately gray house with a for sale sign out front
••• Stewart Cohen/ Digital Vision/ Getty Images

You probably won't take a big capital gains tax hit if you sell your primary residence, thanks to the Taxpayer Relief Act of 1997. Taxpayers can exclude up to $250,000 in capital gains when they sell their homes, or up to $500,000 if they're married and filing a joint return, as of 2020. This special tax treatment is known as the Section 121 exclusion.

The exclusion has been extended through December 31, 2020.

How Does the Section 121 Exclusion Work?

The Internal Revenue Service says that a homeowner must have owned and lived in the property as his main residence for two of the last five years preceding the sale of his property to qualify for the exclusion. Here's an example.

Brian has owned and lived in his house for three years. He plans to sell the house for $250,000. His basis in the property is $205,000. What kind of taxes will he have to pay on that $45,000 profit?

Capital gains tax is calculated on the difference between the sales price and your basis in the property, which the IRS defines as its purchase price plus the cost of any capital improvements you made to it.

Of course, there can be transfer, stamp, or property taxes due when you sell a house, and those taxes should be listed in detail on the settlement statement that's prepared by the title company during escrow. But what about federal income taxes on the sale?

Brian should not have to pay any federal income tax because his gain of $45,000—the difference between the purchase price or his tax basis and the sale proceeds—is significantly less than the $250,000 exclusion he's entitled to for his single filing status. His capital gain of approximately $45,000 is therefore completely income tax-free.

Other Rules and Loopholes

The two-year ownership and residency periods don't have to be simultaneous. Let's say Brian purchased his home in 2017 after living there as a tenant for two years. He then purchased the residence, and he sells the property in 2020.

He's owned it for four years—2017 through 2020, assuming he doesn't sell before his four-year anniversary—so he has that rule covered. And he's lived in the home for two of the last five years as well, so he's met that requirement as well.

The rules state that both the residency term and the ownership term must occur within the last five years immediately preceding the sale of the home, but they don't have to be concurrent.

The Section 121 exclusion isn’t a one-shot deal. You can effectively sell your residence every two years without owing any capital gains tax on the proceeds. You just can't do so any more often than once every two years.

Partial Exclusions

Some taxpayers who sell their principal residences before meeting the two-out-of-five-year rule might still qualify for a partial exclusion of their gains. The tax code allows taxpayers to exclude a portion of their capital gains if they must sell to relocate for work, because of health issues, or due to other unforeseen circumstances.

If your employer transfers you to a position on the other coast after you’ve lived in your home for one year, the resulting sale of your home is work-related and not something you voluntarily elected to do. You won’t have to take a big tax hit, but you can’t use the entire $250,000 exclusion.

If you were in residence for one year, you lived in your home for 50% of the required time. You would therefore multiply 50% by $250,000. The result is that you can exclude a profit of up to $125,000. You would only pay capital gains on any proceeds exceeding this amount.

Your new work location must be at least 50 miles more distant from your home than your old one was to qualify for a partial exclusion under these rules.

Members of the military are completely exempt from the two-year rule for up to 10 years if they’re required to move due to service commitments. They must be assigned to a duty station that's at least 50 miles from their home or living in government housing.

So go ahead and sell your house without worrying about Uncle Sam. You can most likely do so tax-free unless you realize a pretty significant profit or you’ve only lived there for a short period of time.

Reporting the Gain

You must still report the gain on your tax return, even if it's excluded from your income, if you receive a Form 1099-S, "Proceeds from Real Estate Transactions." The IRS receives a copy of this informational return, too, so you have to let the IRS know that you qualify to exclude the capital gain. You can do this by reporting the income and claiming the exclusion.

Unfortunately, capital losses on the sale of personal property—including your home—are not deductible for tax purposes. You won't have to pay any additional tax if you suffer a loss on the sale of your property, but you won't get a tax break for it, either.

NOTE: Tax laws change periodically, and you should consult with a tax professional for the most up-to-date advice. The information contained in this article is not intended as tax advice and is not a substitute for tax advice. 

Article Sources

  1. IRS. "Publication 523 (2019), Selling Your Home." Accessed June 23, 2020.

  2. IRS. "Capital Gains, Losses, and Sale of Home." Accessed June 23, 2020.

  3. IRS. "Topic No. 701 Sale of Your Home." Accessed June 23, 2020.

  4. USDA Cooperative Extension. "What is the Capital Gains Exclusion for the Sale of a House?" Accessed June 23, 2020.

  5. IRS. "Topic No. 409 Capital Gains and Losses." Accessed June 23, 2020.