Spearman’s Correlation coefficient measures correlation based on variables’ ranks instead of their values. It is more robust to outliers and ignores how spread out the values are, merely concerning itself with their ordering.
The formula is thus:
ρ = Spearman’s rank correlation coefficient
di = difference between the two ranks of each observation (e.g. rank(Xi) - rank(Yi))