And your actual habitation of the home doesn't have to be sequential, notes Mark Luscombe, lawyer, accountant and principal tax analyst at CCH Inc., a Riverwoods, Ill.-based provider of tax law information and software. The IRS lets you aggregate your time living in the house to meet the two-year residency requirement.
"Generally, if you owned and used the home as your main home for periods totaling at least two years within five years ending on the date of the sale, you're eligible for the exclusion," says RIA's Trinz. "You look back at the last five years. Ownership and use may be at two different times. This would apply if you owned a home for five years, but didn't use it as your primary residence for that full period. For the first three years, you rented it and then moved into it as your main home for the final two before you sold it."
But you don't even have to live in the house at the date of sale. The flexibility of the use test means you could live in your house for a year, rent it for two, move back in for another year and rent it again the year before you sell. Since during those five years you owned and lived in the property for two years, you meet the use and ownership tests.
Finally, while technically there's no limit on the number of homes you can sell and reap tax-free gains, each sale must be at least two years apart. That still leaves you room to make some money on several properties. You can sell your residence this year, pocket any gain within the tax limits and buy a new residence. Two years later, you can do the same thing, again and again, every two years.
There even are situations where owners of multiple properties might be able to double up on the tax-free gain.
"There might be instances where you sell your primary residence and then establish your vacation home as your primary home for a couple of years and then sell that home," says Trinz. "Empty nesters who have a large suburban home could move into a vacation home at the beach and then as they get older move to a residential facility so they can sell both the homes and not have any taxable gains."
Be careful, however, if you move into a rental property you acquired through a like-kind exchange. The American Jobs Creation Act that was signed into law in 2004 establishes a tougher test in these cases. If the property you convert to your principal residence is one that you earlier obtained via a property swap, in order to take advantage of the home-sale exclusion you must have acquired the property at least five years earlier.
Michael E. Kitces, director of financial planning for the Pinnacle Advisory Group in Columbia, Md., gives this example: A property is acquired by like-kind exchange in 2000, converted to personal use as a residence in 2003 and then sold in late 2005. Since the like-kind property was owned for five years, it meets the new tax code ownership-length provision. And having met the new five-year acquisition rule for a swapped property, Kitces says, the owner qualifies for the capital-gains exclusion since he lived in the property for two years after its conversion. If, however, the property had been exchanged in 2002, even if the seller had made it his principal residence shortly after the date of the swap and thereby met the two-year use rule, he still would be not be able to exclude any profits on the sale.