Effective Jan. 2023 the Government has introduced an “anti-flipping tax” to reduce the speculative demand and to help cool the housing market.
To avoid paying tax on the profit, you will have to live in the home for a minimum of 365 days, before being able to sell.
There are some exceptions to this new rule such as death of the individual, work relocation, breakdown of relationship etc.
Previous to this new tax rule , a Principle Residence exemption was available to shelter the capital gains if you or your spouse/ child, lived in the home for at least part of the year, and the home did not provide income (rental income).