Standard Deviation Calculator | Sample & Population

Statistics, data and probability tool

Calculate sample or population standard deviation from raw observations, a frequency table, reliability weights or grouped class intervals. See the mean, variance, coefficient of variation, standard error, deviation table and substituted steps.

Last Updated: July 27, 2026
Sample and population formulas
Four supported data formats
Stable large-number calculations
Deviation chart and steps

Standard Deviation Calculator with Steps

Select the format that matches your data. The tool validates every entry and calculates from unrounded values inside your browser.

Runs in your browser
Choose your data format
Separate values with commas, spaces, semicolons, pipes or new lines. Examples: -4.5, 1/2 and 2e3.
Do not add units, currency signs, percent signs, headers or formulas. A comma separates entries or columns, so write 1000 instead of 1,000.

Standard deviation result

Calculated from unrounded values

Enter a valid dataset

The selected standard deviation and formula will appear here.

Mean-
Sample variance-
Count-
Coefficient of variation-

Calculated measures

MeasureValueMethod or meaning

Deviation table

Value Frequency Deviation Squared-deviation contribution z-score

A bounded preview will appear here.

Calculation steps

  1. Select a data format and calculate a valid dataset.

Recent calculations

Your six latest calculations will appear here for this page session.

How to Use This Standard Deviation Calculator

  1. Select Raw values, Frequency, Weighted or Grouped to match your dataset.
  2. Enter the observations or table rows. Raw values may use commas, spaces, semicolons, pipes or new lines. Table modes require one row per line.
  3. Choose Sample standard deviation when the data is a sample from a larger group. Choose Population standard deviation when the values describe the complete population of interest.
  4. Select the display precision. This changes displayed rounding only. It does not change stored inputs or intermediate calculations.
  5. Press Calculate standard deviation. Review the primary result, both formulas, deviation chart, row contributions and substituted steps.

The raw-data box accepts integers, negative values, decimals, simple fractions and scientific notation. For example, -2.5; 1/2; 3e2 becomes -2.5, 0.5 and 300. The parser checks whole tokens. It rejects text such as 12kg instead of silently reading it as 12.

Your entries stay in the current browser page. The tool supports up to 50,000 raw observations or 10,000 table rows. It combines duplicate frequency rows for a shorter result preview. Reliability-weighted rows remain separate because combining them would change the sample-weight correction.

What Standard Deviation Measures

Standard deviation measures how far values typically spread around their arithmetic mean. A result of zero means every positively counted value is identical. A small result means values cluster near the mean. A larger result means they are more dispersed in the dataset's original unit.

Standard deviation is never negative. It uses every observation and reacts strongly to extreme values because each deviation is squared before averaging. That sensitivity is useful when large deviations matter, but it also means one data-entry error can change the result. Review the deviation table and compare the result with robust measures before removing any value.

Same unit: If the values are measured in seconds, kilograms or points, standard deviation uses seconds, kilograms or points.
Variance: Variance is the squared standard deviation and therefore uses squared units.
Location shift: Adding the same constant to every value changes the mean but not standard deviation.
Scale change: Multiplying every value by k multiplies standard deviation by the absolute value of k.

Population Standard Deviation Formula

Use population standard deviation when the entered observations are the complete group you want to describe. Let N be the population size, xi each value and μ the population mean.

μ = Σxi / N
σ² = Σ(xi − μ)² / N
σ = √[Σ(xi − μ)² / N]

The formula first finds the mean. It then subtracts the mean from each value, squares each deviation, adds the squared deviations and divides by N. Taking the square root converts population variance back to the original unit.

A population is defined by the question, not only by dataset size. The monthly sales values for every month in one completed year form the full population if your question concerns only that year. The same values are a sample if you use them to estimate future years.

Sample Standard Deviation Formula

Use sample standard deviation when the observations are a subset used to estimate variability in a larger population. Let n be the sample size and x̄ the sample mean.

x̄ = Σxi / n
s² = Σ(xi − x̄)² / (n − 1)
s = √[Σ(xi − x̄)² / (n − 1)]

The denominator n − 1 applies Bessel's correction. Estimating the population mean from the same sample uses one degree of freedom. Dividing by n − 1 corrects the downward bias in sample variance under the usual independent-sampling assumptions.

Sample standard deviation is undefined for a single observation because its denominator is zero. This calculator reports it as unavailable. Population standard deviation for one value is zero because that complete one-value population has no spread.

Worked Standard Deviation Example

Consider the values 2, 4, 4, 4, 5, 5, 7 and 9. Their sum is 40 and the count is 8, so the mean is 40 ÷ 8 = 5. The deviations from 5 are -3, -1, -1, -1, 0, 0, 2 and 4.

StepPopulation calculationSample calculation
Sum of squared deviations3232
Variance32 ÷ 8 = 432 ÷ 7 = 4.571428571
Standard deviation√4 = 2√4.571428571 ≈ 2.13809

The numerator stays the same. Only the denominator changes. The sample result is larger because n − 1 is smaller than n. The calculator shows both results so you can inspect the difference, while the chosen formula controls the main result, chart intervals, variance card and z-scores.

Standard Deviation from a Frequency Table

A frequency table stores a value once and records how many times it occurs. Enter one value and one nonnegative whole-number frequency per line. The weighted mean becomes Σfx / Σf, and each squared deviation is multiplied by its frequency.

Mean = Σfx / Σf
Population variance = Σf(x − mean)² / Σf
Sample variance = Σf(x − mean)² / (Σf − 1)

The tool does not expand a frequency of one million into one million browser values. It calculates directly from the counts. Zero-frequency rows are ignored with a notice. Duplicate values are merged, and total frequency must remain within JavaScript's safe whole-number range.

Grouped interval data

Grouped data no longer contains the original observations. The calculator replaces each class with its midpoint and applies the class frequency. This is the standard midpoint approximation, but it cannot recover variation inside a class. The result is therefore labelled estimated.

Use true class boundaries. For classes 0 to 10, 10 to 20 and 20 to 30, the midpoints are 5, 15 and 25. Wider classes lose more detail. Overlapping intervals are rejected, while gaps produce a warning because they may be deliberate or may indicate a missing class.

Weighted Standard Deviation and Effective Sample Size

Weighted mode is for positive reliability or importance weights. The population calculation divides the weighted squared deviations by total weight. For the sample option, this calculator uses the reliability-weight correction below.

Weighted mean = Σwixi / W
Weighted population variance = Σwi(xi − mean)² / W
Corrected weighted sample denominator = W − (Σwi² / W)

The associated effective sample size is W² / Σwi². Equal weights produce the familiar unweighted correction. Unequal weights reduce effective sample size because a small number of heavily weighted values carry more influence.

Weights are not interchangeable. Integer repetition counts belong in frequency mode. Survey probability weights, clustered samples and stratified designs require methods based on the survey design. This general calculator does not replace specialist survey software or a documented sampling protocol.

How to Interpret a Standard Deviation Result

Interpret the result with the mean, data range, distribution shape and subject context. A standard deviation of 5 points may be small on a 1,000-point scale and large on a 10-point scale. Compare datasets only when units, measurement definitions and collection conditions are compatible.

For data that follow an approximately normal, bell-shaped distribution, about 68 percent of observations lie within one standard deviation of the mean, about 95 percent within two and about 99.7 percent within three. This empirical rule is a description of the normal model. Do not apply it automatically to skewed, bounded, multimodal or heavy-tailed data.

The deviation chart marks the entered range, mean, and one- and two-standard-deviation positions. It is a scale diagram, not a histogram and not evidence of normality. Weighted and grouped markers reflect the selected data representation.

Coefficient of variation

The coefficient of variation equals standard deviation divided by the absolute mean, multiplied by 100 percent. It expresses relative spread. It is most meaningful for ratio-scale measurements with a meaningful zero and a nonzero positive mean. It can mislead when the mean is near zero, when values cross zero or when zero is arbitrary, such as temperatures in Celsius.

Standard Deviation Compared with Other Spread Measures

MeasureWhat it reportsImportant limitation
Standard deviationSquare root of average squared distance from the meanSensitive to extreme values
VarianceAverage squared distance from the meanUses squared units
RangeMaximum minus minimumUses only two values
Interquartile rangeSpread of the middle 50 percentIgnores tail distances
Median absolute deviationMedian distance from the medianSoftware may report raw or scaled MAD
Standard errorEstimated uncertainty of the sample meanNot the spread of individual observations

Use the Statistics Calculator when you also need quartiles, outlier fences, skewness, kurtosis and a box plot. Use this page when standard deviation, variance and their substituted calculations are the main task.

Common Standard Deviation Mistakes

  • Choosing the formula by dataset size: The research question determines sample or population status, not whether the list looks large.
  • Rounding the mean too early: Early rounding changes every deviation. This calculator retains unrounded intermediate values.
  • Forgetting repeated observations: Every occurrence counts. Frequency mode preserves repetition without expanding the list.
  • Treating grouped results as exact: Class midpoints approximate unknown observations within each interval.
  • Mixing weight meanings: Counts, reliability weights and survey weights use different statistical assumptions.
  • Assuming a small standard deviation means accurate data: Low spread says values are close together. It does not prove the measurements are unbiased or correct.
  • Using the empirical rule without checking shape: The 68-95-99.7 percentages depend on an approximately normal distribution.

The calculation engine scales values before accumulating squared deviations. This reduces avoidable overflow, underflow and cancellation errors for large, small or closely spaced numbers. Results are still limited by ordinary browser floating-point precision, so preserve source data and use specialist software when audit-level decimal precision is required.

Related Calculators

Frequently Asked Questions

What is standard deviation?

Standard deviation measures the spread of numerical values around their arithmetic mean. It is the nonnegative square root of variance and uses the same unit as the original data.

What is the difference between sample and population standard deviation?

Population standard deviation describes a complete population and divides by N. Sample standard deviation estimates population variability from a sample and divides by n minus 1.

Why does sample standard deviation use n minus 1?

Using n minus 1 applies Bessel's correction. It adjusts for the downward bias created when the same sample is used to estimate both the mean and population variability.

Can standard deviation be negative?

No. Squared deviations are nonnegative, variance is nonnegative and its principal square root is also nonnegative.

What does a standard deviation of zero mean?

It means every observation with positive frequency or weight has the same numerical value. There is no spread around the mean.

Is standard deviation the same as variance?

No. Variance is the average squared deviation. Standard deviation is its square root, so standard deviation returns to the original measurement unit.

Do outliers affect standard deviation?

Yes. Squaring deviations gives extreme values strong influence. Check unusual observations for errors, but do not remove valid values only because they increase the result.

How do I calculate standard deviation from a frequency table?

Multiply each squared deviation by its frequency, add the products and divide by total frequency for a population or total frequency minus one for a sample. Then take the square root.

Is grouped-data standard deviation exact?

No. It replaces each unknown observation in a class with the class midpoint. The result is an estimate because within-class variation has been lost.

When is the coefficient of variation useful?

It helps compare relative spread for ratio-scale data with a meaningful zero and a nonzero mean. It is unreliable when the mean is near zero or zero is arbitrary.

Method and Use Note

The calculator reports descriptive results from the values you supply. It does not verify sampling independence, distribution shape, measurement quality or whether a chosen weighting method fits your study. Grouped calculations are midpoint estimates. Weighted sample calculations use the reliability-weight correction stated above.

Disclaimer: This educational calculator does not provide financial, scientific, medical or legal advice. Check critical results against your source data, documented statistical method and qualified professional review.

Post a Comment

0Comments

Post a Comment (0)