Any unpaired electron is taken into consideration while trying to quantify spin only magnetic moment.
valence electrons can be unpaired (not always), and inner shell electrons are paired so the latter don’t contribute (since they are fully filled). That’s why usually only the outer shell electrons are considered.
and no it’s not calculated for ions only. You can use it for individual atoms too!
In your example $\ce{Cr^0}$, you can certainly consider that one unpaired electron in the s orbital,
- so giving a total of 6 unpaired electron it’s magnetic moment would be $\sqrt{48}$
By using the spin-only formula $M =\sqrt{n(n+2)}$ where $n$ is the number of unpaired electron and $M$ has the units of magnetic moment.
Caution this formula is applicable for d block elements only.
- Another example would be niobium, molybdenum it also has one unpaired electron in the 5s orbital and certainly we consider that electron while quantifying spin only magnetic moment.
Furthermore, the spin only magnetic moment of molybdenum is very close to that of chromium.
I am telling very close but not same because theoretically calculated magnetic moment don’t usually coincide with experimentally calculated they differ ever so slightly
Sources -
NCERT Chemistry for class 12 (pg no 221)
Descriptive Inorganic Chemistry by James E. House and Kathleen E. House by Elsevier. 2nd edition (pg no 329)
Shriver and Atkins Inorganic Chemistry, 5th edition (pg no 478)