Calcist

Style

Buttons

Spacing

How much to show

Decimal places

Text size

Double integral calculator

Type f(x, y) and the limits. You get the value of the double integral, the iterated-integral setup, each inner integral and an estimate of how accurate the answer is.

Use x, y, + − * / ^, brackets, sin, cos, tan, exp, ln, log (base 10), sqrt, abs, pi and e. Limits can be expressions like pi/2.

Private: calculated on your device. Nothing you type is sent anywhere.

Next: Working in one variable? The Riemann sum calculator compares the midpoint, trapezoid and Simpson rules side by side.

What a double integral measures

A double integral adds up f(x, y) over a flat region. If f is positive, the answer is the volume between the surface z = f(x, y) and the region. Divide by the region's area and you get the average value of f. Use it for volumes, mass from a density, totals from a rate spread over an area, and probabilities from a joint density.

How it's calculated

By Fubini's theorem, a double integral of a continuous function over a rectangle equals an iterated integral: integrate in y with x held fixed, then integrate that result in x. For a Type I region, where x runs from a to b and y runs from g(x) to h(x), the inner limits depend on x.

Rectangle: ∬ f dA = ∫ₐᵇ [ ∫꜀ᵈ f(x, y) dy ] dx
Type I region: ∬ f dA = ∫ₐᵇ [ ∫ from g(x) to h(x) of f(x, y) dy ] dx

The calculator does both integrals with composite Simpson's rule, which fits parabolas through groups of three points. With step h, the weights are 1, 4, 2, 4, …, 2, 4, 1, all times h ÷ 3. It works the answer out twice, with n and with 2n subintervals in each direction. Simpson's error shrinks about 16 times when the step halves, so the error left in the finer answer is roughly |S₂ₙ − Sₙ| ÷ 15. That's the estimate shown.

Worked example

Integrate f(x, y) = 3x² − y over 0 ≤ x ≤ 2, 0 ≤ y ≤ 3.

  1. Inner integral, x fixed: ∫₀³ (3x² − y) dy = [3x²y − y²/2] from 0 to 3 = 9x² − 9/2.
  2. Outer integral: ∫₀² (9x² − 9/2) dx = [3x³ − 9x/2] from 0 to 2 = 24 − 9 = 15.

Simpson's rule is exact for polynomials up to degree 3 in each variable, so the calculator returns exactly 15 here. The region's area is 6, so the average value of f is 15 ÷ 6 = 2.5.

For a curved region, take f(x, y) = xy with x from 0 to 1 and y from x² up to x. The inner integral is x(x² − x⁴) ÷ 2, and the outer integral gives (1/4 − 1/6) ÷ 2 = 1/24 ≈ 0.04166667.

Integrals with exact answers to test against

f(x, y)RegionExact value
3x² − y[0, 2] × [0, 3]15
e^y cos x[0, π/2] × [0, 1]e − 1 ≈ 1.718281828
sin x cos y[0, π] × [0, π/2]2
xy0 ≤ x ≤ 1, x² ≤ y ≤ x1/24 ≈ 0.04166667
10 ≤ x ≤ 1, x² ≤ y ≤ x1/6 (the area)

Limitations

  • This is a numerical answer, not a symbolic antiderivative. It's exact for low-degree polynomials and very accurate for smooth functions, but it won't give you a formula.
  • Improper integrals aren't handled. If f is undefined or infinite anywhere in the region, such as 1/x with x = 0 on the edge, the calculator says so instead of guessing.
  • Functions with sharp corners or rapid wiggles converge more slowly. If the error estimate is large, pick a bigger n.
  • For a Type II region (y from c to d, x between two curves of y), swap the roles: rename the variables so the outer one is x.

Sources

How we checked this

Before every update, this calculator is run in a real browser with these known answers, and it must match all of them:

  • 3x² − y over [0, 2] × [0, 3] = 15 exactly (OpenStax Example 5.6) ✓
  • e^y·cos x over [0, π/2] × [0, 1] = e − 1 ≈ 1.718281828 ✓
  • sin x·cos y over [0, π] × [0, π/2] = 2 ✓
  • xy between y = x² and y = x, 0 ≤ x ≤ 1: 1/24 ≈ 0.0416667 ✓
  • Area between y = x² and y = x is 1/6 ✓
  • 1/x on [0, 1] × [0, 1] is improper and is refused ✓
  • An unsupported function is rejected by the parser ✓

Last checked October 26, 2026. Spotted something wrong? The math is done in your browser with the formula shown on this page, so you can check any result by hand.

Add this calculator to your website (free)

Paste this code into any web page. The calculator works on your page, resizes itself, has no ads and no tracking, and nothing your visitors type is sent anywhere. More about embedding.

Questions people ask

How do I set up a double integral?

Decide which variable goes on the inside. For a rectangle either order works. For a region between two curves y = g(x) and y = h(x), integrate y from g(x) to h(x) inside, then x from a to b outside.

Does the order of integration matter?

Not for a continuous function on a rectangle: Fubini's theorem says dy dx and dx dy give the same answer. For curved regions the limits change when you swap the order, so redraw the region first.

How do I find the volume under a surface?

Integrate the height function f(x, y) over the base region. If f is negative somewhere, that part counts as negative, so split the region if you want total volume.

How accurate is the answer?

The calculator compares Simpson's rule with n and 2n subintervals. The difference divided by 15 estimates the error, and the answer is shown to the digits that estimate supports.

What does Type I region mean?

A Type I region lies between two vertical lines x = a and x = b, with y running from a lower curve g(x) up to an upper curve h(x).

Related calculators