Statistics Calculator

Mean
22.5
Median
22.5
Mode
30
Count (n)
8
Sum
180
Range
40 (5–45)
Lower quartile (Q1)
12.5
Upper quartile (Q3)
30
Interquartile range
17.5
Standard deviation (population)
11.9896
Standard deviation (sample)
12.8174

Mean, median and mode

The mean is the sum divided by the count, the median is the middle value in order, and the mode is the most frequent value. For data grouped into class intervals, as in Class 10 NCERT, the exact values are unknown, so formulas estimate them from the class marks, cumulative frequencies and the modal class. This calculator handles both, and shows the frequency table and working.

Grouped data formulas

Mean = Σfx ÷ Σf · Median = l + ((n/2 − cf) ÷ f) × h · Mode = l + ((f₁ − f₀) ÷ (2f₁ − f₀ − f₂)) × h

x is the class mark (middle of the class) and h the class width. For the median, l is the lower limit of the median class, cf the cumulative frequency before it and f its frequency. For the mode, l is the lower limit of the modal class, f₁ its frequency and f₀, f₂ the frequencies of the classes before and after it.

Good to know

  • The median class is the first class whose cumulative frequency reaches n/2.
  • For inclusive classes like 1–10, 11–20, subtract 0.5 from each lower limit and add 0.5 to each upper limit first. The calculator does this automatically.
  • The empirical relation 3 median = mode + 2 mean holds roughly for moderately skewed data.
  • The median is better than the mean for data with extreme values, such as incomes.
  • Use the population standard deviation for a whole group and the sample one when your data is a sample from a bigger group.

Worked example: marks of 50 students

  1. Classes 0–10, 10–20, 20–30, 30–40, 40–50 with frequencies 5, 8, 15, 16, 6 (n = 50)
  2. Mean: Σfx = 25 + 120 + 375 + 560 + 270 = 1,350, so mean = 1,350 ÷ 50 = 27
  3. Median: n/2 = 25 falls in 20–30 (cumulative frequency 28), so median = 20 + ((25 − 13) ÷ 15) × 10 = 28
  4. Mode: the modal class is 30–40 (f = 16), so mode = 30 + ((16 − 15) ÷ (32 − 15 − 6)) × 10 ≈ 30.91
  5. Check: 3 × 28 − 2 × 27 = 30, close to the mode of 30.91

Frequency table for the example

The working columns used for the mean and median.

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

Σf = 50 and Σfx = 1,350.

Frequently Asked Questions

Find each class mark x (the middle of the class), multiply by the frequency f, add up the fx values and divide by the total frequency: mean = Σfx ÷ Σf.
Make a cumulative frequency column, find the class where it first reaches n/2, then use median = l + ((n/2 − cf) ÷ f) × h with that class's values.
Pick the class with the highest frequency, then use mode = l + ((f₁ − f₀) ÷ (2f₁ − f₀ − f₂)) × h, where f₀ and f₂ are the frequencies of the classes on either side.
Make them continuous by subtracting half the gap from each lower limit and adding it to each upper limit: 9.5–19.5, 19.5–29.5. The calculator does this for you.
The mean adds everything and divides by the count, so a few extreme values pull it. The median is the middle value and isn't affected by extremes.