Capital gain tax for multiple buying points?

Can't find any articles on this.

But for example, ignoring allowances:

  • I buy 10 shares for R100 3 year ago
  • I buy another 10 shares 1 year ago for R200.
  • I sell 5 shares now for R250

Is capital gain tax per share calculated by the R250 less the average share cost of R150?