The equation of CML likes this
E(c)= (1-y)*risk free + y*E(p) = risk free + y*[E(p) - risk free]
E(c): expected return of the completed portfolio
E(p): expected return of the risky portfolio
SD(c)= y*SD(p)
so the slope here is y= SD(c)/SD(p)
Usually, we are not asked to calculate this slope. Rather, given a number of assets located in the efficient frontier, we then find the portfolio combined of these assets that give us the highest Sharpe ratio.