The coefficient of variation formula in Excel
The coefficient of variation (CV) measures how spread out data is relative to its average. In Excel, you calculate it by dividing the standard deviation by the mean, then multiplying by 100 to express it as a percentage. The formula is: (Standard Deviation ÷ Mean) × 100.
To build this in a spreadsheet, you use two built-in functions: STDEV.S for standard deviation and AVERAGE for the mean. If your data sits in cells A2 through A20, the formula looks like this: =STDEV.S(A2:A20)/AVERAGE(A2:A20)*100. Excel calculates the result instantly once you press Enter.
The coefficient of variation is useful when you're comparing the variability of two datasets that have different scales or units. A CV of 15% means the data varies by 15% around the average; a CV of 50% means much more spread. Lower numbers indicate more consistent data.
Key Takeaways
- The coefficient of variation formula divides standard deviation by the mean and multiplies by 100 to show variability as a percentage.
- Use STDEV.S for sample data or STDEV.P for an entire population, paired with AVERAGE in a single formula.
- The CV lets you compare how consistent two datasets are even when they measure different things or use different scales.
- A lower coefficient of variation indicates more stable or predictable data; a higher one shows greater fluctuation.
- You can calculate CV for multiple groups in one spreadsheet by copying the formula down and adjusting the cell ranges for each group.
Setting up your data and choosing the right standard deviation function
Before you write the formula, decide whether your data represents a complete population or a sample. If you're working with every data point that exists (like all sales from your store last year), use STDEV.P. If your data is a subset or sample (like 50 customers out of thousands), use STDEV.S. Most business analysis uses STDEV.S because you're usually working with a sample.
Arrange your data in a single column or row with no blank cells in the middle of the range. If you have headers, start your range on the first data cell, not the header. For example, if "Sales" is in A1 and your numbers run from A2 to A50, your range is A2:A50, not A1:A50.
Remove any text, blank cells, or error values from your range before calculating. Excel's STDEV and AVERAGE functions skip text and blank cells automatically, but including them can distort your result. If you need to exclude specific rows, use a different range or filter your data first.
Writing and entering the coefficient of variation formula
Click on an empty cell where you want the result to appear. Type the formula exactly as shown, replacing the cell range with your own data range. For data in A2:A20, type: =STDEV.S(A2:A20)/AVERAGE(A2:A20)*100
Press Enter. Excel calculates the result and displays it as a number. If your result shows many decimal places (like 23.456789), you can round it for readability. Modify the formula to: =ROUND(STDEV.S(A2:A20)/AVERAGE(A2:A20)*100,2) to show only two decimal places.
If you see a #DIV/0! error, it means your AVERAGE is zero or your range is empty. Check that your data range is correct and contains numbers. If you see #VALUE!, you likely included text or a blank cell in your range — verify your range includes only numeric data.
Calculating coefficient of variation for multiple groups
If you have several groups of data and want to compare their variability, set up each group in its own column. Put a label at the top of each column, then write the CV formula for the first group in a cell below it. For example, if Group A data is in B2:B20 and Group B data is in C2:C20, write the formula for Group A in B22: =STDEV.S(B2:B20)/AVERAGE(B2:B20)*100
Write the formula for Group B in C22: =STDEV.S(C2:C20)/AVERAGE(C2:C20)*100. Now you can compare the two CVs side by side. A lower CV indicates that group's data is more consistent. This approach works for any number of groups — just repeat the pattern for each column.
Alternatively, if your data is arranged in rows instead of columns, adjust your ranges to match. The principle stays the same: one formula per group, each pointing to that group's data range.
Interpreting your coefficient of variation result
A coefficient of variation below 15% generally indicates low variability — the data is fairly consistent around the average. Between 15% and 30% suggests moderate variability. Above 30% means high variability, with data points spread far from the average.
These thresholds are not absolute rules; they depend on your field and what you're measuring. In manufacturing, a CV of 5% might be acceptable for quality control. In sales forecasting, a CV of 25% might be normal. Compare your CV to historical data or industry benchmarks for your situation.
The main strength of CV is comparing datasets with different units or scales. If you're comparing the variability of monthly revenue (in dollars) to the variability of customer count (in units), the CV lets you see which one is more stable relative to its own average. A revenue CV of 20% and a customer count CV of 18% tells you customer count is slightly more predictable.
Common mistakes and how to fix them
The most common error is forgetting to multiply by 100. The formula =STDEV.S(A2:A20)/AVERAGE(A2:A20) without the *100 gives you a decimal (like 0.234) instead of a percentage (23.4). Always include *100 at the end unless you specifically want the decimal form.
Another mistake is using the wrong standard deviation function. STDEV.S and STDEV.P give different results because STDEV.S divides by (n-1) while STDEV.P divides by n, where n is the number of data points. For sample data, STDEV.S is correct. Using STDEV.P on a sample understates variability.
Including zero values in your data can also skew results. If your data contains legitimate zeros (like days with zero sales), keep them. But if zeros represent missing data, remove them or use a different range. Similarly, negative numbers are valid in CV calculations, but double-check that negative values make sense in your context.
Using coefficient of variation in real scenarios
In quality control, manufacturers use CV to track whether a production process is becoming more or less consistent over time. If this month's CV is 8% and last month's was 12%, the process is improving. If it rises to 15%, something may need adjustment.
Sales teams use CV to compare the consistency of different salespeople or regions. A salesperson with a CV of 10% has predictable monthly performance; one with a CV of 40% has highly variable months. This helps managers identify who needs coaching or support.
Investors use CV to compare the risk of different investments. Two stocks might have the same average return, but one with a CV of 12% is more stable than one with a CV of 35%. The lower-CV stock is less risky, all else equal.
Frequently Asked Questions
What's the difference between standard deviation and coefficient of variation?
Standard deviation tells you how far data points typically fall from the average in the same units as your data. Coefficient of variation expresses that spread as a percentage of the average, so you can compare datasets with different scales. If one dataset has a standard deviation of 10 and an average of 100, its CV is 10%. If another has a standard deviation of 10 and an average of 1,000, its CV is 1% — much more consistent.
Should I use STDEV.S or STDEV.P?
Use STDEV.S when your data is a sample (a subset of a larger population). Use STDEV.P only when your data represents the entire population. In most business situations, you're working with a sample, so STDEV.S is the right choice. STDEV.P gives a slightly smaller result because it assumes you have all the data.
Can I calculate coefficient of variation for negative numbers?
Yes, the formula works with negative numbers. However, CV is most meaningful when all your data is positive or all negative. If your dataset mixes large positive and negative values, the average may be close to zero, making the CV very large or unreliable. In that case, consider whether CV is the right measure for your analysis.
What if my average is zero or negative?
If your average is exactly zero, the CV is undefined — you'll see a #DIV/0! error. If your average is negative, the CV formula still works mathematically, but the result can be misleading. Check your data to confirm the average should be zero or negative, and consider whether CV is appropriate for your analysis.
How do I format the result as a percentage in Excel?
After your formula calculates the result, select the cell and right-click. Choose "Format Cells," then select "Percentage" from the Category list. However, since your formula already multiplies by 100, formatting as percentage will multiply by 100 again, giving you the wrong number. Instead, format as a number with decimal places, or remove the *100 from your formula and then apply percentage formatting.