Use Standard Deviation Calculator

Enter your data below to use the Standard Deviation Calculator

📌 Try these examples:
RESULT

Last updated

What Is Standard Deviation?

Standard deviation measures how spread out values are from the mean (average). A low standard deviation means values cluster close to the mean; a high standard deviation means values are spread over a wider range. It's one of the most important statistics in data analysis, quality control, and scientific research.

Population vs Sample Standard Deviation

There are two formulas depending on whether your data is the entire population or a sample:

Text
Population σ = √[ Σ(xᵢ - μ)² / N ]
Sample s     = √[ Σ(xᵢ - x̄)² / (N-1) ]

Where:
  xᵢ = each value
  μ  = population mean
  x̄  = sample mean
  N  = count of values
  N-1 = Bessel's correction (reduces bias in sample estimates)

Step-by-Step Example

StepCalculationResult
Data[4, 7, 13, 2]
Mean(4+7+13+2) / 46.5
Deviations²(4-6.5)², (7-6.5)², (13-6.5)², (2-6.5)²6.25, 0.25, 42.25, 20.25
Variance (pop)69 / 417.25
Std Dev (pop)√17.254.153
Variance (sample)69 / 323.0
Std Dev (sample)√23.04.796

JavaScript Implementation

JavaScript
function stdDev(values, population = false) {
  const n    = values.length;
  const mean = values.reduce((a, b) => a + b, 0) / n;
  const variance = values.reduce((sum, x) => sum + Math.pow(x - mean, 2), 0)
                   / (population ? n : n - 1);
  return {
    mean: mean.toFixed(4),
    variance: variance.toFixed(4),
    stdDev: Math.sqrt(variance).toFixed(4)
  };
}

console.log(stdDev([4, 7, 13, 2]));
// { mean: '6.5000', variance: '23.0000', stdDev: '4.7958' }

Frequently Asked Questions

Simply enter your data, click the process button, and get instant results. All processing happens in your browser for maximum privacy and security.