capital gains

If I owned 2 houses and sold my matrimonial home with my now ex-husband, do I have to pay capital gains on the sale of the matrimonial home?