The primary residence exclusion is not subject to apportionment when a part of the residence is used for trade purposes or when it is not ordinarily resided in for a part of the period of ownership.
The first step is to calculate the overall capital gain or loss on sale of the residence. Next you must work out what portion of that gain or loss relates to the primary residence. For example, if 10% of the residence was used as an office, and there was a capital gain of R2 million, then the capital gain attributable to the primary residence is R1,8 million (R2 million x 90%) and the R2 million exclusion is applied in full against this figure. So R200 000 (the portion of the capital gain which is not in respect of a primary residence) would be subject to CGT. The R2 million exclusion is, however, apportioned when more than one person has an interest in a residence. For example, if husband and wife each own 50% of a residence, they will each be entitled to only R1 million.