Generally, no exclusion is allowed on a sale of a principal residence if you owned or used the home for less than two of the five years preceding the sale (29.2). Similarly, an exclusion is generally disallowed if within the two-year period ending on the date of sale, you sold another home at a gain that was wholly or partially excluded from your income.
However, even if a sale of a principal residence is made before meeting the ownership and use tests or it is within two years of a prior sale for which an exclusion was claimed, an exclusion is available if the primary reason for the sale is: (1) a change in the place of employment, (2) health, or (3) unforeseen circumstances. If the sale is for one of these qualifying reasons, you are entitled to a prorated portion of the regular $250,000 or $500,000 exclusion limit. The employment change, health problem, or unforeseen circumstance can be attributable to you or another “qualified individual,” as defined below.
You automatically qualify for the reduced exclusion if your sale is within a safe harbor established by the IRS. If a safe harbor is not available, you may qualify by showing that the “facts and circumstances” of your situation establish that the primary reason for the sale was a change in the place of employment, health problem or unforeseen circumstances.
When you fall within a safe harbor or meet the primary reason test, you are allowed an allocable percentage of the regular $250,000 or ...