Skip to content
    Calculus

    What Is a Riemann Sum? Left, Right, Midpoint

    How can you find the area of a curved shape using only rectangles? Fill it with thin strips, add them up, and you are surprisingly close. That is a Riemann sum, the idea behind every integral. This guide shows you the left, right and midpoint methods with easy examples.

    Math Solver Academic Editorial Board5 min read

    Key takeaways

    • A Riemann sum estimates area by adding rectangles: Σ f(xᵢ*) × Δx.
    • Δx = (b − a) ÷ N, where N is the number of rectangles.
    • Left, right and midpoint only change where you measure each height.
    • The midpoint sum is usually the most accurate of the three.
    • More rectangles means a better estimate.
    In this guide
    1. 01What is a Riemann sum?
    2. 02Why do Riemann sums matter?
    3. 03The formula
    4. 04How to calculate a Riemann sum step by step
    5. 05Common mistakes to avoid
    6. 06Tips and tricks
    7. 07Where you’ll use it in real life
    8. 08Quick summary
    9. 09Worked example
    10. 10Frequently asked questions

    What is a Riemann sum?

    Finding the exact area under a curve can be hard. But the area of a rectangle is easy: width × height. So you cut the region into thin vertical strips, treat each strip as a rectangle, and add them up.

    The only question is where to measure each rectangle’s height:

    • Left: use the height at the left edge of each strip.
    • Right: use the height at the right edge.
    • Midpoint: use the height in the middle.

    Why do Riemann sums matter?

    Riemann sums are how integrals are defined: the exact area is the value the sum approaches as the rectangles get thinner and thinner. They also work with real data, where you don’t have a formula, only measurements.

    Bernhard Riemann made this idea precise in the 1850s. Today, computers use the same idea, with millions of thin strips, to estimate areas with no neat formula.

    The formula

    Area ≈ Σ f(xᵢ*) × Δx, Δx = (b − a) ÷ N
    SymbolWhat it meansExample
    a, bThe start and end of the interval0 and 2
    NThe number of rectangles (rects in the calculator)4
    ΔxThe width of each rectangle0.5
    xᵢ*Where you measure the height in strip imidpoints 0.25, 0.75, …
    f(xᵢ*)The height of rectangle if(0.25) = 0.0625

    This calculator uses f(x) = xᵖ. Choose the type with 1 = Left, 2 = Right, 3 = Midpoint. It also shows the exact answer and the error.

    How to calculate a Riemann sum step by step

    1. 1Find the width. Δx = (b − a) ÷ N.
    2. 2List the x-values. Left edges, right edges or midpoints, one per rectangle.
    3. 3Find each height. Put each x-value into f(x).
    4. 4Add and multiply. Add all the heights, then multiply by Δx.

    Now try it yourself. Pick a power, limits, number of rectangles and a type in the calculator below, and compare with the exact answer.

    Try it yourself

    Pre-filled with the example — change any value.

    🧮
    Calculus
    University

    Riemann Sum (Left/Right/Mid)

    Approximate ∫[a,b] xⁿ dx using n rectangles. Type: 1=Left, 2=Right, 3=Midpoint.

    ∫[a,b]f(x)dx ≈ Σᵢ f(xᵢ*)·Δx

    Area Under Curve ∫f(x)dx
    120
    120
    0.120
    120
    120

    💡 Example

    Reference
    Inputs:p=2, a=0, b=1, rects=4, rtype=3
    Result:0.328125
    Open the full Riemann Sum (Left/Right/Mid) calculator

    Common mistakes to avoid

    • Forgetting to multiply by Δx. Adding heights alone is not an area.
    • Expecting left and right to agree. For a rising curve, left underestimates and right overestimates.
    • Using the endpoints for a midpoint sum. Midpoints are halfway across each strip, like 0.25, not 0 or 0.5.

    Tips and tricks

    Where you’ll use it in real life

    • Travel: distance from speed readings taken every minute.
    • Weather: total rainfall from hourly rates.
    • Energy: electricity used from meter readings through the day.
    • Medicine: total drug exposure from blood tests taken at set times.

    Quick summary

    A Riemann sum estimates area by adding rectangles: find Δx, measure a height in each strip (left, right or middle), add them and multiply by Δx. More rectangles give a better estimate. Use the calculator above to compare your sum with the exact area and see the error.

    Worked example

    Your teacher asks you to estimate the area under y = x³ from x = 0 to x = 2 using 4 midpoint rectangles, then compare with the exact value. Here p = 3, a = 0, b = 2, rects = 4 and rtype = 3 (midpoint).

    1. 01∫[0 to 2] x^3 dx, Midpoint Riemann Sum, N=4
    2. 02Δx = (2 − 0) / 4 = 0.5
    3. 03Approximation = Σ f(xᵢ*) · Δx
    4. 04≈ 3.875
    5. 05Exact value = 4
    6. 06Error = 0.125

    These numbers are pre-filled in the calculator above.

    Frequently asked questions

    Which Riemann sum is most accurate?

    Usually the midpoint sum, because errors on each side of the middle partly cancel. Using more rectangles improves every type.

    How is a Riemann sum related to an integral?

    The definite integral is the value the Riemann sum approaches as the number of rectangles grows without limit and their width shrinks to zero.

    Is a left Riemann sum an overestimate or an underestimate?

    For a curve that is going up, the left sum is an underestimate and the right sum is an overestimate. For a curve going down, it is the other way round.

    #Calculus#University#Riemann Sum (Left/Right/Mid)
    Updated

    Keep reading

    Sponsored ToolsAd

    More tools on Ytools →
    Calcu.click — 25+ Free Smart Calculators preview

    Calcu.click — 25+ Free Smart Calculators

    Brand new calculation platform with 0ms reactive math, 100% client-side privacy, and dedicated subdomains. Fast calculators for EMI, SIP, Mortgage, Income Tax, BMI, Age, Percentage, and more.

    25+ CalculatorsFinanceHealth0ms Real-TimeFree
    Keyboard Arena preview

    Keyboard Arena

    Master touch typing with real-time WPM speed tests, mechanical switch audio, A-Z finger biomechanics drills, 40+ structured lessons, and competitive arcade games.

    Typing TestWPMTouch Typing
    Flutter Log Explorer preview

    Flutter Log Explorer

    Real-time structured log viewer and search explorer for Flutter & Dart. Zero-config capture from Debug Adapter (DAP) & Dart VM Service with smart classification and filters.

    FlutterDartVS Code ExtensionOpen VSX