Statistics Calculator
Mean, median, mode, variance, SD and quartiles for lists and grouped data, with steps
| x | f | fx | x − x̄ | (x − x̄)² | f(x − x̄)² |
|---|---|---|---|---|---|
| 11 | 1 | 11 | −4 | 16 | 16 |
| 12 | 1 | 12 | −3 | 9 | 9 |
| 13 | 1 | 13 | −2 | 4 | 4 |
| 14 | 1 | 14 | −1 | 1 | 1 |
| 15 | 3 | 45 | 0 | 0 | 0 |
| 17 | 1 | 17 | 2 | 4 | 4 |
| 18 | 1 | 18 | 3 | 9 | 9 |
| 20 | 1 | 20 | 5 | 25 | 25 |
| Total | 10 | 150 | 68 |
- Arrange the data in ascending order11, 12, 13, 14, 15, 15, 15, 17, 18, 20
- Mean (average)x̄ = Σfx / Σf = 150 / 10 = 15
- Median (middle value)n = 10 is even, so the median is the average of the 5th and 6th valuesMedian = (15 + 15) / 2 = 15
- Mode (most frequent value)15 appears 3 times, more than any other value.
- RangeRange = largest − smallest = 20 − 11 = 9
- QuartilesQ1 = (n + 1)/4 = 2.75th value = 12 + 0.75 × (13 − 12) = 12.75Q3 = 3(n + 1)/4 = 8.25th value = 17 + 0.25 × (18 − 17) = 17.25IQR = Q3 − Q1 = 17.25 − 12.75 = 4.5
- Variance and standard deviationΣf(x − x̄)² = 68 (see the table)Population: σ² = Σf(x − x̄)² / n = 68 / 10 = 6.8; σ = √6.8 = 2.61Sample: s² = Σf(x − x̄)² / (n − 1) = 68 / 9 = 7.56; s = √7.56 = 2.75
Runs entirely in your browser. Nothing you type or upload is sent to us or stored.
Results are for general guidance. Please check anything important before relying on it. Terms of use
How to Use
- Choose List of numbers and paste or type your data, separated by commas, spaces or new lines. Write 1000, not 1,000. Example fills in sample data and Clear empties the box.
- For a frequency table, choose Frequency table and enter each value (or class interval such as 10-20) with its frequency. Use Add row for more rows.
- The mean, median, mode, range, quartiles, variance and standard deviation update as you type.
- Pick the number of decimal places your teacher wants, and the quartile method if your book uses a different one.
- Scroll down for the table (x − x̄, fx, cf …) and the step-by-step working with every formula filled in.
Mean, median, mode and standard deviation with working
This statistics calculator finds all the usual measures of a data set and shows the working the way you'd write it in a school notebook: the data in ascending order, the formula, the numbers put into it, and the table of deviations. It takes a plain list of numbers, a discrete frequency table (values with frequencies) or grouped data with class intervals. Those are the three forms the topic takes in Class 10 and Class 11 maths and in economics.
Formulas for ungrouped data
Median = ((n + 1)/2)th value if n is odd; average of the (n/2)th and (n/2 + 1)th values if n is even
Mode = the value that occurs most often
Range = largest value − smallest value
Population variance σ² = Σ(x − x̄)² / n, standard deviation σ = √σ²
Sample variance s² = Σ(x − x̄)² / (n − 1), s = √s²
Coefficient of variation = σ / x̄ × 100
Worked example: marks 2, 4, 4, 4, 5, 5, 7, 9. Here n = 8 and Σx = 40, so the mean is 40 ÷ 8 = 5. The 4th and 5th values are 4 and 5, so the median is 4.5. The mode is 4, because it appears three times, and the range is 9 − 2 = 7. The squared deviations from 5 are 9, 1, 1, 1, 0, 0, 4 and 16, which add up to 32. So σ² = 32 ÷ 8 = 4 and σ = 2, while the sample values are s² = 32 ÷ 7 ≈ 4.57 and s ≈ 2.14.
σ or s? NCERT Class 11 divides by n (σ) and treats your numbers as the whole population. Divide by n − 1 (s) when the numbers are a sample from a bigger group, as college statistics and Excel’s STDEV.S do. The calculator shows both.
Formulas for grouped data (class intervals)
Mean x̄ = Σfx / Σf (step deviation: x̄ = a + h × Σfu / Σf, u = (x − a)/h)
Median = l + ((n/2 − cf) / f) × h
Mode = l + ((f₁ − f₀) / (2f₁ − f₀ − f₂)) × h
σ² = Σf(x − x̄)² / n
Here l is the lower limit of the median (or modal) class, cf the cumulative frequency of the class before it, f its frequency, h the class width, f₁ the frequency of the modal class and f₀, f₂ the frequencies of the classes before and after it.
| Class | f | x | fx | cf |
|---|---|---|---|---|
| 0–10 | 5 | 5 | 25 | 5 |
| 10–20 | 8 | 15 | 120 | 13 |
| 20–30 | 15 | 25 | 375 | 28 |
| 30–40 | 16 | 35 | 560 | 44 |
| 40–50 | 6 | 45 | 270 | 50 |
With n = 50 and Σfx = 1,350, the mean is 27. Since n/2 = 25, the median class is 20–30, so the median = 20 + ((25 − 13) / 15) × 10 = 28. The modal class is 30–40, so the mode = 30 + ((16 − 15) / (32 − 15 − 6)) × 10 ≈ 30.91. These agree roughly with the empirical relation 3 Median ≈ Mode + 2 Mean (84 against 84.91).
If your classes are inclusive, like 1–10, 11–20, 21–30, the calculator first makes them continuous (0.5–10.5, 10.5–20.5 …) by moving each limit by half the gap, as the textbook method requires.
Quartiles: why answers differ between books
There's no single agreed way to find the quartiles of a small list, so different books and software can give slightly different answers. For 2, 4, 4, 4, 5, 5, 7, 9 the third quartile is 6.5 with the (n + 1)/4 method used in many Indian textbooks, 5.5 with Excel’s QUARTILE.INC, and 6 when you take the median of the upper half. Choose the method your teacher uses. The working shows the positions so you can check. For grouped data the formula Q1 = l + ((n/4 − cf) / f) × h is used.
Tips
- Don’t put commas inside numbers (write 100000, not 1,00,000), because commas separate values.
- If every value appears the same number of times, the data has no mode. If two values tie for the most, it's bimodal and both are shown.
- You can paste a list of up to 1,00,000 numbers, such as a column copied from a spreadsheet.