How to Draw an Ogive and Read the Median and Quartiles From It
A step-by-step guide to cumulative frequency tables, less-than and more-than ogives, and reading the median, quartiles and percentiles from the graph.

Grouped data turns up in almost every introductory statistics course. A teacher hands out a frequency table of marks, heights or wages, and the question asks for the median, the quartiles and "the ogive". The ogive is simply a picture of how the counts pile up as you move along the scale, and once you see how it is built, reading values off it becomes routine. This guide walks through the method by hand and then shows how the free Ogive and Cumulative Frequency Graph Maker does the same work with the steps written out.
Start with the cumulative frequency table
Write the classes in order with their frequencies. Next to them, add a running total. If the first three classes hold 6, 9 and 14 students, the running totals are 6, 15 and 29. Each total answers the question "how many observations are below the upper edge of this class?" That column is called the less-than cumulative frequency.
A second column counts from the other end. The top value is the full total N, and each row below it subtracts the frequencies already passed. This more-than column answers "how many are at or above the lower edge of this class?" Both columns end where the other begins: the less-than column finishes at N, and the more-than column starts there.
Fix the class boundaries first
A common slip is to plot the class limits as printed. If the classes are written 10-19, 20-29, 30-39, there is a gap of one unit between 19 and 20, and a value of 19.6 has nowhere to go. The true boundaries close the gap by moving each limit half a unit outward, so the classes become 9.5-19.5, 19.5-29.5 and so on. Continuous classes written as 10-20, 20-30 need no change. The graph maker detects the gap automatically and tells you how much each boundary moved.
Plot the two curves
For the less-than ogive, put the class boundaries on the horizontal axis and the cumulative frequency on the vertical one. Start with a point at the lowest boundary with height zero, then plot each less-than total above the upper boundary of its class and join the points. The curve climbs from zero to N.
For the more-than ogive, plot each more-than total above the lower boundary of its class, and finish at the highest boundary with height zero. This curve falls from N to zero. Drawn on the same axes, the two curves form an X shape.
Read the median from the crossing point
Where the curves cross, the number of observations below a value equals the number above it, so each side holds half the data. Draw a horizontal line at N/2 to the curve, drop a vertical line to the axis, and the value you hit is the median. With the less-than curve alone, the same horizontal line at N/2 gives the same reading.
Quartiles work the same way: draw horizontal lines at N/4 and 3N/4 to the less-than ogive and drop down. A percentile such as the 90th uses a line at 0.9N. The tool draws the median and quartile lines for you, labels the values, and lets you add any other percentile.
The formula behind the graph
Reading from a hand-drawn curve is only as accurate as your ruler. The exact value comes from straight-line interpolation inside the class that holds the position you want: value = L + (pN − cf) ÷ f × h. L is the lower boundary of that class, cf the cumulative frequency before it, f its own frequency and h its width.
Take 50 students with class frequencies 6, 9, 14, 11, 7 and 3 in classes of width 10 starting at zero. The median position is 25. The running totals pass 25 inside the class 20-30, where cf before is 15 and f is 14, so the median is 20 + (25 − 15) ÷ 14 × 10 = 27.14. The tool prints this line for every percentile in its working tab, so you can copy it straight into a solution.
Going the other way: percentile rank
Sometimes the question is reversed: what share of students scored below 35? Read up from 35 on the horizontal axis to the less-than curve and across to the vertical axis. For the class data above, 35 lies inside the class 30-40, and the curve gives a cumulative frequency of about 34.5 out of 50, so the percentile rank is 69 percent. Type a value into the percentile rank box to get the same answer instantly.
Working from raw data
If you have the raw values rather than a table, you first need classes. Sturges' rule suggests roughly log₂(n) + 1 classes, and a round class width makes the graph easier to read. In raw data mode you can paste the numbers, press the suggestion button, adjust the start and width, and then turn the result into an editable class table. Check that the first class starts at or below the smallest value and that the last one reaches past the largest.
Checking your homework
The most useful habit is to compare your hand-drawn reading with the formula. If they differ by more than a small amount, the usual causes are unadjusted boundaries, a point plotted at the class midpoint instead of the boundary, or a running total that skipped a class. The cumulative table in the tool lists boundaries, both cumulative columns and cumulative percentages side by side, which makes such slips easy to spot. When everything agrees, download the graph as SVG for a report or print the page with the table and the quartile summary together.


