Question: what is the formula to calculate the magnetic moment?
Answer: Thus, for a single electron, with spin quantum number s = ​1⁄2, the component of the magnetic moment along the field direction is, from (3), |μ→S,z| = μB, while the (magnitude of the) total spin magnetic moment is, from (4), |μ→S| = √3 μB, or approximately 1.73 μB.