Trapezoidal Rule Calculator

Approximate the definite integral of any function over [a, b] using the composite trapezoidal rule with n subintervals.

Inputs

Supports: +, -, *, /, ^, sin, cos, tan, exp, log, ln, sqrt, abs, pi, e

Enter values above and click Calculate to see the approximation.

Copied to clipboard!

Summary

Approximate the definite integral of any function over [a, b] using the composite trapezoidal rule with n subintervals.

How it works

  1. Enter a mathematical function such as x^2, sin(x), or e^x in the function field.
  2. Set the lower bound a and upper bound b for the integration interval.
  3. Choose the number of subintervals n (higher values give more accurate results).
  4. Click Calculate to apply the composite trapezoidal rule formula.
  5. Review the approximation result along with the step-size h and the partition table.

Use cases

  • Estimate areas under curves when an exact integral is hard to compute analytically.
  • Verify hand-calculated numerical integration homework answers.
  • Explore how increasing n reduces approximation error.
  • Integrate empirical data functions in physics and engineering problems.
  • Teach or learn the composite trapezoidal method step by step.
  • Quick numerical check before applying more complex methods like Simpson's rule.

Frequently Asked Questions

Last updated: 2026-06-10 · Reviewed by Nham Vu