The exemption applies for each year the property was genuinely your principal residence, and a family typically designates one property as such at a time, so a second property or a period the home was rented out can change the calculation.
Reporting still matters even when no tax is owed. The Canada Revenue Agency requires the sale to be declared on your return for that tax year, and skipping that step can put the exemption itself at risk if the CRA ever reviews the file.
If your ownership history is anything other than straightforward, one home, one owner, one residence, that's worth confirming with an accountant before you list, not after, especially with the city benchmark at $444,700 and real money riding on the answer. Get your hand-reviewed valuation from Joel Dyck.