One of the largest tax breaks available to most individuals is the ability to exclude up to $250,000 ($500,000 married) in capital gains on the sale of your personal residence. Making the assumption that this gain exclusion will always keep you safe from tax can be a big mistake. Here is what you need to know.

The rule’s basics

As long as you own and live in your home for two of the five years before selling your home, you qualify for this capital gain tax exclusion. In tax-speak you need to pass three hurdles:

Main home. This tax term defines what a main home is. It can be a traditional home, a condo, a houseboat, or mobile home. Main home also means the place of primary residence when you own two or more homes.

Ownership test. You must own your home during two of the past five years.

Residence test. You must live in the home for two of the past five years.

Some quirks.

You can pass the ownership test and the residence test at different times.

You may only use the home gain exclusion once every two years.

You and your spouse can be treated jointly OR separately depending on the circumstances.

When to pay attention

You have been in your home for a long time. The longer you live in your home the more likely you will have a large capital gain. Long-time homeowners should check to see if they have a capital gains tax problem prior to selling their home.

You have old home gain deferrals. Prior to the current rules, home-gains could be rolled into the next home purchased. These old deferred gains reduce the cost of your current home and can result in capital gain exposure.

Two homes into one. Often newly married couples with two homes have potential tax liability as both individuals may pass the required tests on their own property but not on their new spouse’s property. Prior to selling these individual homes, you may wish to create a plan of action that reduces your tax exposure.

Selling a home after divorce. Property transferred as a result of a divorce is not deemed a sale of your home. However, if the ex-spouse that retains the home later sells the home, it may have an impact on the amount of gain exemption available.

You are helping an older family member. Special rules apply to the elderly who move out of a home and move into assisted living and nursing homes. Prior to selling property it is best to review options and their related tax implications.

You do not meet the five-year rule. In some cases you may be eligible for a partial gain exclusion if you are required to move for work, disability, or unforeseen circumstances.

Other situations. There are a number of other exceptions to the home gain exclusion rules. This includes foreclosure, debt forgiveness, inheritance, and partial ownership.

A final thought

The key to obtaining the full benefit of this tax exclusion is in retaining good records. You must be able to prove both the sales price of your home and the associated costs you are using to determine any gain on your property. Keep all sales records, purchase records, improvement costs, and other documents that support your home’s capital gain calculation.