Skip to content

Median Formula, Mean Formula and Mode Formula Explained

10 formulasCalculatorUpdated 22 Oct 2026

The median formula for n values in order is: the (n+12)\left(\dfrac{n+1}{2}\right)-th value when n is odd, and the average of the n2\dfrac{n}{2}-th and (n2+1)\left(\dfrac{n}{2}+1\right)-th values when n is even. For grouped data, class 10 uses l+n2−cff×hl + \dfrac{\frac{n}{2} - cf}{f} \times h, with each letter explained below.

This guide puts the mean, median and mode formulas side by side, for raw lists and for frequency tables, then adds the arithmetic, geometric and harmonic means and the weighted average. One frequency table is solved by every method so you can see how the answers relate. Paste your own numbers into the statistics calculator below to check homework.

Median formula for grouped data

Key formulas

  • Mean formula

    xˉ=∑xin\bar{x} = \dfrac{\sum x_i}{n}

    sum of observations divided by their number

  • Median formula (n odd)

    Median=(n+12)th value\text{Median} = \left(\dfrac{n+1}{2}\right)^{\text{th}} \text{ value}
  • Median formula (n even)

    Median=(n2)th+(n2+1)th value2\text{Median} = \dfrac{\left(\frac{n}{2}\right)^{\text{th}} + \left(\frac{n}{2}+1\right)^{\text{th}} \text{ value}}{2}
  • Median for grouped data

    Median=l+(n2−cff)×h\text{Median} = l + \left(\dfrac{\frac{n}{2} - cf}{f}\right) \times h

    l lower limit of median class, n total frequency, cf cumulative frequency before it, f its frequency, h class width

  • Mode formula (grouped)

    Mode=l+(f1−f02f1−f0−f2)×h\text{Mode} = l + \left(\dfrac{f_1 - f_0}{2f_1 - f_0 - f_2}\right) \times h

    f1 modal class frequency, f0 and f2 the classes before and after, l its lower limit, h class width

  • Mean, grouped (direct)

    xˉ=∑fixi∑fi\bar{x} = \dfrac{\sum f_i x_i}{\sum f_i}
  • Mean, step deviation

    xˉ=a+h⋅∑fiui∑fi\bar{x} = a + h \cdot \dfrac{\sum f_i u_i}{\sum f_i}

    ui=xi−ahu_i = \dfrac{x_i - a}{h}

  • Empirical relation

    Mode≈3 Median−2 Mean\text{Mode} \approx 3\,\text{Median} - 2\,\text{Mean}

    approximate, for moderately skewed data

  • Geometric mean formula

    GM=x1x2⋯xnn\text{GM} = \sqrt[n]{x_1 x_2 \cdots x_n}
  • Harmonic mean formula

    HM=n∑1xi\text{HM} = \dfrac{n}{\sum \frac{1}{x_i}}

What does mean in math, and how median and mode differ

Students often ask what does mean in math stand for. The mean is the everyday average: add all the values and share the total equally. The median is the middle value once the data is sorted. The mode is the value that appears most often. All three are called measures of central tendency, because each tries to describe the whole data with a single typical number.

MeasureWhat it usesBest when
MeanEvery valueData is fairly even, with no extreme values
MedianOnly the position of the middle valueA few very large or small values would pull the mean (salaries, house prices)
ModeOnly the most frequent valueYou want the most popular choice (shoe size, shirt size)

Take the incomes 12, 14, 15, 16 and 93 thousand rupees. The mean is 30 thousand, which describes nobody in the list. The median, 15 thousand, describes the group far better.

Median formula for ungrouped data (odd and even n)

First arrange the values in ascending order. Skipping this step is the single biggest reason for wrong medians.

Odd number of values

Find the median of 12, 7, 19, 5, 15, 9, 21.

Sorted: 5, 7, 9, 12, 15, 19, 21. Here n=7n = 7, so the median is the 7+12=4\tfrac{7+1}{2} = 4th value.

Answer: median = 12.

Even number of values

Find the median of 14, 8, 20, 11, 17, 6, 23, 10.

Sorted: 6, 8, 10, 11, 14, 17, 20, 23. Here n=8n = 8, so take the 4th and 5th values, 11 and 14.

Median =11+142=12.5= \dfrac{11 + 14}{2} = 12.5.

Answer: median = 12.5. With an even count, the median need not be one of the data values.

Mean formula for lists and frequency tables

The formula of mean for a plain list is xˉ=∑xin\bar{x} = \tfrac{\sum x_i}{n}. The mean of 3, 8, 10, 15 is 364=9\tfrac{36}{4} = 9. This is also the arithmetic mean formula, and the average formula in maths that you use for marks, runs or temperatures.

For a frequency table, the class 10 Statistics chapter teaches three methods. Each class is replaced by its class mark xix_i (the mid-point).

  1. Direct method: xˉ=∑fixi∑fi\bar{x} = \dfrac{\sum f_i x_i}{\sum f_i}.
  2. Assumed mean method: choose a class mark aa near the centre, let di=xi−ad_i = x_i - a, then xˉ=a+∑fidi∑fi\bar{x} = a + \dfrac{\sum f_i d_i}{\sum f_i}.
  3. Step deviation method: divide the deviations by the class size hh, ui=xi−ahu_i = \dfrac{x_i - a}{h}, then xˉ=a+h⋅∑fiui∑fi\bar{x} = a + h \cdot \dfrac{\sum f_i u_i}{\sum f_i}.

The three methods always give the same mean. The second and third only shrink the numbers so the multiplication is quicker. The same uiu_i column is reused for variance on the standard deviation formula page.

One frequency table solved for mean, median and mode

Daily travel time (minutes) of 40 office workers:

Classfif_ixix_iuiu_ifiuif_i u_i
10 to 20315−2-2−6-6
20 to 30825−1-1−8-8
30 to 40153500
40 to 5094519
50 to 60555210
Total405

Mean by step deviation

With a=35a = 35 and h=10h = 10: xˉ=35+10×540=35+1.25=36.25\bar{x} = 35 + 10 \times \dfrac{5}{40} = 35 + 1.25 = 36.25.

Check by the direct method: ∑fixi=45+200+525+405+275=1450\sum f_i x_i = 45 + 200 + 525 + 405 + 275 = 1450, and 145040=36.25\tfrac{1450}{40} = 36.25.

Answer: mean = 36.25 minutes.

Median for grouped data

Cumulative frequencies: 3, 11, 26, 35, 40. Here n2=20\tfrac{n}{2} = 20. The first cumulative frequency that reaches 20 is 26, so the median class is 30 to 40.

So l=30l = 30, cf=11cf = 11 (the class before), f=15f = 15, h=10h = 10.

Median=30+20−1115×10=30+6=36\text{Median} = 30 + \dfrac{20 - 11}{15} \times 10 = 30 + 6 = 36

Answer: median = 36 minutes.

Mode for grouped data

The highest frequency is 15, so the modal class is 30 to 40. Then l=30l = 30, f1=15f_1 = 15, f0=8f_0 = 8 (class before), f2=9f_2 = 9 (class after).

Mode=30+15−830−8−9×10=30+7013≈35.38\text{Mode} = 30 + \dfrac{15 - 8}{30 - 8 - 9} \times 10 = 30 + \dfrac{70}{13} \approx 35.38

Answer: mode is about 35.38 minutes.

Median formula for grouped data, term by term

This is the median formula class 10 students use in board exams. Every letter refers to the median class, the class whose cumulative frequency first reaches or crosses n2\tfrac{n}{2}.

  • ll: lower limit of the median class.
  • nn: total frequency, ∑fi\sum f_i. Use n2\tfrac{n}{2} here, not n+12\tfrac{n+1}{2}, whether n is odd or even.
  • cfcf: cumulative frequency of the class just before the median class.
  • ff: frequency of the median class itself.
  • hh: class size (width).

The idea is linear interpolation. You know cfcf values lie below ll, and you need n2−cf\tfrac{n}{2} - cf more of the ff values spread evenly across a width of hh.

Common mistake: classes such as 10 to 19, 20 to 29 are not continuous. Convert them to 9.5 to 19.5, 19.5 to 29.5 first, otherwise ll and hh are wrong.

Mode formula and the empirical relation

For ungrouped data, the mode is simply the most frequent value. In 3, 5, 7, 5, 9, 7, 5, 2 the value 5 appears three times, so the mode is 5. A list can have two modes (bimodal) or none.

The formula of mode for grouped data, l+f1−f02f1−f0−f2×hl + \tfrac{f_1 - f_0}{2f_1 - f_0 - f_2} \times h, is the mode formula class 10 uses. Here f1f_1 is the frequency of the modal class and f0,f2f_0, f_2 are the frequencies of its neighbours. If the modal class is the first class, take f0=0f_0 = 0.

For a moderately skewed distribution, the three averages are linked by Karl Pearson's empirical relation:

Mode≈3 Median−2 Mean\text{Mode} \approx 3\,\text{Median} - 2\,\text{Mean}

From the table above: 3(36)−2(36.25)=108−72.5=35.53(36) - 2(36.25) = 108 - 72.5 = 35.5, close to the 35.38 found directly. Use it when a question gives two of the three and asks for the third. For a perfectly symmetric distribution, mean, median and mode are equal.

Arithmetic, geometric and harmonic mean formulas

For positive numbers x1,x2,…,xnx_1, x_2, \ldots, x_n:

MeanFormulaFor 4 and 9
Arithmetic (AM)x1+⋯+xnn\dfrac{x_1 + \cdots + x_n}{n}6.5
Geometric (GM)x1x2⋯xnn\sqrt[n]{x_1 x_2 \cdots x_n}6
Harmonic (HM)n1x1+⋯+1xn\dfrac{n}{\frac{1}{x_1} + \cdots + \frac{1}{x_n}}7213≈5.54\tfrac{72}{13} \approx 5.54

Two facts worth memorising for sequences and series questions: AM≥GM≥HM\text{AM} \ge \text{GM} \ge \text{HM}, with equality only when all numbers are equal, and for two numbers GM2=AM×HM\text{GM}^2 = \text{AM} \times \text{HM}. Check: 6.5×7213=36=626.5 \times \tfrac{72}{13} = 36 = 6^2.

The geometric mean of two numbers is also called the mean proportional. The mean proportional formula between a and b is ab\sqrt{ab}, so between 4 and 9 it is 6, because 4:6=6:94 : 6 = 6 : 9. For three numbers, the GM of 2, 8, 32 is 5123=8\sqrt[3]{512} = 8. Use the harmonic mean for average speed over equal distances: 40 km/h one way and 60 km/h back gives 2×40×60100=48\tfrac{2 \times 40 \times 60}{100} = 48 km/h, not 50.

Weighted average formula

When some values count more than others, multiply each by its weight:

xˉw=∑wixi∑wi\bar{x}_w = \dfrac{\sum w_i x_i}{\sum w_i}

A student scores 78 in a test worth 3 credits, 85 in one worth 4 credits and 62 in one worth 2 credits. Weighted average =78(3)+85(4)+62(2)9=6989≈77.56= \dfrac{78(3) + 85(4) + 62(2)}{9} = \dfrac{698}{9} \approx 77.56. The plain average of the three marks would be 75, which ignores the credits. The grouped mean ∑fixi∑fi\tfrac{\sum f_i x_i}{\sum f_i} is a weighted average where the frequencies are the weights. For marks written as a share of the total, the percentage formula page shows the conversions.

Exam checklist for statistics questions

  • Write the formula first, then a line listing l,n,cf,f,hl, n, cf, f, h with their values. Examiners often give step marks for this.
  • Draw the cumulative frequency column before naming the median class.
  • Mode uses the class with the highest frequency; median uses the class where cf crosses n2\tfrac{n}{2}. They are often different classes.
  • In assumed mean questions, any aa works, but a middle class mark keeps numbers small.
  • Round only the final answer, usually to two decimal places.

Measures of spread (range, mean deviation, variance, SD) follow in class 11. The complete formula list gives you one sheet of revision across chapters.

Download the PDF

Questions students ask

What is the median formula for grouped data?

Median =l+n/2−cff×h= l + \tfrac{n/2 - cf}{f} \times h, where l is the lower limit of the median class, n the total frequency, cf the cumulative frequency of the previous class, f the frequency of the median class and h the class width.

What is the mean median mode formula relation?

For moderately skewed data, Mode =3= 3 Median −2- 2 Mean, also written Mean −- Mode =3= 3(Mean −- Median). It is approximate, not exact.

How do I find the median when n is even?

Sort the data, then average the two middle values, the n2\tfrac{n}{2}-th and the (n2+1)(\tfrac{n}{2}+1)-th. For 2, 4, 9, 11 the median is 4+92=6.5\tfrac{4+9}{2} = 6.5.

Can a data set have no mode or more than one mode?

Yes. If every value appears once, there is no mode. If two values tie for the highest count, the data is bimodal, for example 1, 2, 2, 3, 3, 4 has modes 2 and 3.

Which is better, mean or median?

The mean uses every value, so it suits evenly spread data. The median ignores extremes, so it is better for skewed data like incomes. Report both when unsure.

Which chapter covers mean, median and mode?

The Statistics chapter of NCERT class 10 covers mean, median and mode of grouped data. Class 11 Statistics then moves on to measures of spread, and class 11 Sequences and Series covers the arithmetic and geometric means. The harmonic mean appears mostly in competitive exam books.