How this calculation works
Evaluate the chosen sample in every equal subinterval using exact fractions, multiply by the interval width and add signed contributions. Integrate the same polynomial analytically for a separate reference. Compare the finite sampled sum with the signed integral rather than assuming every sum is an upper or lower bound.
Sum = Σ f(sampleᵢ) × Δx; Δx = (b−a)/n; polynomial integral = F(b)−F(a)A worked example
For x² on [0,1], four midpoint rectangles give 21/64 = 0.328125. The exact signed integral is 1/3, so sum minus integral is −1/192. Left and right endpoint choices give different finite sums.
Good to know
Rational-coefficient polynomials of degree ≤12 and strictly increasing rational bounds only. No trigonometric/general-expression parser, improper integral or adaptive method. Exact fractions have a size limit; diagram/decimal positions are approximate. Table cap 100; diagram omitted above 100 intervals. Negative rectangle heights contribute negatively. Plot axes use independent scales.
Reference: OpenStax Calculus: rectangle sampling and Riemann sums (opens in a new tab) ↗
Separate the polynomial, partition and sample rule
A finite Riemann sum chooses one function value in each subinterval and multiplies it by that interval’s width. This tool uses equal widths: Δx = (b − a)/n. Left endpoints, right endpoints and midpoints are distinct sampling rules even when the function and interval are unchanged.
Enter coefficients from the highest power down through the constant. For x² use 1 0 0; for 2x + 3 use 2 3. A missing zero changes which power a coefficient belongs to. The polynomial arithmetic calculator can work with coefficient lists for other exact polynomial operations.
For x² on [0,1] with four midpoint rectangles, the samples are 1/8, 3/8, 5/8 and 7/8. Their squared heights times width 1/4 sum to 21/64, or 0.328125. The polynomial antiderivative gives the exact signed integral 1/3, so sampled sum minus integral is −1/192.
Polynomial arithmetic calculator uses the same highest-power-first coefficient convention. Polynomial Riemann sums add a partition and sample rule, then compare a finite sum with the exact signed integral.
A rectangle picture needs its sign and scale conventions
Rectangles below the horizontal zero line contribute negatively. Positive and negative contributions can cancel, so a signed sum is not the total geometric area of all shaded pieces. The separate signed integral follows the same orientation convention; it is not silently changed into an unsigned area.
The SVG shows the selected samples and rectangles with independently scaled x and y axes. It also joins 201 evaluated polynomial points as a visual curve approximation. That joined line is not a continuous-curve accuracy guarantee. At more than one hundred subintervals the diagram is omitted and the table is capped, while the reported exact sum still includes every interval up to the one-thousand limit.
More subdivisions often help approximate an integral, but this page does not promise that every arbitrary polynomial and sample rule produces a monotonic error sequence or an upper/lower bound. The worked comparisons use x², where the left/right/midpoint results can be checked directly. A trapezoidal sample rule is another method and is not represented by relabelling one of these rectangle sums.
A few questions, answered
Can it parse sin(x), a singularity or an improper integral?
No. It accepts a bounded rational coefficient list for a polynomial of degree at most twelve. Other function families and improper limits require a different model.
Does the total use only the hundred displayed table rows?
No. Every entered subinterval is included in the total. The caption states how many rows are displayed.
Why can a rectangle sum differ from the exact integral?
The finite sum replaces the varying function within each interval with one sampled height. The antiderivative integrates the polynomial itself.