To minimize capital gains tax in Canada, you must designate the property as your principal residence for each year you own it. The number of years that you can claim the principal residence exemption is limited to four years.