Math

Riemann Sum Calculator

Left, right, midpoint and trapezoid sums from your own function values.

Enter your values

ⓘ Live results

Results
Trapezoid sum
22
Left Riemann sum
14
Right Riemann sum
30
Average of left and right
22
Subintervals n
4
Δx
1

Quick answer

A Riemann sum approximates an integral as Δx times a sum of sampled heights; the left, right and midpoint rules differ only in where each rectangle's height is measured.

∫f dx ≈ Δx · Σ f(xᵢ)

How to use the Riemann Sum Calculator

  1. 1Enter the interval limits a and b.
  2. 2Enter the function value at every partition point, evenly spaced.
  3. 3Compare the left, right and trapezoid estimates — the true value sits between the left and right sums for a monotonic function.

Worked example

Using the values the calculator loads with:

Inputs

  • Lower limit a0
  • Upper limit b4
  • Function values at each partition point (n+1 values)0, 1, 4, 9, 16

Results

  • Trapezoid sum22
  • Left Riemann sum14
  • Right Riemann sum30
  • Average of left and right22
  • Subintervals n4
  • Δx1

Frequently asked questions

Which rule is most accurate?

The trapezoid rule beats left or right sums for the same n, and Simpson's rule beats all three for smooth functions.

How many subintervals do I need?

Double n and see how much the answer moves. When the change is smaller than the precision you need, stop.

About this calculator

Results are estimates for general information. For medical, legal, structural or financial decisions, confirm with a qualified professional.