Increasing f
Ln ≤ ∫ ≤ Rn. Example: x² on [0, 2] gives 1.75 ≤ 2.6667 ≤ 3.75.
Left and right Riemann sums side by side, their average and the bracket on the integral.
Enter your values below to get started.
For an increasing f, Ln is a lower bound and Rn an upper bound.
For a decreasing f, the 2 roles swap.
(Ln + Rn) / 2 equals the trapezoidal sum Tn.
Bounds accept pi, e and fractions like 1/2.
A left and right sum calculator computes the left Riemann sum Ln and the right Riemann sum Rn of f(x) on [a, b] at the same time. Enter the function, the limits and n to see both sums side by side, their average, the gap Rn − Ln = (f(b) − f(a))Δx, and, for an increasing or decreasing f, a guaranteed lower and upper bound on the integral.
Left and right sums are 2 Riemann sums that estimate the area under f(x) with n rectangles whose heights come from the left endpoint (Ln) or the right endpoint (Rn) of each subinterval. Both use the same width Δx = (b − a) / n.
For f(x) = x² on [0, 2] with n = 4, L4 = 1.75 and R4 = 3.75. The exact area 8/3 ≈ 2.6667 lies between them, since x² is increasing on [0, 2].
The left and right sum calculator evaluates f at the n + 1 grid points once, adds the first n values for Ln and the last n values for Rn, and multiplies each total by Δx. The 2 sums share n − 1 values, so they differ only by the end terms: Rn − Ln = (f(b) − f(a))Δx.
The calculator then samples f at 2,000 points to test whether f is increasing or decreasing on [a, b]. When f is monotonic, the result card reports the bracket min(Ln, Rn) ≤ ∫ f dx ≤ max(Ln, Rn).
Δx = (b − a) / n; for [0, 2] and n = 4, Δx = 0.5.
f(0) = 0, f(0.5) = 0.25, f(1) = 1, f(1.5) = 2.25, f(2) = 4.
Left: 0 + 0.25 + 1 + 2.25 = 3.5. Right: 0.25 + 1 + 2.25 + 4 = 7.5.
L4 = 1.75, R4 = 3.75, gap = (4 − 0) × 0.5 = 2.
The left sum formula is Ln = Δx Σ f(a + iΔx) for i = 0 to n − 1, and the right sum formula is Rn = Δx Σ f(a + iΔx) for i = 1 to n. Only the index range changes.
The average of the 2 sums is the trapezoidal sum Tn. For x² on [0, 2] with n = 4, (1.75 + 3.75) / 2 = 2.75.
The order of Ln, Rn and the integral depends on the shape of f: there are 4 cases, namely increasing, decreasing, constant and not monotonic.
Ln ≤ ∫ ≤ Rn. Example: x² on [0, 2] gives 1.75 ≤ 2.6667 ≤ 3.75.
Rn ≤ ∫ ≤ Ln. Example: 1/x on [1, 3] gives 0.95 ≤ 1.0986 ≤ 1.2833.
Ln = Rn = ∫ for every n, since each rectangle matches the graph.
No guaranteed order. For 2x − x² on [0, 2], L4 = R4 = 1.25 while the integral is 4/3.
To calculate left and right sums by hand, find Δx, evaluate f at all n + 1 grid points, add the first n values for the left sum and the last n values for the right sum, and multiply both totals by Δx. Here is f(x) = 1/x on [1, 3] with n = 4.
For a monotonic function, the left and right sums are a guaranteed lower and upper bound on the integral, and the bracket narrows to 0 as n grows. The width of the bracket is exactly |f(b) − f(a)|(b − a) / n.
For x² on [0, 2], the bracket is 1.75 to 3.75 at n = 4 (width 2) and 2.6268 to 2.7068 at n = 100 (width 0.08). Augustin-Louis Cauchy defined the integral as the limit of left-endpoint sums in 1823.
To make the bracket from left and right sums no wider than ε, use n ≥ |f(b) − f(a)|(b − a) / ε. The error falls in proportion to 1/n, so 10× more rectangles give 10× less error.
For x² on [0, 2] and ε = 0.01: n ≥ 4 × 2 / 0.01 = 800. The trapezoidal average of the same 2 sums reaches that accuracy with far fewer rectangles.
Type f(x), enter a, b and n, add a target bracket width if you need one, and press Calculate. The result card shows Ln and Rn, their average, their gap and the bracket; the tabs show the steps, both sets of rectangles and a row-by-row table.
Use x as the variable, for example e^(-x).
n is the number of rectangles in each sum (1 to 10,000).
Optional: type 0.01 to get the n that makes |Rn − Ln| ≤ 0.01.
The Graph tab draws left rectangles in purple and right rectangles in orange.
Left and right sums give a guaranteed range for a total when a rate only rises or only falls between readings. 4 common uses:
Left sums, right sums and the exact integral for common functions.
| Integral | n | Lₙ | Rₙ | Exact | Calculator |
|---|---|---|---|---|---|
| 4 | 1.75 | 3.75 | 2.6667 | ||
| 4 | 1.2833 | 0.95 | 1.0986 | ||
| 4 | 1.5124 | 1.942 | 1.7183 | ||
| 4 | 4.1463 | 6.1463 | 5.3333 | ||
| 4 | 2.25 | 6.25 | 4 | ||
| 4 | 1.0988 | 0.6664 | 0.8647 |
Find both sums, then reveal the answer or solve it in the calculator.
Left and right sums of f(x) = x² + 1 on [0, 3] with n = 3.
Left and right sums of f(x) = 2x on [1, 5] with n = 4. What is their average?
Left and right sums of f(x) = 9 − x² on [0, 3] with n = 6. Which one is the upper bound?
Left and right sums of f(x) = cos x on [0, π/2] with n = 3.
Smallest n so that left and right sums of x² on [0, 2] differ by at most 0.01.
Left and right sums of f(x) = ln x on [1, 2] with n = 5.
Discover 67 free sum calculators across different categories. Find the right calculator for your needs.
Try a different name or choose another category.
A left and right sum calculator is an online tool that computes the left Riemann sum Lₙ and the right Riemann sum Rₙ of f(x) on [a, b] together, with their average, their difference and a bracket on the definite integral.
A left sum takes each rectangle's height at the left endpoint xᵢ₋₁; a right sum takes the height at the right endpoint xᵢ. The 2 sums differ by (f(b) − f(a))Δx.
The left sum underestimates the integral when f is increasing on [a, b], since every rectangle uses the lowest value on its subinterval.
Yes, (Lₙ + Rₙ) / 2 = Tₙ for equal subintervals. For x² on [0, 2] with n = 4, (1.75 + 3.75) / 2 = 2.75.
No, left and right sums bracket the integral only when f is monotonic on [a, b]. For 2x − x² on [0, 2] with n = 4, both sums equal 1.25 while the integral is 4/3.
Use n ≥ |f(b) − f(a)|(b − a) / ε. For x² on [0, 2] and ε = 0.01, n = 800.
Yes, the right sum is smaller whenever f(b) < f(a), for example on any decreasing function such as 1/x on [1, 3], where R₄ = 0.95 and L₄ = 1.2833.
The error of a left or right sum shrinks in proportion to 1/n, so doubling n roughly halves the error. Midpoint and trapezoidal sums shrink with 1/n².
Left and right sums use the 2 endpoints of every subinterval, and the left and right sum calculator returns both at once, with their average, their gap (f(b) − f(a))Δx and a guaranteed bracket for monotonic functions. Check whether f is increasing or decreasing before calling either sum a bound, and use n ≥ |f(b) − f(a)|(b − a) / ε to size the bracket.
Not sure which sum answers your question? Use the decision tree below.