The six-year rule for capital gains tax in Canada allows you to claim the principal residence exemption for a property you did not live in for the entire time you owned it. To do this, you must designate the property as your principal residence for each year you own it and meet the other requirements for the principal residence exemption.