Riemann Sums: Left, Right And Midpoint Explained

#Calculus
TL;DR
Riemann sums approximate the area under a curve by slicing it into $n$ thin rectangles and adding their areas: $\sum_{i=1}^{n} f(x_i^*),\Delta x$, where $\Delta x = \frac{b-a}{n}$. The left, right, and midpoint versions differ only in where you sample the height of each rectangle, and as $n \to \infty$ every version converges to the exact definite integral $\int_a^b f(x),dx$.
BT
Bhanzu TeamLast updated on September 23, 202611 min read

What Are Riemann Sums?

Riemann sums are a way to approximate the area under a curve by adding up the areas of many thin rectangles. For a function $f$ on an interval $[a, b]$, you divide the interval into $n$ equal pieces, build a rectangle on each piece, and sum their areas.

The general formula is a single sum:

$$\sum_{i=1}^{n} f(x_i^*),\Delta x, \qquad \Delta x = \frac{b-a}{n}$$

Here $\Delta x$ is the common width of every rectangle, and $x_i^$ is the sample point in the $i$-th piece where you read the height $f(x_i^)$. Each term $f(x_i^*),\Delta x is one rectangle's area (height times width), and the sum stacks them side by side across [a, b].

Geometrically, the sum is an estimate of the shaded region between the graph and the x-axis. The only freedom you have is where to measure each rectangle's height, and that single choice gives the three named sums below.

How Do You Set Up A Riemann Sum?

Every Riemann sum starts from the same three ingredients: the width, the grid of division points, and the sample point.

  • The width. Split $[a, b]$ into $n$ equal subintervals, so each has width $\Delta x = \dfrac{b-a}{n}$.

  • The grid points. Label the division points $x_0 = a$, $x_1 = a + \Delta x$, up to $x_n = b$. In general $x_i = a + i,\Delta x$.

  • The sample point. On each subinterval $[x_{i-1}, x_i]$, pick one point $x_i^$ and use $f(x_i^)$ as the rectangle's height.

Once those are fixed, the estimate of the area is the sum $\sum_{i=1}^{n} f(x_i^),\Delta x$. Reading it as geometry keeps it honest: x is a base, f(x_i^) is a height, and the product is one rectangle.

What Are Left, Right, And Midpoint Riemann Sums?

The three standard Riemann sums differ only in the sample point $x_i^*$ they use on each subinterval.

  • Left Riemann sum. Sample at the left end of each piece, $x_i^* = x_{i-1}$. The heights are read at $x_0, x_1, \dots, x_{n-1}$.

  • Right Riemann sum. Sample at the right end, $x_i^* = x_i$. The heights are read at $x_1, x_2, \dots, x_n$.

  • Midpoint Riemann sum. Sample at the centre, $x_i^* = \dfrac{x_{i-1} + x_i}{2}$.

Written as sums, that is:

$$L_n = \sum_{i=1}^{n} f(x_{i-1}),\Delta x, \qquad R_n = \sum_{i=1}^{n} f(x_i),\Delta x, \qquad M_n = \sum_{i=1}^{n} f\left(\tfrac{x_{i-1}+x_i}{2}\right)\Delta x$$

For a function that is increasing across $[a, b]$, the left sum reads the smaller heights and so under-estimates the true area, while the right sum reads the larger heights and over-estimates it. For a decreasing function the roles swap. The midpoint sum usually lands closest, because the bit of curve it misses above the rectangle on one side tends to cancel the bit it adds on the other.

How Do You Compute A Riemann Sum?

Take the area under $f(x) = x^2$ from $0$ to $1$, which is the definite integral $\int_0^1 x^2,dx$. Its exact value is $\tfrac{1}{3} \approx 0.3333$, so the estimates below can be checked against a known target.

Use $n = 4$ rectangles, so $\Delta x = \dfrac{1-0}{4} = 0.25$ and the grid points are $0,\ 0.25,\ 0.5,\ 0.75,\ 1$.

Example 1: Left Riemann sum.

Sample at the left ends $0,\ 0.25,\ 0.5,\ 0.75$:

$$L_4 = 0.25\big(f(0) + f(0.25) + f(0.5) + f(0.75)\big)$$

$$L_4 = 0.25\big(0 + 0.0625 + 0.25 + 0.5625\big) = 0.25 \times 0.875$$

Final answer: $L_4 = 0.21875$, an under-estimate of $\tfrac{1}{3}$ (the function is increasing).

Example 2: Right Riemann sum.

Sample at the right ends $0.25,\ 0.5,\ 0.75,\ 1$:

$$R_4 = 0.25\big(f(0.25) + f(0.5) + f(0.75) + f(1)\big)$$

$$R_4 = 0.25\big(0.0625 + 0.25 + 0.5625 + 1\big) = 0.25 \times 1.875$$

Final answer: $R_4 = 0.46875$, an over-estimate of $\tfrac{1}{3}$.

Example 3: Midpoint Riemann sum.

Sample at the centres $0.125,\ 0.375,\ 0.625,\ 0.875$:

$$M_4 = 0.25\big(f(0.125) + f(0.375) + f(0.625) + f(0.875)\big)$$

$$M_4 = 0.25\big(0.015625 + 0.140625 + 0.390625 + 0.765625\big) = 0.25 \times 1.3125$$

Final answer: $M_4 = 0.328125$, much closer to $\tfrac{1}{3} \approx 0.3333$ than either endpoint sum.

The true area $0.3333$ sits between the left under-estimate $0.21875$ and the right over-estimate $0.46875$, exactly as the geometry predicts, and the midpoint estimate is nearest of the three.

What Are Upper And Lower Sums?

Two special Riemann sums bracket the true area from below and above. On each subinterval, the lower sum uses the smallest value of $f$ (its infimum) as the height, and the upper sum uses the largest value (its supremum). These are the Darboux sums.

For a function that only increases across $[a, b]$, the smallest value on each piece is at its left end and the largest is at its right end. So for an increasing $f$ the lower sum equals the left sum and the upper sum equals the right sum. For $x^2$ on $[0, 1]$ that means the true area is trapped: $0.21875 \le \tfrac{1}{3} \le 0.46875$. Squeezing the upper and lower sums together as $n$ grows is one rigorous way to define the integral.

How Do Riemann Sums Become The Definite Integral?

As the rectangles get thinner, the estimate stops being an estimate. Taking the number of rectangles to infinity gives the exact area, and that limit is the definition of the definite integral:

$$\int_a^b f(x),dx = \lim_{n \to \infty} \sum_{i=1}^{n} f(x_i^*),\Delta x, \qquad \Delta x = \frac{b-a}{n}$$

When the limit exists and gives the same value for every choice of sample point, the function is called integrable on $[a, b]$, and that shared value is written $\int_a^b f(x),dx$. This is where the area picture and the algebra of integration meet.

You can watch it happen in closed form for $x^2$ on $[0, 1]$. Use the right sum with general $n$, so $\Delta x = \tfrac{1}{n}$ and the right endpoints are $x_i = \tfrac{i}{n}$:

$$R_n = \sum_{i=1}^{n} \left(\frac{i}{n}\right)^2 \frac{1}{n} = \frac{1}{n^3}\sum_{i=1}^{n} i^2$$

Now use the standard sum of squares, $\displaystyle\sum_{i=1}^{n} i^2 = \frac{n(n+1)(2n+1)}{6}$:

$$R_n = \frac{1}{n^3}\cdot \frac{n(n+1)(2n+1)}{6} = \frac{(n+1)(2n+1)}{6n^2} = \frac{1}{3} + \frac{1}{2n} + \frac{1}{6n^2}$$

As $n \to \infty$, the two tail terms vanish:

$$\int_0^1 x^2,dx = \lim_{n \to \infty} R_n = \lim_{n \to \infty}\left(\frac{1}{3} + \frac{1}{2n} + \frac{1}{6n^2}\right) = \frac{1}{3}$$

The limit lands exactly $\tfrac{1}{3}$, matching the value the worked estimates were circling. As a check, setting $n = 4$ in $\tfrac{(n+1)(2n+1)}{6n^2}$ gives $\tfrac{(5)(9)}{6\cdot 16} = \tfrac{45}{96} = 0.46875$, the same $R_4$ computed by hand above.

Table: Where each Riemann sum reads the height of each rectangle, on a subinterval $[x_{i-1}, x_i]$.

Riemann sum

Sample point $x_i^*$

On an increasing $f$

Reads to

Left

Left end $x_{i-1}$

Under-estimate

Lower sum

Right

Right end $x_i$

Over-estimate

Upper sum

Midpoint

Centre $\tfrac{x_{i-1}+x_i}{2}$

Usually closest

Between

Lower (Darboux)

Point of smallest $f$

Under-estimate

Floor on area

Upper (Darboux)

Point of largest $f$

Over-estimate

Ceiling on area

Why Do Riemann Sums Work?

The idea rests on one honest observation: you can find the area of a rectangle exactly, and any region can be filled with rectangles.

  • A rectangle is easy. Base times height is exact, so a stack of rectangles has an area you can always add up, no matter how strange the curve on top.

  • Thin strips hug the curve. A wide rectangle badly misjudges a curved top, but a thin one barely notices the curve bending across its narrow base, so the error per rectangle shrinks as the strips get thinner.

  • The errors are squeezed out. The lower and upper sums trap the true area between them, and for a continuous function the gap between them collapses to zero as $n$ grows. Whatever value both sums are forced toward is the area.

That is why the limit is exact rather than merely close. The sum is never asked to be clever about the curve, only to add rectangles, and the curve's contribution to the error is driven to nothing by making the rectangles thin.

Who Discovered Riemann Sums?

Adding up thin slices to measure a curved region is one of the oldest ideas in mathematics, far older than the name attached to it.

Two more names sit on either side of that moment:

  • Archimedes of Syracuse (c. 287–212 BCE, Greece) computed areas and volumes by exhaustion, the direct ancestor of the Riemann sum.

  • Jean-Gaston Darboux (1842–1917, France) sharpened Riemann's definition using the upper and lower sums, giving the clean squeeze-the-brackets version taught today.

Where Are Riemann Sums Used In The Real World?

Any quantity that is a height accumulated over a width is a Riemann sum in disguise.

  • Physics and motion: the area under a speed-time graph is the distance travelled, so summing $\text{speed} \times \text{time}$ over short intervals estimates how far something has gone.

  • Engineering: the work done by a varying force is the area under a force-distance graph, computed as a sum of $\text{force} \times \text{small displacement}$.

  • Probability and statistics: the chance of a value falling in a range is the area under a probability density curve, which numerical methods estimate with Riemann-style sums.

  • Economics: total cost or total revenue accumulated from a marginal rate is the area under that rate, a running sum of small contributions.

  • Computer numerical integration: when a function has no elementary antiderivative, software falls back on midpoint, trapezoidal, or Simpson's rules, all refinements of the Riemann sum, to get a number.

The same move sits under all of them: replace a hard exact quantity with a sum of easy rectangles, then let the rectangles get thin. The link between a slope-based derivative and an area-based integral is the backbone of calculus.

What Are The Most Common Mistakes With Riemann Sums?

These three errors account for most lost marks on Riemann sums, matching the "frequent student mistakes" surfaced by AP-style review guides and the endpoint-and-$\Delta x$ confusion students ask about most.

Using the wrong sample point.

Where it slips in:

The problem asks for a left sum, and the student reads heights at the right endpoints, or uses an endpoint when a midpoint sum was requested.

Don't do this:

Do not grab whichever points are easiest. Left, right, and midpoint each name a specific point in every subinterval.

The correct way:

Fix the rule first. Left uses $x_{i-1}$, right uses $x_i$, midpoint uses $\tfrac{x_{i-1}+x_i}{2}$. For $[0.5, 0.75]$ the midpoint is $0.625$, not $0.5$ or $0.75$.

Off-by-one on the index range.

Where it slips in:

Writing the left sum with the same index range as the right sum, so one endpoint is counted and the opposite endpoint is dropped.

Don't do this:

Do not reuse $i = 1$ to $n$ for both. The left and right sums sample different endpoints.

The correct way:

Left sum runs the heights $x_0$ to $x_{n-1}$; right sum runs $x_1$ to $x_n$. Writing the sample list out in full before adding catches the slip every time.

Forgetting to multiply by $\Delta x$.

Where it slips in:

The student adds the heights $f(x_i^*)$ and reports that total as the area, leaving out the common width.

Don't do this:

Do not stop at the sum of heights. A height alone is not an area.

The correct way:

Every term is height times width, $f(x_i^*),\Delta x$. Factor the common $\Delta x$ out, add the heights, then multiply once at the end, as in $R_4 = 0.25 \times 1.875 = 0.46875$.

Practice Problems On Riemann Sums

Work each by hand, then check against the answer. Values are exact.

  1. For $\int_0^2 x,dx$ with $n = 4$, find the right Riemann sum.
    (Answer: $\Delta x = 0.5$; heights $0.5, 1, 1.5, 2$; $R_4 = 0.5 \times 5 = 2.5$. Exact area $= 2$.)

  2. For the same $\int_0^2 x,dx$ with $n = 4$, find the left Riemann sum.
    (Answer: heights $0, 0.5, 1, 1.5$; $L_4 = 0.5 \times 3 = 1.5$.)

  3. For $\int_0^1 x^2,dx$ with $n = 2$, find the midpoint sum.
    (Answer: $\Delta x = 0.5$; midpoints $0.25, 0.75$; $M_2 = 0.5(0.0625 + 0.5625) = 0.3125$.)

  4. Find $\Delta x$ for $\int_2^7 f(x),dx$ using $n = 10$ rectangles.
    (Answer: $\Delta x = \frac{7-2}{10} = 0.5$.)

  5. For $\int_0^3 x^2,dx$ with $n = 3$, find the right sum.
    (Answer: $\Delta x = 1$; heights $1, 4, 9$; $R_3 = 14$. Exact area $= 9$, so this over-estimates.)

  6. Using the closed form $\frac{(n+1)(2n+1)}{6n^2}$, find $\lim_{n \to \infty} R_n$ for $\int_0^1 x^2,dx$.
    (Answer: $\tfrac{1}{3}$.)

Where Should You Go Next After Riemann Sums?

Riemann sums are the doorway from areas to integration, and a few natural next steps build straight on them.

  1. Integration. The definite integral that the Riemann sum defines, with the rules and formulas that let you skip the limit and evaluate directly.

  2. Sequences. The sums $\sum i^2$ and their friends come from sequence and series work, the algebra that made the closed-form limit possible.

  3. Calculus. The bigger picture that ties areas (integrals) to slopes (derivatives) through the fundamental theorem of calculus.

Riemann sums sit in India's NCERT Class 12 calculus and in the US Common Core and AP Calculus AB course, so the same rectangles turn up on both syllabuses. If your child is meeting them for the first time, a live Bhanzu trainer teaches Riemann sums from the area picture up, in the Bhanzu math program.

Book a Free Demo

Was this article helpful?

Your feedback helps us write better content

Frequently Asked Questions

What is a Riemann sum in simple terms?
A Riemann sum is an estimate of the area under a curve found by adding up the areas of many equal-width rectangles. Each rectangle's height is the function value at a chosen point of its base, and the sum is $\sum f(x_i^*),\Delta x$.
What is the difference between left, right, and midpoint Riemann sums?
They use different sample points for the rectangle heights. The left sum reads the function at each subinterval's left end, the right sum at the right end, and the midpoint sum at the centre, which usually gives the closest estimate.
Which Riemann sum is the most accurate?
For most curves the midpoint sum beats the left and right sums at the same $n$, because its over- and under-shoots tend to cancel. The trapezoidal and Simpson's rules, both refinements of the same idea, are more accurate still.
How is a Riemann sum related to the definite integral?
The definite integral is the limit of a Riemann sum as the number of rectangles goes to infinity, $\int_a^b f(x),dx = \lim_{n \to \infty} \sum f(x_i^*),\Delta x$. When that limit exists and ignores the sample-point choice, the function is integrable.
What is $\Delta x$ in a Riemann sum?
It is the common width of each rectangle, $\Delta x = \frac{b-a}{n}$, found by splitting the interval $[a, b]$ into $n$ equal pieces. Every term in the sum is multiplied by this width.
Does using more rectangles always give a better estimate?
For a continuous function, increasing $n$ shrinks the error and drives the estimate toward the exact area. More rectangles mean thinner strips that hug the curve more closely, which is why the limit is exact.
✍️ Written By
BT
Bhanzu Team
Content Creator and Editor
Bhanzu’s editorial team, known as Team Bhanzu, is made up of experienced educators, curriculum experts, content strategists, and fact-checkers dedicated to making math simple and engaging for learners worldwide. Every article and resource is carefully researched, thoughtfully structured, and rigorously reviewed to ensure accuracy, clarity, and real-world relevance. We understand that building strong math foundations can raise questions for students and parents alike. That’s why Team Bhanzu focuses on delivering practical insights, concept-driven explanations, and trustworthy guidance-empowering learners to develop confidence, speed, and a lifelong love for mathematics.
Related Articles
Book a FREE Demo ClassBook Now →