Standard Deviation Calculator - Variance, Quartiles & More
Standard Deviation Calculator
| Count (n) | 10 |
| Sum | 291 |
| Mean (arithmetic) | 29.1 |
| Median | 30 |
| Mode (most frequent value) | No mode |
| Minimum | 12 |
| Maximum value | 45 |
| Range | 33 |
| First quartile (Q1) | 22.5 |
| Third quartile (Q3) | 37 |
| Interquartile range (IQR) | 14.5 |
| Sample variance (n−1) | 118.7667 |
| Sample standard deviation (n−1) | 10.898 |
| Coefficient of variation | 35.53% |
| Standard error of the mean | 3.4463 |
How these numbers are computed
- The mean is the sum of the values divided by the count.
- Each deviation from the mean is squared, so values above and below the mean both contribute positively.
- The squared deviations are summed and divided by n for the population variance, or by n−1 for the sample variance. Dividing by n−1 corrects the downward bias that appears because the mean was itself derived from the same data.
- The standard deviation is the square root of the variance, which returns the result to the units of the original data.
What Is
A data set has two kinds of centre, and they answer different questions. The mean is the arithmetic average, the sum divided by the count, and it uses every value in proportion to its magnitude, which makes it sensitive to outliers: one large measurement drags it noticeably. The median is the middle value once you sort the data, or the average of the two middle values when the count is even, and it ignores how far the extremes sit from the middle. When the distribution is roughly symmetric they agree, as they do for a list of exam scores. When it is skewed, by a few very large values or by a long lower tail, the median is the more honest description of a typical case and the mean is often the more useful one for further arithmetic. What neither of them tells you is spread. Two factories can both have a mean throughput of 100 units per hour while one is metronomic and the other swings between 40 and 160, and those two processes will behave completely differently under any change in demand, so measuring the dispersion is not a refinement, it is a different piece of information. The standard deviation is that measure, and it is defined as the square root of the variance, where the variance is the average squared distance of each value from the mean. The squaring is what makes the statistic computable, because without it values above and below the mean would cancel: a value 5 above the mean contributes −5 and a value 5 below contributes +5, and the sum would be zero for every data set.
Squaring removes the sign, so every deviation contributes positively and the total measures how far the data sits from the centre. But squaring changes the units, and that is exactly why the square root is taken back out at the end. Variance in seconds squared is not a quantity anyone can reason about; a standard deviation of 2.5 seconds can be compared directly with a mean of 12 seconds, added to a specification or fed into a further calculation. The critical fork is whether you divide by n or by n−1. The population variance divides by n and treats your list as the complete set, which is the correct description of the data you actually hold: the average squared deviation of these values from their own mean. The sample variance divides by n−1 and treats your list as a partial glimpse of a larger population, which is the correct way to estimate how much the population as a whole would vary. The reason for the correction is a subtle bias: the mean you divide by was itself computed from the same data, so it sits slightly closer to every point than the true population mean would, which makes each squared deviation slightly too small. Dividing by n−1 rather than n inflates the result by the factor n/(n−1), enough to remove that downward bias. The difference is negligible at n = 1000 and about 5 percent at n = 20, but it is the reason a reported standard deviation without its n is incomplete.
When the data is skewed or contains outliers, the standard deviation is inflated by those extremes and becomes hard to interpret, so report quartiles alongside it. The first quartile Q1 and third quartile Q3 bound the middle half of the data, and the interquartile range Q3 − Q1 measures spread while ignoring the bottom and top quarters entirely, which is why the IQR is the preferred measure whenever income, response time or any other heavy-tailed quantity is involved. To compare relative spread across quantities measured on different scales, use the coefficient of variation, which is the standard deviation divided by the magnitude of the mean and expressed as a percentage: 4 percent means the data spreads by about 4 percent of its own average. A standard deviation of 12 is meaningless on its own, but a coefficient of variation of 35 percent says this list is scattered relative to its size. Finally, the standard error of the mean, computed as the sample standard deviation divided by the square root of n, answers a subtly different question: it describes how precisely the mean itself has been estimated, and it shrinks as you collect more data at a rate of one over the square root of n, so quadrupling your sample size halves the uncertainty. The standard deviation describes your data; the standard error describes your knowledge of its mean. Keeping them apart is the difference between measuring a process and measuring your confidence in a measurement.
How to Use
- Open the Standard Deviation Calculator in your browser. Every figure is computed locally, so your values never leave your machine.
- Type or paste your numbers into the textarea, separated by spaces, commas or semicolons. A worked example is already loaded so you can see the output shape before entering anything.
- Check the red line under the box if one appears. Anything listed there was not parsed as a number, which usually means a stray unit, a percentage sign or a decimal comma slipped into the list.
- Tick or untick the sample checkbox labelled Treat the values as a sample of a larger population. Ticked, the headline variance and standard deviation divide by n−1; unticked, they divide by n.
- Read the count row first to confirm you pasted what you intended, then compare the mean with the median. A large gap between them means the data is skewed.
- Use the quartiles and the interquartile range for skewed or outlier-heavy data, since they describe the middle half and ignore the tails entirely.
- Use the coefficient of variation to compare two lists measured on different scales, and the standard error of the mean when you want to know how precisely the mean is known.
- Open the How these numbers are computed panel if you need to justify the formula behind any row in a report or a piece of coursework.
Examples
Input: 12, 15, 22, 24, 29, 31, 34, 38, 41, 45 with the sample box ticked
Process:
Mean 29.1, sum of squared deviations 1068.9, divided by n−1 = 9Result: Sample variance 118.7667, sample standard deviation 10.898 — population form would give 106.89 and 10.3388
Input: 65, 70, 72, 75, 78, 80, 82, 85, 88, 95
Process:
Symmetric data, so mean and median both land on 79Result: Sample standard deviation 8.9815, IQR 11.5, coefficient of variation 10.79% — a tight list relative to its own size
Input: 2, 4, 4, 4, 5, 5, 7, 9
Process:
Mean 5 but median 4.5, because the two largest values pull the average upResult: Population standard deviation exactly 2, IQR 1.5, two tied modes at 4 and 5
Input: 11.2, 11.5, 11.9, 12.1, 12.4, 13.8
Process:
Mean 12.15 seconds, sample variance 0.835 divided by 6 gives SEM 0.3731Result: Sample standard deviation 0.9138 seconds, standard error 0.3731 seconds, CV 6.87%
Related Searches
People also search for: standard deviation calculator, calculate standard deviation, sample standard deviation, population standard deviation, variance calculator, coefficient of variation.
standard deviation calculatorcalculate standard deviationsample standard deviationpopulation standard deviationvariance calculatorcoefficient of variationstandard error of the meaninterquartile rangequartilesdescriptive statisticsmean median modedata spreadskewed datarelative standard deviationsigma calculatorvariance formulaoutlier detection iqrstatistics onlineconfidence in the meanspread of numbers
Frequently Asked Questions
Should I divide by n or by n−1?
Divide by n if your list is the complete population you care about, for example every reading taken during a two-hour shift when your question is how variable that shift was. Divide by n−1 if your list is a sample drawn from a larger population, for example fifty customers surveyed when you want to estimate the spread of your whole customer base. The correction exists because your mean was calculated from the same values you are measuring deviations from, which pulls it slightly toward the centre and makes each squared deviation slightly too small. Dividing by n−1 inflates the variance by n/(n−1) to cancel that bias. The practical effect is that sample standard deviations run about 5 percent above population standard deviations at n = 20, only 1 percent at n = 100, and is irrelevant past a few thousand values. Publishing a standard deviation without stating which form you used is the most common statistical omission there is.
What is the difference between the mean and the median, and which should I use?
The mean is the sum divided by the count and it weights every value fully, so a single extreme observation pulls it a long way. The median is the middle value after sorting and it barely moves when an extreme value appears, because it depends only on the order of the data, not on how far apart the values are. They coincide on symmetric data and separate on skewed data. For a list such as 2, 4, 4, 4, 5, 5, 7, 9 the mean is exactly 5 while the median is 4.5, because the two largest values pull the average upward. Use the mean when you need it for further arithmetic, such as computing a percentage of the total or a weighted combination, and use the median when you want to describe a typical case in a distribution where a few large or small values dominate. If you report only one number for a skewed set, you will mislead whoever reads it.
Why do we take the square root of the variance?
Because the variance is measured in squared units and nobody can think in seconds squared. The squaring is a mathematical necessity rather than a choice: deviations from the mean come in opposite signs, and without squaring, a value 5 above cancels a value 5 below exactly, so every data set would report a variance of zero. Squaring makes all contributions positive, and the resulting total scales with the square of the spread. Dividing by n or n−1 gives a variance in units of time squared, which cannot be compared with anything meaningful. Taking the square root restores the original units, so a standard deviation of 0.83 seconds means the data genuinely sits about 0.83 seconds from the mean, a statement that can be checked against a specification, added to a threshold or fed into a subsequent formula. This is why the standard deviation, not the variance, is what people quote when they say how much their data varies.
What is the interquartile range for, and when is it better than the standard deviation?
The interquartile range, or IQR, is Q3 minus Q1 and it measures the width of the middle half of the data, discarding the bottom quarter and the top quarter entirely. That is exactly what makes it robust. The standard deviation uses every value in proportion to how far it sits from the mean, so one corrupted reading or one customer who entered their income as 900000 instead of 90000 inflates it dramatically. The IQR is unaffected. For the list 11.2, 11.5, 11.9, 12.1, 12.4, 13.8 the standard deviation is about 0.91 seconds and the IQR is about 0.73 seconds, a modest difference; add a single stray value of 500 and the standard deviation climbs past 180 while Q1 and Q3 barely move. Reporting the IQR alongside the median is the standard defensive pairing for skewed data such as income, house prices and latency. The common rule of thumb is that values more than 1.5 times the IQR beyond Q1 or Q3 are worth inspecting as possible outliers.
What does the coefficient of variation tell me that the standard deviation does not?
The coefficient of variation divides the standard deviation by the absolute size of the mean and expresses the result as a percentage, which turns an absolute spread into a relative one. A standard deviation of 10 is uninterpretable on its own: it is enormous if the mean is 12 and negligible if the mean is 5000. Expressing it as a ratio removes the units and the scale entirely. In the calculator, the default list has a coefficient of variation of about 35.5 percent while a tighter set of exam scores has about 10.8 percent, which tells you at a glance that the first list is scattered relative to its own size while the second is not. This is what makes it the right statistic for comparing datasets measured in different units, such as comparing the relative variability of daily sales in euros against relative variability of daily sales in dollars, or across populations with very different scales. One caveat: it becomes meaningless when the mean is close to zero, since you are dividing by something tiny.
What is the standard error of the mean, and how is it different from the standard deviation?
The standard error of the mean, written SEM, is the sample standard deviation divided by the square root of n. It answers a different question from the standard deviation itself. The standard deviation describes how far your individual data points sit from the mean; the standard error describes how precisely your estimate of the mean is known. Because the mean of many observations settles down around the true value, its uncertainty shrinks as more data arrives, specifically at a rate of one over the square root of n, which means you need four times as much data to halve the standard error and sixteen times as much to quarter it. For the default list of ten values with a sample standard deviation of 10.898, the standard error is about 3.45, so a mean of 29.1 carries an uncertainty on the order of plus or minus three or so. When you report a mean in a paper or a report, reporting the standard error alongside it tells the reader how much to trust it. Do not confuse it with the standard deviation of the raw data, which is usually the larger of the two.
Why does my mode say no mode?
The calculator reports a mode only when at least one value occurs more than once, because a list where every value appears exactly once genuinely has no mode. This is the strict textbook definition and it differs from how some software behaves. Excel, for instance, can return multiple results or the lowest value in ways that surprise people. The tool also reports all tied modes rather than picking one, so the list 2, 4, 4, 4, 5, 5, 7, 9 returns both 4 and 5, since each appears three times. A bimodal distribution is often more informative than either value alone: two peaks usually mean your data contains two distinct populations, such as two customer groups or two operating conditions, and lumping them into one mean and one standard deviation will hide that structure. When you see two modes, split the data and analyse the halves separately.