After divorce, your capital gains tax burden on the sale of a property owed with your ex-spouse can be difficult to determine.

Q: I separated from my husband five years ago, was divorced four years ago. As part of the divorce decree, he was to live in the house until both of our children went to college, which will happen this fall. At that point, he must pay me a lump sum settlement in exchange for me signing over my claim to the title of the home.

In looking at the IRS publication, the marital house was my primary residence, and my profit on the real estate is less than $250,000, but I didn’t physically live there for 2 out of the last five years. Is my reading correct that I owe long term capital gains taxes on the sale?

A: What you are referring to is the ability of a homeowner to exclude from federal income taxes the profits from the sale of a primary residence. The general rule is that a homeowner can exclude up to $250,000 in gains from tax on the sale of his or her primary residence so long as he or she lived in the home for 2 out of the last 5 years. (If you are married, the married couple can exclude from federal income taxes up to $500,000 in profits.) The IRS Publication that goes over these details is Publication 523 and you can find it on the IRS website.

In your situation, you might have to look at IRS Publication 504 which deals with divorced or separated individuals. The key to your question may be whether you have filed jointly or ceased filing jointly and when. According to the publications, “married individuals may exclude up to $500,000 of gain if they file a joint return and neither spouse excluded gain on the sale of another home within a previous 2-year period. If one spouse meets the ownership requirement, both are considered to have met the requirement. … However, each spouse must individually meet the residence requirement.”

However, if you own the home with your ex-husband, your ex-husband was permitted to remain in the home under the terms of the divorce decree and he used it as his primary residence, you may be considered to qualify under the residency rules and obtain the full exemption.

We suggest you talk to a tax professional further about your situation.

Finally, if you don’t qualify for the full exemption, you may qualify for a partial exemption. In your case you lived in the property for 1 out of the last 5 years. You may be entitled to a partial exemption so instead of getting a $250,000 exemption, you may get half of it, or $125,000. We don’t know what the profit from the sale of the home will be, but if the profit as a whole is $200,000, you ex-husband wouldn’t have to worry since his exemption would be the full $250,000 and you wouldn’t have to worry either since your share of the profits would be $100,000 and you could take up to $250,000.

As you can see, when you talk about federal income taxes, it can get quite complicated. In either case, a tax professional or an Enrolled Agent can give you further information when you give him or her all the details.

[amazon_link asins=’B00T40L0SS,B015JT2PQ8,B01EPZN7IC,B01LT4O9FM,B00FEIDURI’ template=’ProductCarousel’ store=’thinkglink-20′ marketplace=’US’ link_id=’2c3b1020-93f8-11e7-a893-4d88b957f6f8′]