Skip to main content
v2026.11,858 entries · CC-BY 4.0

Class Midpoint: Formula, Worked Example and How to Find It

Class midpoint = (lower boundary + upper boundary) / 2. Worked example, limits vs boundaries, open-ended classes, and Excel, R and Python code.

Written and maintained by CASRAI Editorial Board

Last updated

The class midpoint is the value halfway between the two ends of a class in a grouped frequency table: add the lower and upper class boundaries and divide by 2. Because grouped data hides the individual observations, the midpoint stands in for every value in its class, and that is what lets you estimate a mean from a table. This page also covers what to do when the class limits have gaps, and when a class has no upper end (“65 and over”), with the arithmetic shown.

Definition in one paragraph

A class (or bin) is one interval of a grouped frequency distribution, and its midpoint is the centre of that interval. OpenStax Introductory Statistics 2e (section 2.5) explains the reason for using it: when the individual data values are not known, “we can instead find the midpoint of each interval.” Every observation in the class is treated as if it sat at that one value. NIST’s e-Handbook of Statistical Methods describes histogram classes as equal-sized bins that split the range of the data.

How to find class midpoint (formula)

The midpoint is the average of the two boundaries of the class:

m = (lower boundary + upper boundary) / 2

  • m is the class midpoint.
  • lower boundary is the smallest value that can fall in the class without belonging to the class below it.
  • upper boundary is the point where the class ends and the next one begins.

When the table is built from whole numbers, the boundaries sit half a unit outside the class limits (the printed lowest and highest values). Class 10-19 therefore has boundaries 9.5 and 19.5, and the midpoint is (9.5 + 19.5) / 2 = 14.5.

Class midpoint from limits vs boundaries

Many tutorials, such as the Statology class midpoint page, add the printed limits instead: (10 + 19) / 2 = 14.5. For a standard table in which each class starts one unit after the previous one ends, the two methods give the same answer, because both boundaries move outward by the same half-unit and the shifts cancel in the average. Boundaries are the safer habit because they mark exactly where one class ends and the next begins and because they stay correct when a table reports decimals.

Class (limits) Boundaries Midpoint from limits Midpoint from boundaries
10-19 9.5 to 19.5 (10 + 19) / 2 = 14.5 (9.5 + 19.5) / 2 = 14.5
20-29 19.5 to 29.5 (20 + 29) / 2 = 24.5 (19.5 + 29.5) / 2 = 24.5
1.0-1.9 (one decimal) 0.95 to 1.95 (1.0 + 1.9) / 2 = 1.45 (0.95 + 1.95) / 2 = 1.45

The boundary rule also tells you which class an observation belongs to. OpenStax (section 2.2, Example 2.9) uses the convention that a value is counted in a class interval if it falls on the left boundary but not if it falls on the right boundary. Check which convention your source uses before you re-bin raw data, since the midpoint is the same but the frequencies can change.

Worked example with real numbers

This is an illustrative table built for teaching, not data from a study. Sixty ages are grouped into five classes of width 10. The goal is the estimated mean, using the grouped-mean formula from OpenStax 2.5: the sum of f × m divided by the sum of f, where f is the class frequency and m is the class midpoint. (The same procedure with a different table is walked through in our guide to finding the mean of a frequency distribution table.)

Class Boundaries Midpoint m Frequency f f × m
10-19 9.5 to 19.5 14.5 6 6 × 14.5 = 87
20-29 19.5 to 29.5 24.5 14 14 × 24.5 = 343
30-39 29.5 to 39.5 34.5 20 20 × 34.5 = 690
40-49 39.5 to 49.5 44.5 12 12 × 44.5 = 534
50-59 49.5 to 59.5 54.5 8 8 × 54.5 = 436
Total 60 2,090

Check the running total: 87 + 343 = 430; 430 + 690 = 1,120; 1,120 + 534 = 1,654; 1,654 + 436 = 2,090. The estimated mean is 2,090 / 60 = 34.83 (rounded to two decimals).

Open-ended classes have no midpoint

A class such as “40 and over” has no upper boundary, so the formula cannot return a value. The only way to use the table is to assume an upper bound, and the estimate depends on that assumption. The example below uses a second illustrative table of 60 values where the last class is open-ended.

Class Midpoint m Frequency f f × m
0-9 4.5 8 36
10-19 14.5 15 217.5
20-29 24.5 22 539
30-39 34.5 10 345
40 and over none 5 depends on the assumption

The four closed classes contribute 36 + 217.5 + 539 + 345 = 1,137.5. Now close the last class two different ways:

  • Assume it ends at 49 (boundaries 39.5 to 49.5, midpoint 44.5): 5 × 44.5 = 222.5, so the total is 1,360 and the estimated mean is 1,360 / 60 = 22.67.
  • Assume it ends at 79 (boundaries 39.5 to 79.5, midpoint 59.5): 5 × 59.5 = 297.5, so the total is 1,435 and the estimated mean is 1,435 / 60 = 23.92.

Five observations in an unbounded class move the estimate by 1.25. If you must use an open-ended table, say which upper bound you assumed. If the raw data are available, use them instead.

Interpretation

A midpoint is a representative value for a class, not a measurement. The table below states what each quantity does and does not tell you.

What you have How to read it
Midpoint of one class (for example 34.5 for 30-39) The value used to stand in for every observation in that class, because the individual values are unknown (OpenStax 2.5).
Sum of f × m divided by sum of f An estimate of the mean of the underlying data, not the exact mean. OpenStax Example 2.30 asks for the “best estimate” of the class mean.
Open-ended final class No midpoint exists. Any estimate rests on the upper bound you assume (22.67 vs 23.92 in the example above).
Midpoints as plot positions In OpenStax Example 2.10 the frequency polygon point labelled 54.5 stands for the interval 49.5 to 59.5, and 54.5 is the centre of that interval. See the ogive guide for how cumulative plots differ.

The grouped mean is close to the raw mean only when values are spread fairly evenly inside each class. Wide classes, or classes where values pile up at one end, make the estimate rougher. For a histogram built from the same kind of table, see how to find the mean from a histogram.

Assumptions and common mistakes

  • Assumption: values are spread evenly inside the class. The midpoint replaces every value in the class, so this is built in to the method.
  • Averaging the wrong numbers. Take the midpoint of one class (its own two ends), not the midpoint of the whole table.
  • Mixing limits and boundaries. Use one convention throughout a table. With gaps between classes, check the answer against the boundaries.
  • Using the class width as the midpoint. Width is upper boundary minus lower boundary (see how to calculate class width); the midpoint is their average.
  • Weighting by the midpoint instead of the frequency. The estimated mean is the sum of f × m divided by the sum of f, not the plain average of the midpoints.
  • Forgetting the open-ended class. Do not insert a made-up midpoint without saying so.

How to report it (APA example)

Report the estimate as an estimate and say how it was obtained, with the same number of decimals throughout. Example: “The mean age, estimated from grouped data using class midpoints, was M = 34.83 years (n = 60).” If the final class was open-ended, add the assumption: “The open-ended class was treated as ending at 49.”

How to calculate it in Excel, R or Python

Each snippet uses the first worked example (lower limits 10, 20, 30, 40, 50; upper limits 19, 29, 39, 49, 59; frequencies 6, 14, 20, 12, 8) and returns midpoints of 14.5 to 54.5 and an estimated mean of 34.83.

Excel

Midpoint (cell C2):  =(A2+B2)/2
Estimated mean:      =SUMPRODUCT(C2:C6, D2:D6)/SUM(D2:D6)

Here column A holds the lower limits, B the upper limits and D the frequencies. Use boundaries in A and B instead if your table lists them.

R

lower = c(10, 20, 30, 40, 50)
upper = c(19, 29, 39, 49, 59)
f     = c(6, 14, 20, 12, 8)
m = (lower + upper) / 2
weighted.mean(m, f)   # 34.83333

Python

import numpy as np
lower = np.array([10, 20, 30, 40, 50])
upper = np.array([19, 29, 39, 49, 59])
f = np.array([6, 14, 20, 12, 8])
m = (lower + upper) / 2
print(np.average(m, weights=f))   # 34.8333...

FAQ

What is the class midpoint?

It is the centre of a class in a grouped frequency table, found by adding the lower and upper boundaries and dividing by 2.

How do you find the class midpoint?

Take the two ends of one class, add them and divide by 2. For the class 30-39, with boundaries 29.5 and 39.5, the midpoint is 34.5.

Is the class midpoint the same as the class width?

No. The width is the upper boundary minus the lower boundary (10 for the class 29.5 to 39.5); the midpoint is their average (34.5).

Can I find a midpoint for an open-ended class?

No, because there is no upper boundary. You can only assume one, and you should state it, as in the 22.67 versus 23.92 comparison above.

Why does the grouped mean differ from the real mean?

The midpoint replaces every value in the class, so the grouped mean is an estimate. For background on the wider toolkit, see our guide to descriptive statistics and the entry on descriptive versus inferential statistics.

Sources

Follow CASRAI

Research-administration guidance, standards updates and independent tool reviews.

Ask CASRAI · free to try

Ask about Class Midpoint: Formula, Worked Example and How to Find It

Ask your first 2 questions free below. Subscribers get 150 a day for $29 a month.

An AI assistant specialized in research administration. It cites the sources behind every answer, labels web answers and says when it can't answer.

Answers draw on CASRAI's guides and dictionary plus the federal and funder documents we index: Federal Register, Grants.gov, Regulations.gov and UKRI.

Works on this site and inside Claude, Cursor and the AI tools you already use.

Everything CASRAI publishes — this page, the dictionary, the guides and the news — stays free to read, with no account and no card.

Referenced across the research world

University of Cambridge logoColumbia University logoCrossref logoUniversity of Edinburgh logoHarvard University logoUniversity of Oxford logoPrinceton University logoStanford School of Medicine logoUniversity College London logoORCID logoUniversity of Cambridge logoColumbia University logoCrossref logoUniversity of Edinburgh logoHarvard University logoUniversity of Oxford logoPrinceton University logoStanford School of Medicine logoUniversity College London logoORCID logo
  • University of Cambridge logo
  • Columbia University logo
  • Crossref logo
  • University of Edinburgh logo
  • Harvard University logo
  • University of Oxford logo
  • Princeton University logo
  • Stanford School of Medicine logo
  • University College London logo
  • ORCID logo

View CASRAI adoption →

Ask CASRAI · Regulatory Radar

Research-admin question? Get an answer that links its sources.

An AI assistant specialized in research administration. Every answer links its sources to check before you act. 2 questions free, no account. $29/month after.

  • Answers draw on CASRAI's guides and dictionary plus the federal and funder documents we index: Federal Register, Grants.gov, Regulations.gov and UKRI.
  • Every answer numbers its sources and links each one, so you can check the source yourself.