Spearman's rank correlation coefficient (ρ or rs) is calculated using the following steps:
Rank the data points for each variable. Calculate the difference (d) between the ranks of each pair of observations. Square these differences (d²). Use the formula: