It sounds like your basement rental could be a no disposition situation.
A primary residence generally includes a house, apartment, holiday home, caravan or similar residential unit that you own or share with another person or persons. You, your current or former spouse or partner, or one of your children must have lived on the property during the year to qualify.
Interestingly, if you rent out your entire house to your child, it may still be considered a primary residence, even though the income generating use is more than just a secondary use.
Also, the normally inhabited rule does not require continued use of the property, and this can allow a seasonal vacation home to qualify for an exemption.
Assuming you didn’t claim a flat rate capital charge on your tax return when you reported your rental income, and either you or one of your sons has lived in the house every year you owned it, the property can be your primary residence for everyone It was owned for years, so any sales proceeds would be tax-free. This assumes that you have not applied for a primary residence exemption for any other properties that you sold in any of those years.
You can claim the primary residence exemption on your tax return if the property is sold by reporting the sale and listing the property as your primary residence on Appendix 3 of your tax return. You will also need to fill out Form T2091 (or Form 1255 to designate a property as the primary residence for a deceased taxpayer).
It is important to note that while a parent can claim a house their child lives in as their primary residence, it does not work the other way around. In other words, a taxpayer’s property that is occupied by one of the parents is not considered to be that taxpayer’s primary residence.
The rules for the main residence exemption can be complicated in situations where part or all of the property is used for business or rental purposes. However, with some exceptions or by filing elections, the tax-exempt status can be maintained.