Generally, you can ignore a capital gain or loss you make when you sell your main residence (also referred to as ‘your home’). This is known as the ‘main residence exemption’. However, you generally can’t obtain the full main residence exemption if you have used any part of your home to produce income.
This fact sheet explains the capital gains tax implications of using part of your home for income-producing purposes while continuing to live in it. It does not deal with where you move out of your home and then use all of it for income-producing purposes (for example, by renting it to tenants).