  We address metrological protocols for the estimation of the intensity and the
orientation of a magnetic field, and show that quantum-enhanced precision may
be achieved by probing the field with an arbitrary spin at thermal equilibrium.
We derive a general expression for the ultimate achievable precision, as given
by the quantum Fisher information, and express this quantity in terms of common
thermodynamic quantities. We also seek for the optimal observable, and show
that it corresponds to the spin projection along a suitable direction, defined
by a universal function of the spin temperature. Finally, we prove the
robustness of our scheme against deviations of the measured spin projection
from optimality.
