Definite integral calculator

The area under a curve between two x-values, both exactly and by Simpson's numerical rule.

Enter your values and press Calculate. Your inputs stay in the address, so you can switch language or share the link.

Graph

Drag to pan, scroll or pinch to zoom, or use the + / − / ⟲ buttons. The graph can also be reached with the keyboard: Tab to it, then use the arrow keys and + / −.

Formula

∫ₐᵇ f(x) dx

How it works

The exact value uses the antiderivative of the chosen family (the function whose derivative is f), evaluated at the upper limit minus its value at the lower limit. Simpson's rule approximates the same area by fitting small parabolas across 200 narrow strips — shown here so you can see how close a numerical method gets to the exact answer.

Worked example

The same calculation with the default values:

  • Function family Quadratic: f(x) = ax² + bx + c
  • Coefficient a 1
  • Coefficient b 0
  • Constant c 0
  • Lower limit 0
  • Upper limit 2
  1. ∫ₐᵇ f(x) dx, a = 0, b = 2 → 2.666667
  2. numeric estimate (n = 200) ≈ 2.666667

Result: Exact value: 2.66666667 · Simpson's rule estimate: 2.66666667

For the reciprocal family, the interval must not cross x = 0, where the function is undefined.

Common mistakes

  • Confusing a definite integral (a specific number, the signed area over [a,b]) with an indefinite integral (a family of functions, the antiderivative) - this calculator computes the former, not a general formula.
  • Forgetting that area below the x-axis counts as negative - a function that dips below zero between a and b will have that portion subtract from the total, so the result is signed area, not the simple geometric area a person might picture.
  • Using too coarse a numerical approximation (too few sample intervals) for a function that changes rapidly - the accuracy of a numerical method like Simpson's rule depends on the function being reasonably smooth relative to the step size used.

Related calculators