← All how-to recipes

How to calculate the coefficient of variation

✓ Verified in LibreOffice 25.8.7.3

Compare the spread of two datasets on different scales — is revenue or headcount more volatile? — using variation relative to the mean, as a single percentage.

The formula

AppFormulaNotes
Excel=STDEV.S(A2:A100)/AVERAGE(A2:A100)CV = standard deviation ÷ mean. Use STDEV.P for a whole population. Format as % or ×100. Only meaningful for positive-valued, ratio-scale data.
Google Sheets=STDEV(A2:A100)/AVERAGE(A2:A100)STDEV = sample; STDEVP = population. Same ratio.
LibreOffice Calc=STDEV(A2:A100)/AVERAGE(A2:A100)Identical.

How it works

The coefficient of variation (CV, or relative standard deviation) divides the standard deviation by the mean, stripping out the units so you can compare variability across datasets of totally different magnitudes — a CV of 0.30 means 'the spread is 30% of the average' whether you're measuring dollars or seconds. For {10,20,30,40} the sample standard deviation is ≈12.91 and the mean is 25, giving CV ≈ 0.5164 (about 52%). Choose STDEV.S when your data is a sample and STDEV.P when it's the entire population — the divisor differs (n-1 vs n). Two guardrails: CV only makes sense for ratio data with a true zero and positive values (it's meaningless if the mean is near zero or negative), and a small mean can inflate it dramatically. It's widely used in finance (risk per unit of return) and quality control to rank consistency.

Verified, not just documented

We ran =ROUND(STDEV.S(A2:A5)/AVERAGE(A2:A5),4) in LibreOffice 25.8.7.3 (headless, with forced recalculation) and it returned 0.5164 — exactly the expected result. Every formula here is confirmed by actually executing it.

Functions used

STDEV.S · AVERAGE · STDEV — see full Excel, Google Sheets & LibreOffice compatibility for each.

Related recipes

Related comparisons