How this calculation works
The coefficient of variation expresses spread relative to the mean. It is most meaningful for ratio-scale measurements with a positive, nonzero mean and a meaningful zero.
CV (%) = standard deviation ÷ |mean| × 100A worked example
Mean 50 with standard deviation 5 has a coefficient of variation of 10%.
Good to know
Assumes the idealized model described above. Use consistent units and independently verify figures before a consequential decision.
Relative spread survives a change of measurement units
A mean of 100 cm and standard deviation of 5 cm give a CV of 5%. Express the same data as mean 1 m and standard deviation 0.05 m and the CV stays 5%. Scaling both quantities by the same positive factor cancels in the ratio.
Adding a constant does not cancel. That is why a relative-spread comparison needs a meaningful zero. Celsius temperatures, for example, do not have a ratio-scale zero that makes a naive CV interpretation appropriate.
A near-zero mean can make the ratio unstable
Dividing by a very small mean can create a huge CV even for a modest standard deviation. Such a result needs context and may be less informative than reporting the mean and spread directly.
This implementation uses the magnitude of the mean in its denominator. That explicit numerical convention does not make a negative-mean ratio-scale interpretation meaningful in every application.
A few questions, answered
Is CV expressed in the original units?
No. The units cancel and the result is shown as a percentage.
Can a zero mean be used?
No. The ratio is undefined when the denominator is zero.