The Capital Gains Tax Exclusion When Selling Your House

You can often sell your primary residence tax-free

Home exterior
••• Stewart Cohen/ Digital Vision/ Getty Images

Thanks to the Taxpayer Relief Act of 1997, you probably won't take a big capital gains tax hit if you sell your primary residence. Taxpayers can exclude up to $250,000 in capital gains when they sell their homes, and up to $500,000 if they're married and filing a joint return.

This special tax treatment is known as the Section 121 exclusion.

How Does the Section 121 Exclusion Work?

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

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

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 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 on the sale 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 completely income tax-free.

A Few 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 2016 after living there as a tenant for two years. He then purchased the residence, and he sells the property in 2019.

He's owned it for three years—2016 through 2019, assuming he doesn't sell before his three-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, too. 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.

And here’s some more good news: 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 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. IRS Publication 523 walks you through the procedure for doing so.

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 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 percent of the required time, so you would multiply 50 percent 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.

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, living in government housing there.

So go ahead and sell your house without worrying about Uncle Sam. Unless you realize pretty significant profits or you’ve only lived there for a very short time, you can most likely do so tax-free. 

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.