Statistics Calculator

Mean, median, mode, variance, SD and quartiles for lists and grouped data, with steps

Paste or type numbers separated by commas, spaces or new lines (e.g. a column copied from Excel). Write 1000, not 1,000.
Mean (x̄)
15
of 10 values, sum 150
Median
15
Mode
15
appears 3×
Range
9
Std deviation σ (population)
2.61
Std deviation s (sample)
2.75
Variance σ²
6.8
Variance s²
7.56
Q1
12.75
Q3
17.25
IQR (Q3 − Q1)
4.5
Minimum
11
Maximum
20
Count n
10
Sum
150
Coeff. of variation
17.38%
σ (population) divides by n, as in NCERT Class 11. s (sample) divides by n − 1: use it when your numbers are a sample from a bigger group.
Frequency table
xffxx − x̄(x − x̄)²f(x − x̄)²
11111−41616
12112−399
13113−244
14114−111
15345000
17117244
18118399
2012052525
Total1015068
Step-by-step working
  1. Arrange the data in ascending order
    11, 12, 13, 14, 15, 15, 15, 17, 18, 20
  2. Mean (average)
    x̄ = Σfx / Σf = 150 / 10 = 15
  3. Median (middle value)
    n = 10 is even, so the median is the average of the 5th and 6th values
    Median = (15 + 15) / 2 = 15
  4. Mode (most frequent value)
    15 appears 3 times, more than any other value.
  5. Range
    Range = largest − smallest = 20 − 11 = 9
  6. Quartiles
    Q1 = (n + 1)/4 = 2.75th value = 12 + 0.75 × (13 − 12) = 12.75
    Q3 = 3(n + 1)/4 = 8.25th value = 17 + 0.25 × (18 − 17) = 17.25
    IQR = Q3 − Q1 = 17.25 − 12.75 = 4.5
  7. Variance and standard deviation
    Σf(x − x̄)² = 68 (see the table)
    Population: σ² = Σf(x − x̄)² / n = 68 / 10 = 6.8; σ = √6.8 = 2.61
    Sample: 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

  1. 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.
  2. 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.
  3. The mean, median, mode, range, quartiles, variance and standard deviation update as you type.
  4. Pick the number of decimal places your teacher wants, and the quartile method if your book uses a different one.
  5. 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

Mean x̄ = Σx / n (with frequencies: Σfx / Σf)
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)

Class mark x = (lower limit + upper limit) / 2
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.

Classfxfxcf
0–1055255
10–2081512013
20–30152537528
30–40163556044
40–5064527050

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.

Frequently Asked Questions

What you divide by. Population standard deviation (σ) divides the sum of squared deviations by n, and sample standard deviation (s) divides it by n − 1. Use σ when your numbers are the whole group (as NCERT does in Class 11) and s when they are a sample from a larger group. For 2, 4, 4, 4, 5, 5, 7, 9, σ = 2 and s ≈ 2.14.

Work out n/2, then find the first class whose cumulative frequency reaches n/2. That's the median class. Use Median = l + ((n/2 − cf) / f) × h, where l is its lower limit, cf the cumulative frequency before it, f its frequency and h its width. Enter your classes in Frequency table mode to see every value filled in.

Mode = l + ((f₁ − f₀) / (2f₁ − f₀ − f₂)) × h, where the modal class is the class with the highest frequency, l is its lower limit, f₁ its frequency, f₀ and f₂ the frequencies of the classes before and after it, and h the class width.

Because there are several accepted ways to work out quartiles of a small list. Many Indian textbooks use the (n + 1)/4th value, Excel's QUARTILE.INC uses 1 + (n − 1)/4, and some books take the median of each half. Change the quartile method to match your book.

Those are inclusive classes with a gap of 1 between them. The calculator converts them to continuous classes (0.5-10.5, 10.5-20.5, 20.5-30.5) before using the median and mode formulas, and shows this as the first step.

Yes. If two values share the highest frequency the data is bimodal, and with more than two it's multimodal. The calculator lists all of them. If every value appears equally often, there is no mode.