You can avoid the capital gains tax on a property only if your property is a foremost place of residency and you have spent a minimum of 2 years living there.