Mean, Median, Mode & Standard Deviation Calculator
Mean, median, mode, range, variance and standard deviation — every step shown, plus quartiles and Excel formulas.
100% in your browser — nothing uploadedFind the mean, median, mode, range and standard deviation — with every step shown
Decimals: use a period or a comma — 99.5 or 99,5. Accepts newline, comma, space, or tab separators.
Central tendency & range
Dispersion
Step by step
Shape & quartiles
| Value | Frequency | % of total |
|---|
Descriptive statistics in Excel and Google Sheets
Excel and Google Sheets have built-in functions for nearly every descriptive statistic. Put your data in the range A1:A100 (or whatever fits) and use the formulas below.
=COUNT(A1:A100) Count
=SUM(A1:A100) Sum
=AVERAGE(A1:A100) Mean
=MEDIAN(A1:A100) Median
=MODE.SNGL(A1:A100) Mode (single)
=MODE.MULT(A1:A100) Mode (all — array)
=MIN(A1:A100) Min
=MAX(A1:A100) Max
=MAX(A1:A100)-MIN(A1:A100) Range
=AVEDEV(A1:A100) Mean absolute deviation
=VAR.P(A1:A100) Population variance (÷n)
=VAR.S(A1:A100) Sample variance (÷(n−1))
=STDEV.P(A1:A100) Population std dev
=STDEV.S(A1:A100) Sample std dev
=QUARTILE.INC(A1:A100,1) Q1 (25th percentile)
=QUARTILE.INC(A1:A100,2) Q2 (median)
=QUARTILE.INC(A1:A100,3) Q3 (75th percentile)
=SKEW(A1:A100) Skewness (sample)
=KURT(A1:A100) Kurtosis (excess, sample)MODE.MULT returns a vertical array of all modes. In Excel, select several cells in a column, type the formula, and confirm with Ctrl+Shift+Enter (or just Enter in Microsoft 365 with dynamic arrays). In Google Sheets, MODE.MULT does not exist: use =UNIQUE(FILTER(A1:A100, COUNTIF(A1:A100, A1:A100)=MAX(COUNTIF(A1:A100, A1:A100)))).
Descriptive statistics in SQL (PostgreSQL)
PostgreSQL provides aggregate functions for the most common statistics. Given a table data with a numeric column value, this query returns all the indicators in a single row.
SELECT
COUNT(value) AS n,
SUM(value) AS total,
AVG(value) AS mean,
PERCENTILE_CONT(0.5) WITHIN GROUP (ORDER BY value) AS median,
MODE() WITHIN GROUP (ORDER BY value) AS mode,
MIN(value) AS min_val,
MAX(value) AS max_val,
MAX(value) - MIN(value) AS range,
VAR_POP(value) AS var_pop,
VAR_SAMP(value) AS var_samp,
STDDEV_POP(value) AS stddev_pop,
STDDEV_SAMP(value) AS stddev_samp,
STDDEV_SAMP(value) / SQRT(COUNT(value)) AS std_error,
PERCENTILE_CONT(0.25) WITHIN GROUP (ORDER BY value) AS q1,
PERCENTILE_CONT(0.75) WITHIN GROUP (ORDER BY value) AS q3
FROM data;PostgreSQL had no direct MODE() aggregate before version 9.4; since then use MODE() WITHIN GROUP (ORDER BY value). For mode in MySQL, group by value, count, and filter for the maximum.
How to find the mean, median, mode and standard deviation
Quick answer: the mean is the sum divided by how many values there are; the median is the middle value once the data is sorted (the average of the two middle values when the count is even); the mode is the value that appears most often; the range is max minus min; and the standard deviation is the square root of the average squared distance from the mean. Paste your numbers above and the step-by-step panel works each one out the way it is done on paper — the sum, the sorted list, the deviation table — so you can check homework line by line.
Paste or type a list of numbers and get a full descriptive statistics summary: count, sum, mean, median, mode, range, minimum, maximum, mean absolute deviation, population and sample variance, population and sample standard deviation, standard error, coefficient of variation, skewness, kurtosis, and the five-number summary (Q1, Q2, Q3, IQR). You can also upload a CSV file with a single column of numbers.
Every calculation runs locally in your browser — your data never leaves your device. The tool includes ready-to-use Excel and Google Sheets formulas (AVERAGE, MEDIAN, STDEV.S, STDEV.P, QUARTILE.INC) and SQL equivalents (AVG, STDDEV_POP, PERCENTILE_CONT) so you can reproduce the same results in your own workflow.
The formulas
| Measure | Formula | What it tells you |
|---|---|---|
| Mean (x̄) | Σx ÷ n | The balance point of the data |
| Median | The middle value of the sorted data; the average of the two middle values if n is even | The center, not pulled by outliers |
| Mode | The most frequent value — there can be none, or several | The most typical value |
| Range | max − min | The total spread |
| Mean absolute deviation | Σ|x − x̄| ÷ n | The average distance from the mean |
| Variance | σ² = Σ(x − x̄)² ÷ n (population) · s² = Σ(x − x̄)² ÷ (n − 1) (sample) | Spread, in squared units |
| Standard deviation | σ = √σ² · s = √s² | Spread, in the data’s own units |
Worked example, step by step
- Data: 12, 15, 18, 22, 25, 28, 30, 30, 35, 40 (n = 10).
- Mean: 255 ÷ 10 = 25.5.
- Median: n is even, so average the 5th and 6th values: (25 + 28) ÷ 2 = 26.5.
- Mode: 30, the only value that appears twice. Range: 40 − 12 = 28.
- Deviations from 25.5 (table below): their absolute values add up to 71 and their squares to 708.5.
- Mean absolute deviation: 71 ÷ 10 = 7.1.
- Variance: 708.5 ÷ 10 = 70.85 (population) or 708.5 ÷ 9 = 78.72 (sample).
- Standard deviation: √70.85 = 8.42 (population) or √78.72 = 8.87 (sample).
| x | x − x̄ | |x − x̄| | (x − x̄)² |
|---|---|---|---|
| 12 | −13.5 | 13.5 | 182.25 |
| 15 | −10.5 | 10.5 | 110.25 |
| 18 | −7.5 | 7.5 | 56.25 |
| 22 | −3.5 | 3.5 | 12.25 |
| 25 | −0.5 | 0.5 | 0.25 |
| 28 | 2.5 | 2.5 | 6.25 |
| 30 | 4.5 | 4.5 | 20.25 |
| 30 | 4.5 | 4.5 | 20.25 |
| 35 | 9.5 | 9.5 | 90.25 |
| 40 | 14.5 | 14.5 | 210.25 |
| Σ | 0 | 71 | 708.5 |
Common mistakes
| Mistake | Why it is wrong | Instead |
|---|---|---|
| Dividing by n for a sample | It understates the spread of the wider population. | Divide by n − 1 (Excel STDEV.S) unless the data is the whole group. |
| Finding the median without sorting | The middle of an unsorted list is just a random value. | Sort first, then take position (n + 1) ÷ 2. |
| Picking one middle value when n is even | An even count has two middle values. | Average them: (25 + 28) ÷ 2 = 26.5. |
| Rounding the mean before the deviations | Small rounding errors add up across every squared deviation. | Keep full precision until the final answer. |
| Reporting the variance as the spread | Variance is in squared units (points², cm²). | Report the standard deviation, which is in the original units. |
| Saying the mode is 0 when nothing repeats | “No mode” and “mode = 0” are different answers. | If no value repeats, the data has no mode. |
Reference tables
FAQ
What is the difference between population and sample standard deviation?
Population standard deviation (σ) divides by N and assumes you have every value in the group. Sample standard deviation (s) divides by N−1 and corrects for the fact that a sample underestimates spread. Use sample when your data is a subset of a larger group — which is almost always the case.
What do skewness and kurtosis tell me?
Skewness measures asymmetry: positive means a right tail, negative means a left tail, zero means symmetric. Kurtosis measures tail heaviness: a value above 3 (excess above 0) means heavier tails than a normal distribution, below means lighter. Together they tell you whether the mean and standard deviation are good summaries or whether outliers dominate.
Can I use this with data from a spreadsheet?
Yes. Copy a column from Excel or Google Sheets, paste it into the input box, and the calculator parses one number per line. You can also upload a CSV file directly.
How do you find the standard deviation step by step?
1) Find the mean. 2) Subtract the mean from each value. 3) Square each difference. 4) Add up the squares. 5) Divide by n for a population or by n − 1 for a sample — that is the variance. 6) Take the square root. For 12, 15, 18, 22, 25, 28, 30, 30, 35, 40: mean 25.5, sum of squares 708.5, sample variance 78.72, sample standard deviation 8.87.
How do you find the median with an even number of values?
Sort the values and average the two in the middle. For 3, 4, 5, 6, 7, 8 the middle pair is 5 and 6, so the median is 5.5. With an odd count there is a single middle value.
What is the mean absolute deviation?
The average distance of the values from the mean, ignoring direction: add up |x − mean| and divide by n. For the example above it is 71 ÷ 10 = 7.1. It is easier to interpret than the standard deviation, which weights large deviations more heavily. In Excel it is AVEDEV.