Mean, Median, Mode & Standard Deviation Calculator
Get the mean, median, mode, range, quartiles, variance and standard deviation of a list of numbers, with the working shown.
- Free
- No sign-up
- Runs in your browser
Mean, Median & Mode
Sorted data and working
Sorted data
Mean
Median
Standard deviation
Runs in your browser. Your inputs never leave your device.
In short
Quick Answer
The mean is the sum divided by the count, the median is the middle value once the numbers are sorted, and the mode is the most frequent value. For 2, 4, 4, 4, 5, 5, 7, 9 the mean is 40 ÷ 8 = 5, the median is (4 + 5) ÷ 2 = 4.5 and the mode is 4. The population standard deviation is 2, and the sample standard deviation (dividing by n − 1) is 2.1381.
Step by step
How to Use
- Enter your numbers. Type or paste values separated by commas, spaces or new lines.
- Choose decimal places. Pick how many decimal places to show in the results.
- Read the statistics. See the count, sum, mean, median, mode, range, quartiles, variance and standard deviation.
- Check the working. Follow the steps for the mean, median and standard deviation, and the sorted data.
Mean, Median or Mode: Which Average to Use
| Measure | What it tells you | Best for |
|---|---|---|
| Mean | The balance point of all values | Symmetric data without extreme outliers, such as heights or test scores |
| Median | The middle value; half are above, half below | Skewed data or data with outliers, such as incomes and house prices |
| Mode | The most common value | Categories and repeated values, such as shoe sizes or survey answers |
An outlier can move the mean a long way while leaving the median almost unchanged. For the values 30, 32, 35, 38 and 40, the mean and median are both 35. Replace 40 with 400 and the median stays 35, but the mean jumps to 107. That is why official income statistics usually report the median.
Reading the Standard Deviation
Standard deviation measures how far values typically sit from the mean, in the same units as the data. A small standard deviation means the values cluster tightly; a large one means they are spread out. For data shaped like a bell curve, about 68% of values fall within one standard deviation of the mean and about 95% within two.
- Variance is the standard deviation squared. It is used in further calculations but is in squared units, so it is harder to interpret directly.
- Range (max − min) is quick but depends only on the two most extreme values.
- Interquartile range (Q3 − Q1) covers the middle half of the data and ignores outliers. A common rule flags values more than 1.5 × IQR below Q1 or above Q3 as possible outliers.
In spreadsheets, STDEV.P and VAR.P match the population figures here, and STDEV.S and VAR.S match the sample figures. All calculations run in your browser, so you can paste private data safely.
The math
Statistics Formulas
Mean x̄ = Σx ÷ n · Population SD σ = √(Σ(x − x̄)² ÷ n) · Sample SD s = √(Σ(x − x̄)² ÷ (n − 1))
The median is the middle value of the sorted list, or the average of the two middle values when the count is even. The mode is the value that appears most often; if several values tie for the highest count they are all modes, and if every value appears equally often there is no mode. Quartiles use the median-of-halves method: Q1 is the median of the lower half and Q3 the median of the upper half, leaving out the overall median when the count is odd. Variance is the average squared distance from the mean, and standard deviation is its square root.
- Population (σ, divide by n): Use when your numbers are the whole group you care about, such as every test score in a class.
- Sample (s, divide by n − 1): Use when your numbers are a sample from a bigger group and you want to estimate that group's spread (Bessel's correction).
- IQR: Interquartile range, Q3 − Q1: the spread of the middle half of the data.
Examples
Worked Examples
2, 4, 4, 4, 5, 5, 7, 9
8 values
- Mean: (2 + 4 + 4 + 4 + 5 + 5 + 7 + 9) ÷ 8 = 40 ÷ 8 = 5
- Median: 8 values, so average the 4th and 5th: (4 + 5) ÷ 2 = 4.5
- Mode: 4 appears 3 times, more than any other value
- Squared deviations: 9, 1, 1, 1, 0, 0, 4, 16; sum = 32
- Population SD: √(32 ÷ 8) = √4 = 2; sample SD: √(32 ÷ 7) = 2.1381
Result: Mean 5, median 4.5, mode 4, σ = 2, s = 2.1381
1, 2, 3 (no mode)
3 values
- Mean: 6 ÷ 3 = 2; median: the middle value, 2
- Each value appears once, so there is no mode
- Population SD: √(2 ÷ 3) = 0.8165; sample SD: √(2 ÷ 2) = 1
Result: Mean 2, median 2, no mode
Quartiles of 1, 3, 5, 7, 9
5 values (odd count)
- Median: 5 (the 3rd value)
- Lower half without the median: 1, 3, so Q1 = 2
- Upper half without the median: 7, 9, so Q3 = 8
Result: Q1 = 2, Q3 = 8, IQR = 6
Watch out
Common Mistakes to Avoid
- Forgetting to sort before finding the median: The median is the middle of the sorted list. The middle of 9, 2, 5 as typed is 2, but the median is 5.
- Using the population formula for a sample: Dividing by n underestimates the spread when your data is a sample from a larger group. Use the sample standard deviation (n − 1) for surveys, experiments and measurements of a subset.
- Expecting one mode: Data can have one mode, several modes, or none. 1, 1, 2, 2, 3 has two modes (1 and 2); 1, 2, 3 has none.
- Comparing quartiles from different tools: There are several accepted ways to calculate quartiles, and they can give slightly different answers for the same data. Spreadsheets often interpolate (Excel's QUARTILE.INC); this calculator uses the median-of-halves method taught in many courses.
- Typing commas as decimal points: Commas separate values here, so 2,5 is read as two numbers, 2 and 5. Use a dot for decimals: 2.5.
FAQ
Frequently Asked Questions
How do you find the mean, median and mode?
Mean: add all values and divide by how many there are. Median: sort the values and take the middle one, or the average of the two middle ones. Mode: the value that appears most often.
What is the difference between population and sample standard deviation?
Population standard deviation divides the sum of squared deviations by n and describes a complete group. Sample standard deviation divides by n − 1 and estimates the spread of a larger population from a sample, so it is slightly larger.
How do I calculate standard deviation by hand?
Find the mean, subtract it from each value and square the result, add those squares, divide by n (population) or n − 1 (sample), then take the square root. The calculator shows each of these steps.
What if there is no mode?
If every value appears the same number of times, no value is more common than the others and the data has no mode. 1, 2, 3 has no mode.
Can a data set have more than one mode?
Yes. If two or more values tie for the highest count, they are all modes. 1, 1, 2, 2, 3 is bimodal with modes 1 and 2.
How are the quartiles calculated?
This calculator uses the median-of-halves method: split the sorted data into a lower and upper half (leaving out the median when the count is odd) and take the median of each half as Q1 and Q3.
How should I enter my numbers?
Separate numbers with commas, spaces, semicolons or new lines, and use a dot for decimals. You can paste a column straight from a spreadsheet.
Is the median or the mean better?
The mean uses every value but is pulled by outliers; the median is the middle value and is not affected by a few extreme numbers. For skewed data such as incomes or house prices, the median is usually more representative.
References