StatsCalculators.com

Coefficient of Variation

Created:September 2, 2024
Last Updated:September 10, 2025

This calculator helps you analyze the relative variability of your data distribution. It calculates the coefficient of variation (CV), which is the ratio of the standard deviation to the mean expressed as a percentage. The CV helps you compare the degree of variation between datasets with different units or means. A lower CV indicates less variability relative to the mean, while a higher CV indicates greater variability. The calculator provides sample and population CV values, along with CV interpretation gauge and data distribution charts.

Quick Calculator

Need a quick calculation? Enter your numbers below:

Calculator

1. Load Your Data

2. Select Columns & Options

Related Calculators

Learn More

Coefficient of Variation (CV)

Definition

The Coefficient of Variation (CV) is a standardized measure of dispersion that expresses variability relative to the mean. It's particularly useful when comparing datasets with different units or widely different means.

Formula

Sample Coefficient of Variation:

CV=sxˉ×100%CV = \frac{s}{\bar{x}} \times 100\%

Population Coefficient of Variation:

CV=σμ×100%CV = \frac{\sigma}{\mu} \times 100\%

Where:

  • ss = sample standard deviation
  • xˉ\bar{x} = sample mean
  • σ\sigma = population standard deviation
  • μ\mu = population mean

Example

Consider two datasets:

Dataset A (temperatures in °C): 20,22,21,23,1920, 22, 21, 23, 19

Dataset B (heights in cm): 160,165,162,168,155160, 165, 162, 168, 155

Dataset A:

Mean=21 °CStandard Deviation=1.58 °CCV=1.5821×100%=7.52%\begin{align*} \text{Mean} &= 21\text{ °C} \\ \text{Standard Deviation} &= 1.58\text{ °C} \\ CV &= \frac{1.58}{21} \times 100\% = 7.52\% \end{align*}

Dataset B:

Mean=162 cmStandard Deviation=4.85 cmCV=4.85162×100%=2.99%\begin{align*} \text{Mean} &= 162\text{ cm} \\ \text{Standard Deviation} &= 4.85\text{ cm} \\ CV &= \frac{4.85}{162} \times 100\% = 2.99\% \end{align*}

Although Dataset B has a larger standard deviation, its CV is smaller, indicating less relative variability.

Key Points

  • Only applicable to ratio scale data with positive values and non-zero mean
  • Useful for comparing variability between datasets with different units or means
  • Generally expressed as a percentage

Common Interpretations

CV < 10%: Very low variability relative to the mean
10% ≤ CV < 20%: Low variability relative to the mean
20% ≤ CV < 30%: Moderate variability relative to the mean
30% ≤ CV < 40%: High variability relative to the mean
CV ≥ 40%: Very high variability relative to the mean

Limitations

  • Not meaningful for interval or ordinal scale data
  • Cannot be calculated for data with zero mean or negative values
  • Sensitive to outliers, like other measures based on mean and standard deviation

How to calculate Coefficient of Variation in R

Use sd() and mean()to calculate CV as a percentage.

R
# Sample data
data <- c(12, 15, 18, 20, 22, 25, 28, 30, 35, 40, 45, 50, 55, 60, 65)

# Calculate CV
cv <- (sd(data) / mean(data)) * 100

print(paste("Coefficient of Variation:", round(cv, 2), "%"))
# Coefficient of Variation: 49.12 %

# Create a function for reuse
coefficient_of_variation <- function(x) {
  cv <- (sd(x) / mean(x)) * 100
  return(round(cv, 2))
}

# Usage
cv_result <- coefficient_of_variation(data)
print(paste("CV:", cv_result, "%")) # CV: 49.12 %

How to calculate Coefficient of Variation in Python

Use numpy functions to calculate CV as a percentage.

Python
import numpy as np

# Sample data
data = [12, 15, 18, 20, 22, 25, 28, 30, 35, 40, 45, 50, 55, 60, 65]

# Calculate CV
cv = (np.std(data, ddof=1) / np.mean(data)) * 100

print(f"Coefficient of Variation: {cv:.2f}%")

# Create a function for reuse
def coefficient_of_variation(data):
    cv = (np.std(data, ddof=1) / np.mean(data)) * 100
    return round(cv, 2)

# Usage
cv_result = coefficient_of_variation(data)
print(f"CV: {cv_result}%")

How to calculate Coefficient of Variation in Excel

Use STDEV and AVERAGEfunctions to calculate CV as a percentage.

Excel
=(STDEV(A1:A100)/AVERAGE(A1:A100))*100

Step-by-step Method:

Cell B1: =AVERAGE(A1:A100) (Mean)

Cell B2: =STDEV(A1:A100) (Standard Deviation)

Cell B3: =(B2/B1)*100 (CV Percentage)

Interpretation:

  • 0-15%: Low variability
  • 15-25%: Moderate variability
  • 25%+: High variability