Standard Deviation Calculator with Variance and IQR
Find the population and sample standard deviation and variance of a data set, with the mean, median, mode, quartiles, IQR, z-scores and a table of deviations. Free and private in your browser.
Separate numbers with commas, spaces or new lines.
Standard deviation
- Population standard deviation (σ, divide by n)
- 2
- Sample standard deviation (s, divide by n − 1)
- 2.1380899353
Sum of squared deviations Σ(x − mean)² = 32 over n = 8 values.
Variance
- Population variance (σ², divide by n)
- 4
- Sample variance (s², divide by n − 1)
- 4.57142857143
Sum of squared deviations Σ(x − mean)² = 32 over n = 8 values.
Quartiles and IQR
- First quartile (Q1)
- 4
- Third quartile (Q3)
- 6
- Interquartile range (IQR = Q3 − Q1)
- 2
Exclusive median method (TI-84): Q1 and Q3 are the medians of the lower and upper halves, leaving out the median itself when the count is odd. Spreadsheet functions such as Excel's QUARTILE.INC may give different values.
Z-score
Enter a value x to see how many standard deviations it lies from the mean.
z = (x − mean) / SD.
Summary
- Count (n)
- 8
- Sum
- 40
- Mean
- 5
- Median
- 4.5
- Mode
- 4
- Minimum
- 2
- Maximum
- 9
- Range
- 7
Deviations from the mean
| x | x − mean | (x − mean)² |
|---|---|---|
| 2 | -3 | 9 |
| 4 | -1 | 1 |
| 4 | -1 | 1 |
| 4 | -1 | 1 |
| 5 | 0 | 0 |
| 5 | 0 | 0 |
| 7 | 2 | 4 |
| 9 | 4 | 16 |
Standard Deviation Calculator
Paste a list of numbers and this calculator shows how spread out they are. It gives the population and the sample standard deviation and variance, the mean, median, mode and range, the first and third quartiles with the interquartile range, and the z-score of any value. A table lists every value with its deviation from the mean and the squared deviation, so you can check each step by hand.
How to use it
Steps
- Type or paste your numbers into Data set, separated by commas, spaces or new lines. The page opens with the example 2, 4, 4, 4, 5, 5, 7, 9.
- Read the Standard deviation and Variance panels. Each shows the population figure (divide by n) and the sample figure (divide by n − 1).
- Check Quartiles and IQR for the middle half of the data, and type a Value x to see its z-score.
- Scroll the deviation table to see each value's distance from the mean.
Formulas
Use the population standard deviation σ when the data are the whole group you care about, such as every score in one class. Use the sample standard deviation s when the data are a sample from a bigger group, such as 50 customers out of thousands. Dividing by n − 1 corrects the sample figure, which would otherwise come out slightly too small.
Worked example
2, 4, 4, 4, 5, 5, 7, 9
There are n = 8 values with a sum of 40, so the mean is 5. The deviations are -3, -1, -1, -1, 0, 0, 2 and 4, and their squares 9, 1, 1, 1, 0, 0, 4 and 16 add up to 32. The population variance is 32 / 8 = 4 and the population standard deviation is 2. The sample variance is 32 / 7 = 4.57142857143 and the sample standard deviation is 2.1380899353.
Quartile method
Quartiles use the exclusive median method, the one on TI-84 calculators. Q1 is the median of the values below the overall median and Q3 the median of the values above it; when the count is odd, the median itself is left out of both halves. For the example, the halves are 2, 4, 4, 4 and 5, 5, 7, 9, so Q1 = 4, Q3 = 6 and the IQR is 2. Spreadsheet functions such as Excel's QUARTILE.INC use a different method and can give different values. Quartiles need at least 4 values.
Mode and precision
The mode lists every value with the highest count. When no value repeats, the page says "No mode". The variance is found in two passes, the mean first and then the sum of squared deviations, so large values such as 1,000,000,004 keep their precision. Results show 12 significant digits. Values must lie between -1e150 and 1e150.
Privacy
Nothing is uploaded; every calculation runs in your browser and never leaves your device.
Related tools
For the sum, mean, median and a sorted copy of a list, use the Number List Calculator. The Variance Calculator, Z-Score Calculator and Quartile Calculator open this tool with that result first, and the Scientific Calculator handles any other sum.
Frequently asked questions
What is the difference between population and sample standard deviation?
The population standard deviation divides the sum of squared deviations by n and describes a complete group. The sample standard deviation divides by n − 1 (Bessel's correction) and estimates the spread of a larger population from a sample. For 2, 4, 4, 4, 5, 5, 7, 9 they are 2 and 2.1380899353.
How is the standard deviation calculated?
Find the mean, subtract it from each value, square each difference and add the squares to get the sum of squares. Divide by n for the population variance or by n − 1 for the sample variance, then take the square root to get the standard deviation.
Why does the sample standard deviation need at least 2 values?
It divides by n − 1, which is 0 for a single value, so it has no meaning. The page shows 'Needs at least 2 values' instead of a number, while the population standard deviation of one value is 0.
Which quartile method does the calculator use?
The exclusive median method used by TI-84 calculators: Q1 is the median of the values below the median and Q3 the median of the values above it, leaving out the median itself when the count is odd. Excel's QUARTILE.INC can give different values.
How is this different from the number list calculator?
The number list calculator summarises a list with its sum, mean, median, mode, range and sorted values. This calculator measures spread: standard deviation, variance, quartiles, IQR and z-scores, with every deviation shown.
How do I enter my data?
Paste or type numbers separated by commas, spaces or new lines. Anything that is not a plain number, such as a word, is left out and named in a note so you can fix it. Values must lie between -1e150 and 1e150.