Educational tool; results are estimates for learning, verify with your textbook or instructor.
This tool approximates $\int_a^b f(x)\,dx$ with equal width rectangles. You type a simple expression, the endpoints $a$ and $b$, a count $n$ of subintervals, and a rule: left endpoints, midpoints, or right endpoints.
The sum is meaningful when $f$ is integrable on $[a,b]$ (or on $[b,a]$ if you reverse the ends) and when $n$ is large enough that the rectangles track the graph. Midpoint sums are often more accurate than left or right sums on a smooth monotone piece, but every rule here is still a rectangular estimate.
This is not symbolic integration. It does not find an antiderivative, it does not invoke the Fundamental Theorem, and it does not prove integrability. A Riemann sum is the definition’s finite picture, not a closed form.
How to use the rectangles
Enter $f(x)$ with the same constrained language as the other calculus tools. Set $a$ and $b$. Set $n$ (the default $100$ is a reasonable classroom size). Choose a rule and press Approximate integral.
The default $x^2$ on $[0,1]$ has exact integral $1/3$. A midpoint run with $n=100$ should land close to $0.333\ldots$. If it does not, check the expression before you trust a stranger function.
How to read the output
The large number is $\sum f(x_i^\ast)\Delta x$ with $\Delta x=(b-a)/n$ and $x_i^\ast$ the left, mid, or right sample in each subinterval. If $b<a$, $\Delta x$ is negative and the sum flips sign, which matches the usual definite integral convention.
Raise $n$ and watch the value settle. Settlement is evidence that the partition is fine enough for this $f$, not a proof that you have the exact integral. Compare left and right on a monotone graph: one overshoots, one undershoots, and the true integral sits between them.
Common pitfalls
A discontinuity or a blow up inside $[a,b]$ can make a sample non finite, and the tool will stop. That is a domain problem, not a rounding quirk. Split the interval or change the model.
Huge $n$ is slower and not automatically wiser. Past a point you pay in rounding and in time. For a smooth $f$, a few thousand midpoints usually already tell the story this page is meant to tell.
Expression rules are constrained on purpose. The parser is not general code. Rapid oscillation can need a picture, not only a larger $n$.
Related reading
Language: definite integral, integral, and derivative. The slope side of the Fundamental Theorem is what a derivative actually measures. Limits that justify the finer partition sit in epsilon delta intuition.
The map is calculus foundations. A path is the AP Calculus AB bridge. Nearby tools: numerical derivative calculator and numerical limit estimator.