Do you have to pay capital gains tax on a home sale?

Pink piggy bank with trail of coins to a house

Selling your house for a profit in this day and age may seem like the economic equivalent of Ponce de Leon’s search for the fountain of youth.

But if you can somehow pull off this amazing feat, the IRS usually doesn’t make you pay capital gains tax on your earnings.

Under Section 121 of the Internal Revenue Code, taxpayers can keep up to $250,000 (or up to $500,000 for married couples) of the gain realized from the sale of a home.

Many remember the prior rule, which required homeowners to roll over gain from the sale of a residence into a new home. That rule went away in 1997, leaving us with the current Section 121.

In order to take advantage of this gain exclusion, the seller must:

Be selling a principal residence. This excludes vacation homes or rental properties.

Have owned the home for two of five years preceding the sale. If, for example, the sale closes on Jan. 1, 2012, then the seller must have owned the home for at least two years between Jan. 1, 2007, and Jan. 1, 2012. Those two years need not be concurrent.

Have used the home as a principal residence for two of five years preceding the sale. Again, if the sale closes on Jan. 1, 2012, then the seller needs to have used the home as a residence for at least two years from Jan. 1, 2007, through Jan. 1, 2012. And, again, the use of the home need not be concurrent.

Since these rules can be about as clear as mud, here is an example:

Andrew purchases a home on January 1, 2007, for $100,000.

He lives in that home from Jan. 1, 2007, to Jan. 1, 2008, before moving to a different city during 2008, 2009 and 2010 and using the property as a vacation home.

Andrew returns and lives in the home again during all of 2011 and sells the home on Dec. 31, 2011, for $150,000.

His capital gain on the sale is $50,000 ($150,000 selling price less $100,000 original purchase price).

But that profit is exempt from capital gains tax because he owned the home for all five years preceding the sale and he ended up using the home as his principal residence for two of the five years preceding the sale (2007 and 2011).

Clint Costa is an attorney and CPA at the Chicago law firm of Shaheen, Novoselsky, Staat & Filipowski in Chicago.

Follow Interest.com on Twitter.