Selling your home and moving into a smaller one or a condo is seldom an easy decision, but at least part of the decision-making process is a little easier in light of an exclusion that eliminates most people’s federal tax liability on gain from the sale or exchange of their homes.

Under these rules, up to $250,000 of the gain from the sale of single person’s principal residence is tax-free. For certain married couples filing a joint return, the maximum amount of tax-free gain doubles to $500,000.

Like most tax breaks, however, the exclusion has a detailed set of rules for qualification. Besides the $250,000/$500,000 dollar limitation, the seller must have owned and used the home as his or her principal residence for at least two years out of the five years before the sale or exchange. In most cases, sellers can only take advantage of the provision once during a two-year period.

However, a reduced exclusion is available if the sale occurred because of a change in place of employment, health, or other unforeseen circumstances where the taxpayer fails to meet the two-year ownership and use requirements or has already used the exclusion for a sale of a principal residence in the past two years. A sale or exchange is by reason of unforeseen circumstances if the primary reason for the sale or exchange is the occurrence of an event that the taxpayer does not anticipate before purchasing and occupying the residence. Unforeseen circumstances that are eligible for the reduced exclusion include involuntary conversions, certain disasters or acts of war or terrorist attacks, death, cessation of employment, change of employment resulting in the taxpayer’s inability to pay certain costs, divorce or legal separation, multiple births from the same pregnancy, and events identified by IRS as unforeseen circumstances (for example, the September 11 terrorist attacks). The amount of the reduced exclusion equals a fraction of the $250,000/$500,000 dollar limitation. The fraction is based on the portion of the two-year period in which the seller satisfies the ownership and use requirements.

These rules can get quite complicated if you marry someone who has recently used the exclusion provision, if the residence was part of a divorce settlement, if you inherited the residence from your spouse, if you sell a remainder interest in your home, if there are periods after 2008 in which the residence isn’t used as your (or your spouse’s) principal residence, or if you have taken depreciation deductions on the residence. Also, the exclusion does not apply if you acquired the residence within the previous five years in a “like-kind” exchange in which gain was not recognized.

For more information please see IRS Publication 523 and talk to one of our tax professionals.