Left Riemann Sum
Height from the left endpoint of each subinterval. Underestimates increasing functions.
Left, right, midpoint and trapezoidal sums with rectangles drawn under f(x).
Enter your values below to get started.
Write powers with ^: x^3, 2^x.
Bounds accept pi, e and fractions like 1/2.
Pick Compare all to see the 4 methods side by side.
Double n and watch the error shrink about 2× (left, right) or 4× (midpoint, trapezoid).
A Riemann sum calculator estimates the area under a curve f(x) on an interval [a, b] by adding n rectangles. Enter the function, the bounds and the number of subintervals to get the left, right, midpoint or trapezoidal sum, every rectangle in a table, and a graph that shows the error against the exact integral.
A Riemann sum is an approximation of the area under a curve, built by adding the areas of n thin rectangles. Each rectangle has width Δx and a height equal to f(x) at one sample point inside its subinterval.
German mathematician Bernhard Riemann (1826–1866) formalized the idea in 1854. When n grows without bound, the sum approaches the definite integral ∫ab f(x) dx, which is why Riemann sums are the bridge between sums and integrals in calculus.
For f(x) = x² on [0, 2], 4 left rectangles give an area of 1.75, while the exact area is 8/3 ≈ 2.6667. With 100 rectangles, the left sum is 2.6268, an error of 1.5%.
The calculator splits [a, b] into n equal subintervals, evaluates f(x) at the chosen sample point of each one, multiplies by Δx and adds the results. It then compares the sum with the exact integral, computed with Simpson's rule on 2,000 subintervals.
Δx = (b − a) / n. For [0, 2] and n = 4, Δx = 0.5.
Left uses xi−1, right uses xi, midpoint uses (xi−1 + xi) / 2.
Each height f(xi*) is computed and listed in the table tab.
The sum of f(xi*) · Δx is the Riemann sum; the error is the gap to the integral.
The general Riemann sum formula is S = Σ f(xi*) Δx, summed from i = 1 to n. The 4 standard rules differ only in where xi* sits.
There are 6 common types of Riemann sums: left, right, midpoint, trapezoidal, upper and lower. On an increasing function, the left sum underestimates and the right sum overestimates; on a decreasing function, the roles swap.
Height from the left endpoint of each subinterval. Underestimates increasing functions.
Height from the right endpoint. Overestimates increasing functions.
Height from the center. Error shrinks with 1/n², about half the trapezoidal error.
Average of left and right sums; uses trapezoids instead of rectangles.
Height is the maximum of f on each subinterval, so it is always ≥ the integral.
Height is the minimum of f on each subinterval, so it is always ≤ the integral.
To calculate a Riemann sum by hand, find Δx, list the sample points, evaluate f at each point, add the values and multiply by Δx. Here is the right sum of f(x) = x² on [0, 2] with n = 4.
A function is Riemann integrable when every Riemann sum approaches the same limit as the widest subinterval shrinks to 0. That limit is the definite integral.
Every continuous function on a closed interval is Riemann integrable, as is any bounded function with finitely many jumps. The error of the left and right sums shrinks in proportion to 1/n; the midpoint and trapezoidal errors shrink in proportion to 1/n², so 10× more rectangles give 100× less error.
Type f(x), set a, b and n, pick a method and press Calculate. The result card shows the sum, Δx, the exact integral and the error; the tabs show the steps, every rectangle and the graph.
Type the function with x as the variable, for example x^3 - 2x.
Enter the limits of integration and the number of subintervals (1 to 10,000).
Left, right, midpoint, trapezoidal, or Compare all.
Open the Chart tab to see each rectangle against the curve.
Riemann sums turn a rate measured at intervals into a total. Common uses:
Common Riemann sum problems with n = 4 and their exact integrals.
| Integral | Method | Sum (n = 4) | Exact | Calculator |
|---|---|---|---|---|
| Left | 1.75 | 2.6667 | ||
| Right | 3.75 | 2.6667 | ||
| Midpoint | 2.625 | 2.6667 | ||
| Midpoint | 2.0523 | 2 | ||
| Trapezoidal | 1.1167 | 1.0986 | ||
| Right | 1.942 | 1.7183 | ||
| Left | 4.1463 | 5.3333 |
Try each one, then reveal the answer or solve it in the calculator.
Right Riemann sum of f(x) = x² + 1 on [0, 3] with n = 3.
Left Riemann sum of f(x) = 2x on [1, 5] with n = 4.
Midpoint sum of f(x) = x³ on [0, 2] with n = 4.
Trapezoidal sum of f(x) = 1/(1+x²) on [0, 1] with n = 4. Multiply by 4 to estimate π.
Right sum of f(x) = 9 − x² on [0, 3] with n = 6.
Left sum of f(x) = cos x on [0, π/2] with n = 3.
Discover 67 free sum calculators across different categories. Find the right calculator for your needs.
Try a different name or choose another category.
A Riemann sum calculator is an online tool that approximates a definite integral by adding the areas of n rectangles under f(x) on [a, b]. It returns the left, right, midpoint or trapezoidal sum with steps and a graph.
Find Δx = (b − a)/n, choose a sample point in each subinterval, evaluate f at those points, add the values and multiply by Δx.
Yes, usually. For smooth functions, the midpoint error is about half the trapezoidal error and has the opposite sign.
n is the number of subintervals, which is the number of rectangles. A larger n gives a smaller Δx and a more accurate estimate.
Yes. Rectangles where f(x) is below the x-axis have negative height, so they subtract from the total.
A Riemann sum is a finite approximation with n rectangles; the definite integral is the exact limit of those sums as n approaches infinity.
A left Riemann sum overestimates when f is decreasing on [a, b], since each rectangle takes the higher left-hand value.
Every continuous function on a closed interval [a, b] is Riemann integrable, as is every bounded function with finitely many discontinuities.
A Riemann sum turns the area under a curve into a sum of n rectangles, and the Riemann sum calculator does that work for any f(x), [a, b] and n. Use left or right sums to bracket the area of a monotonic function, midpoint or trapezoidal sums for accuracy, and raise n to drive the error toward 0.
Not sure which rule to pick? Answer 3 questions below.