Standard Deviation Calculator
Sample or population standard deviation and variance, with grouped data and a step-by-step deviation table.
This free statistics calculator finds the mean , median, mode, range, quartiles, IQR, outliers, standard deviation and variance of any data set, with every step shown, a histogram and a box plot.
Mean (x̄)
15.83333333
n = 12 values, median 15
The 12 values have a mean of 15.8333 and a median of 15. A typical value lies about 5.006 from the mean (sample standard deviation). The data are skewed to the right (skewness 0.9999): a longer tail of high values pulls the mean above the median.
| Class | Frequency | Relative frequency | Cumulative frequency |
|---|---|---|---|
| 5–9 | 1 | 8.333% | 1 |
| 10–14 | 4 | 33.33% | 5 |
| 15–19 | 5 | 41.67% | 10 |
| 20–24 | 1 | 8.333% | 11 |
| 25–29 | 1 | 8.333% | 12 |
Sort the data
From smallest to largest: 9, 11, 12, 13, 14, 15, 15, 15, 18, 19, 22, 27.
Mean
Add the values and divide by how many there are.
Median
n = 12 is even, so the median is the average of values number 6 and 7.
Quartiles (median of halves)
Split the sorted data into a lower half and an upper half of 6 values each. Q1 is the median of the lower half and Q3 the median of the upper half.
Sum of squared deviations
Subtract the mean from each value, square the result and add them up.
Variance and standard deviation
The sample versions divide by n − 1; the population versions divide by n.
Outlier fences (1.5 × IQR rule)
Every value lies inside the fences, so there are no outliers.
Mean
Plain-text formula: x̄ = (1/n)∑_{i = 1}^n x_i
The balance point of the data. The calculator adds the values with compensated (Neumaier) summation, so long lists lose no accuracy to rounding.
Median and mode
Plain-text formula: median = x_((n + 1)/2) (n odd), median = (x_((n/2)) + x_((n/2 + 1)))/2 (n even)
Here is the k-th value of the sorted list. The mode has no formula: it is the value that appears most often, and a data set can have one mode, several modes or none.
Sample and population variance
Plain-text formula: s^2 = (∑(x_i − x̄)^2)/(n − 1), σ^2 = (∑(x_i − μ)^2)/n
Both use the sum of squared deviations from the mean, computed with the two-pass algorithm (mean first, then deviations) for full precision. The standard deviation is the square root of the variance.
Interquartile range and outlier fences
Plain-text formula: IQR = Q_3 − Q_1, fences = Q_1 − 1.5 IQR and Q_3 + 1.5 IQR
The IQR is the spread of the middle half of the data. Values beyond the fences are flagged as possible outliers (Tukey’s rule, the same rule box plots use).
Standard error and coefficient of variation
Plain-text formula: SE = s/√(n), CV = s/|x̄|
The standard error estimates how much the sample mean would vary from sample to sample. The coefficient of variation expresses the spread as a percentage of the mean, which lets you compare data measured on different scales.
Geometric mean, harmonic mean and mean absolute deviation
Plain-text formula: G = (∏x_i)^(1/n), H = n/(∑1/x_i), MAD = 1/n∑|x_i − x̄|
The geometric mean suits growth rates and ratios, and the harmonic mean suits rates such as speeds; both need every value above 0. The mean absolute deviation is the average distance from the mean. Kurtosis is reported as the adjusted sample excess kurtosis (Excel KURT), which is about 0 for normally distributed data.
Start with the center: the mean and the median. When they are close, the data are roughly symmetric. A mean well above the median signals a long right tail (a few large values), and the skewness will be positive.
Then look at the spread. The standard deviation is the typical distance of a value from the mean, in the same units as the data. The IQR is the width of the middle 50% and is not affected by extreme values, so it is the better measure when outliers are present. The box plot shows both at a glance: the box spans Q1 to Q3, the line inside is the median and the whiskers reach the most extreme values inside the fences.
Flagged outliers are not errors by definition. Check whether each one is a typing mistake, a measurement problem or a genuine extreme value before you remove anything.
Take the scores 13, 16, 12, 14, 19, 12, 14, 13, 14. First sort them: 12, 12, 13, 13, 14, 14, 14, 16, 19. There are n = 9 values and their sum is 127.
Mean: divide the sum by the count, 127 / 9 ≈ 14.11. Median: with an odd count, take the middle value, number (9 + 1) / 2 = 5 in the sorted list, which is 14. With an even count, average the two middle values instead. Mode: 14 appears three times, more than any other value, so the mode is 14. Range: 19 − 12 = 7.
The calculator above follows the same steps and shows them with your own numbers, so you can check homework line by line. If you only need the average, a weighted average or the score needed to reach a target average, the average calculator is quicker.
Sort the data and find the median. For 4, 4, 6, 7, 10, 11, 12, 14, 15 the median is 10. With the median-of-halves method, Q1 is the median of the lower half 4, 4, 6, 7, so Q1 = 5, and Q3 is the median of the upper half 11, 12, 14, 15, so Q3 = 13. The interquartile range is IQR = 13 − 5 = 8.
The outlier fences are 5 − 1.5 × 8 = −7 and 13 + 1.5 × 8 = 25. Every value lies inside them, so this data set has no outliers. Together, the minimum, Q1, median, Q3 and maximum (4, 5, 10, 13, 15) form the five-number summary that a box plot draws.
Pair a measure of center with a measure of spread of the same kind. The table lists the common choices.
| Data | Center | Spread |
|---|---|---|
| Roughly symmetric, no outliers | Mean | Standard deviation |
| Skewed or with outliers (incomes, house prices, reaction times) | Median | IQR or the five-number summary |
| Categories or repeated whole numbers (shoe sizes, dice rolls) | Mode | Frequency table |
| Growth rates or ratios | Geometric mean | Range of the ratios |
Use the sample standard deviation (dividing by n − 1) when your values are a sample from a larger group, for example 30 students from a school or 12 batches from a production run. Dividing by n − 1 corrects for the fact that a sample tends to sit closer to its own mean than to the true mean.
Use the population standard deviation (dividing by n) only when the data include every member of the group you want to describe, such as the final scores of every player in one season. For large n the two are almost the same; for small n the sample version is noticeably larger. For the full working of the standard deviation alone, with grouped data, use the standard deviation calculator.
There is no single agreed definition of a quartile for a finite list. The median of halves method splits the sorted data at the median (leaving the median out when n is odd) and takes the median of each half. It always returns a data value or the midpoint of two data values.
The linear interpolation method places Q1 at position and Q3 at in the sorted list (counting from 0) and interpolates between neighbors. For the 11 values 6, 7, 15, 36, 39, 40, 41, 42, 43, 47, 49 the first method gives Q1 = 15 and Q3 = 43; the second gives Q1 = 25.5 and Q3 = 42.5. Choose the method your course, software or report expects.
On a TI-84, enter the data in a list with STAT, Edit, then run STAT, CALC, 1-Var Stats. It reports x̄, Σx, Sx (the sample standard deviation), σx (the population one), n, minX, Q1, Med, Q3 and maxX, which match this page with the median-of-halves quartile method. Casio scientific calculators with a statistics mode give the mean, standard deviations and count in the same way, though the quartile rule can differ by model.
In Excel or Google Sheets, the matching functions are AVERAGE, MEDIAN, MODE.MULT, STDEV.S, STDEV.P, VAR.S, VAR.P, QUARTILE.INC (choose linear interpolation here), SKEW and KURT. A handheld calculator is only needed when an exam bans other devices; for homework and checking, this page gives the same numbers with the working shown. See choosing the right calculator for when a scientific or graphing calculator fits better.
Summarize the scores 12, 15, 11, 18, 22, 15, 9, 14, 15, 27, 13, 19.
Answer: Mean ≈ 15.833, median 15, mode 15, range 18, Q1 = 12.5, Q3 = 18.5, no outliers, s ≈ 5.006, σ ≈ 4.793, standard error ≈ 1.445, coefficient of variation ≈ 31.62%.
For coursework, a graphing calculator such as the TI-84 Plus or a scientific calculator with a statistics mode, such as many Casio models, computes the mean, standard deviation and quartiles. Online, a statistics calculator like this one gives the same results with the working shown, and Excel or Google Sheets handle large data sets.
The mean adds every value and divides by the count, so a single extreme value can move it a lot. The median is the middle value of the sorted list and ignores how far the extremes are. For incomes or house prices the median is usually the more representative center.
When every value appears exactly once, the calculator reports no mode. When several values tie for the highest count (at least twice each), all of them are listed, so a data set can be bimodal or multimodal.
Quartile methods differ. Choose median of halves to match TI-84 calculators and most textbooks, or linear interpolation to match Excel QUARTILE.INC, Google Sheets QUARTILE and R’s default. The median, mean and standard deviation are the same either way.
Yes. Copy a column or a row and paste it into the data box: new lines, tabs, commas, semicolons and spaces all separate values. Remove any header cell and any thousands separators first.
Up to 10,000 values. All statistics are computed in your browser in a few milliseconds; long lists are shortened in the sorted-data display but every value is used.
It estimates how far the sample mean is likely to be from the true population mean. Roughly, the true mean lies within about two standard errors of the sample mean for moderately large samples.
Data with a few repeated values (such as dice rolls) get one bar per value. Otherwise the number of classes follows Sturges’ rule, ⌈log₂ n⌉ + 1 (between 5 and 20), and the class width is rounded up to a round number such as 2, 5 or 10 so the class limits are easy to read.
Sample or population standard deviation and variance, with grouped data and a step-by-step deviation table.
Z-scores, percentiles and normal probabilities with steps, a z-table and a shaded bell curve.
Line of best fit with r², slope p-value, 95% intervals and steps, plus five curved regression models.
Exact and cumulative Poisson probabilities for any average rate λ, with steps, a table and a graph.
The average (mean) of a list of numbers with steps, plus weighted averages and the score needed for a target.
Plot functions, equations, inequalities, parametric and polar curves; find roots and intersections.
Learn more: For statistics on a list of values in the full calculator, read statistics and distributions.
Results are calculated in your browser with methods checked by automated tests, and are intended for learning and general use. For engineering, medical, financial, legal or safety-critical decisions, verify important values independently and follow the rounding rules your work requires. How accurate are these results?