When a part of your home is used as a home office, that part is considered to “taint” the primary residence exclusion for CGT purposes.
Upon the sale of the home, the overall capital gain or loss will need to be apportioned between the tainted and untainted elements. This apportionment is done by taking into consideration the portion of the home being used for business purposes as a home office (based on floor area) and the period that the part was used as a home office. The primary residence exclusion can only be set-off against the untainted portion of the capital gain or loss. The tainted portion of the capital gain must be fully brought to account.