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

Ogive (Cumulative Frequency Polygon): How to Draw and Read One

An ogive plots cumulative frequencies so you can read the median, percentiles and percentile ranks. Worked example with arithmetic, plus Excel, R and Python.

Written and maintained by CASRAI Editorial Board

Last updated

An ogive (pronounced “OH-jive”) is a line graph of cumulative frequencies: the horizontal axis shows the values of a variable, the vertical axis shows how many observations (or what share of them) fall at or below each value, and the points are joined by straight segments. It is also called a cumulative frequency polygon. Its main job is to let you read percentiles, the median and “what share is below this cut-off” straight off a curve.

What is an ogive? (definition)

An ogive is a cumulative frequency polygon. The SAGE Encyclopedia of Research Design puts it this way: “Ogives are also known as cumulative frequency polygons because they are drawn on the basis of cumulative frequencies,” and they are “useful in calculating percentiles and percentile ranks.” Where a histogram shows how many observations sit inside each class, an ogive shows how many have accumulated up to each class boundary, so the curve never goes down and ends at the total count n (or at 100% if you plot relative frequencies).

For grouped data the construction is: list the classes, add up the frequencies from the lowest class upward, and plot each running total against the upper boundary of its class. The curve starts at zero at the lower boundary of the first class.

The formula behind it, and how it relates to the empirical CDF

With raw (ungrouped) data, the same idea is the empirical cumulative distribution function. The R documentation for ecdf defines it as

Fn(t) = #{xi ≤ t} / n

where x1, …, xn are the observations, t is any value on the horizontal axis, #{xi ≤ t} is the number of observations less than or equal to t, and n is the sample size. Multiplying Fn(t) by n gives the cumulative frequency; leaving it as a proportion gives the cumulative relative frequency. R returns this as “a function of class ecdf, inheriting from the stepfun class”, that is, a step function that jumps at every observed value.

An ogive for grouped data is the same quantity with the within-class detail thrown away: we only know the cumulative count at each class boundary, so we join those points with straight lines. That straight-line joining is an interpolation, which assumes observations are spread evenly inside each class. It is why percentiles read from an ogive are estimates, not exact values.

Ogive vs histogram vs frequency polygon vs ECDF

  • Histogram: bars for the count in each class (see histograms in R).
  • Frequency polygon: a line through the class midpoints at the class counts; it goes up and down.
  • Ogive: a line through the upper class boundaries at the running totals; it only rises.
  • Empirical CDF: the ungrouped version, a step function on the raw observations.

The first three are built from the same frequency distribution table; the ogive simply adds a cumulative column.

How to draw an ogive: worked example with the arithmetic

Illustrative data, invented for this demonstration: exam scores for 50 students, grouped into classes of width 10.

Class (score) Frequency f Upper boundary Cumulative frequency Cumulative %
40 to under 50 4 50 4 8%
50 to under 60 8 60 4 + 8 = 12 24%
60 to under 70 15 70 12 + 15 = 27 54%
70 to under 80 13 80 27 + 13 = 40 80%
80 to under 90 7 90 40 + 7 = 47 94%
90 to under 100 3 100 47 + 3 = 50 100%

Cumulative % is cumulative frequency / 50 × 100; for example 27 / 50 = 0.54, so 54%. Plot the points (40, 0), (50, 4), (60, 12), (70, 27), (80, 40), (90, 47), (100, 50) and join them with straight lines. The last point must equal n = 50 (100%); if it does not, the running total has an addition error.

Reading the median, quartiles and percentiles

To find the value below which p% of observations fall, go up the vertical axis to p% of n, move across to the curve, then drop down to the horizontal axis. Algebraically, that is linear interpolation inside the class where the target position lands:

P = L + ((target − CF) / f) × w

where L is the lower boundary of that class, target is the position you want (for the median, n / 2), CF is the cumulative frequency at L (the count in all earlier classes), f is the frequency of that class and w is its width.

  • Median: target = 50 / 2 = 25. The cumulative count passes 25 in the 60 to under 70 class (CF = 12, f = 15, w = 10). Median = 60 + ((25 − 12) / 15) × 10 = 60 + 8.67 = 68.67.
  • First quartile: target = 12.5, which falls just past the cumulative 12, so in the same class: 60 + ((12.5 − 12) / 15) × 10 = 60.33.
  • Third quartile: target = 37.5, in the 70 to under 80 class (CF = 27, f = 13): 70 + ((37.5 − 27) / 13) × 10 = 70 + 8.08 = 78.08.
  • Percentile rank of a score of 75: read the other way. Within 70 to under 80, 75 is halfway, so the cumulative count is 27 + (5 / 10) × 13 = 33.5, and 33.5 / 50 = 67%.
  • Share scoring 80 or more: 100% − 80% = 20% (10 of 50 students).

Interpretation: reading guide

What you want Where to start What you read off
Median or any percentile Vertical axis at p% of n Value on the horizontal axis
Percentile rank of a value Horizontal axis at the value Cumulative % on the vertical axis
Share at or below a cut-off Horizontal axis at the cut-off Cumulative % on the vertical axis
Share above a cut-off Horizontal axis at the cut-off 100% minus the cumulative %
Interquartile range 25% and 75% of n Q3 minus Q1 (here 78.08 − 60.33 = 17.75)

A steep stretch of the curve means many observations are packed into that range of values; a flat stretch means few. That makes an ogive a quick check on the shape that skewness summarises, and it supports the kind of summary described in descriptive statistics.

Assumptions and common mistakes

  • Plot at upper boundaries, not midpoints. A cumulative count of 27 means “27 scores below 70”, so the point belongs at 70.
  • Start at zero. Add the point (lower boundary of first class, 0) so the curve begins on the axis.
  • Straight lines are an assumption. Interpolated values assume an even spread inside each class; with wide classes the estimate can be off.
  • Bounds must not overlap. Write classes as “40 to under 50” so each score belongs to exactly one class.
  • Keep it monotone. The curve cannot fall; a dip means a cumulative column was computed from the class counts incorrectly.
  • Do not mix up the empirical CDF and a fitted distribution. An ogive describes the sample; to compare it with a theoretical distribution formally, see the Kolmogorov-Smirnov test.

How to report it

State n, how the data were grouped, and that percentiles were interpolated. Example wording: “Scores (n = 50) were grouped into ten-point classes. From the cumulative frequency polygon, the interpolated median was 68.67 (Q1 = 60.33, Q3 = 78.08), and 20% of students scored 80 or higher.” Include the figure with labelled axes (“Score” and “Cumulative frequency” or “Cumulative %”). Where the raw data are available, report the median and quartiles computed from them rather than from the ogive.

How to calculate and draw an ogive in Excel, R or Python

Excel

Put the upper boundaries in column A (A2:A7 = 50 to 100) and class frequencies in column B. In C2 enter =SUM($B$2:B2) and fill down to get the cumulative frequency. Add a first row with the lower boundary 40 and cumulative frequency 0. Select the boundary and cumulative columns and insert a Scatter chart with straight lines and markers. For the median: =60+(25-12)/15*10.

R

bounds <- c(40, 50, 60, 70, 80, 90, 100) freq   <- c(4, 8, 15, 13, 7, 3) cum    <- c(0, cumsum(freq)) plot(bounds, cum, type = "b", xlab = "Score", ylab = "Cumulative frequency") approx(cum, bounds, xout = 25)$y   # median, 68.67 # raw data instead: plot(ecdf(x))

Python

import numpy as np import matplotlib.pyplot as plt  bounds = np.array([40, 50, 60, 70, 80, 90, 100]) freq = np.array([4, 8, 15, 13, 7, 3]) cum = np.concatenate(([0], np.cumsum(freq))) n = cum[-1]  plt.plot(bounds, cum, marker="o") plt.xlabel("Score"); plt.ylabel("Cumulative frequency")  print(np.interp(n * 0.5, cum, bounds))   # median, 68.67 print(np.interp(75, bounds, cum) / n)    # percentile rank of 75, 0.67

FAQ

Is an ogive the same as a cumulative frequency polygon?

Yes. “Ogive” and “cumulative frequency polygon” name the same graph, drawn from cumulative frequencies.

What is the difference between an ogive and a histogram?

A histogram shows the count within each class; an ogive shows the running total up to each class boundary, so it only rises and ends at n.

How do you find the median from an ogive?

Find n / 2 on the vertical axis, read across to the curve and down to the horizontal axis. Algebraically, interpolate inside the class where the cumulative count passes n / 2, as in the worked example (68.67).

Is an ogive the same as an empirical CDF?

Close. The empirical CDF Fn(t) = #{xi ≤ t} / n is computed from raw data and is a step function; an ogive joins the cumulative values at class boundaries with straight lines.

Sources

Follow CASRAI

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

Ask CASRAI · free to try

Ask about Ogive (Cumulative Frequency Polygon): How to Draw and Read One

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.