D = N(N-1) / Sn(n-1)
(S = Sigma)
This is the formula the AQA use I Believe.
N = The total number of sampled organisms from ALL species.
n = The total number of sampled organisms for a PARTICULAR species.
Remember, Sigma means we have to add up all the n(n-1) values for all the species.
The higher the value of D, the higher the species diversity.
I'm pretty sure they always give you the formula and tell what each value means anyway - it's all just about being careful when putting the numbers into the formula.