Double Integral Calculator

  • Free
  • No sign-up
  • Works on phones
  • Shows the working
Multivariable#23

Double Integral over a Rectangle

\(\iint_R f(x, y)\,dA\) for \(R = [a, b] \times [c, d]\).

The double integral calculator evaluates \( \iint_R f(x, y)\,dA \) over a rectangle \( R = [a, b] \times [c, d] \). Type the function and the four limits, and you get the value of the integral plus the average value of \( f \) over the rectangle.

It’s useful for checking iterated integrals from homework, finding volumes under surfaces, and testing whether you set up the limits correctly. One limitation up front: it handles rectangular regions only, where \( x \) and \( y \) each run between fixed numbers. It is free and needs no sign-up.

How to use the double integral calculator

  1. Type \( f(x, y) \). Use ^ for powers, and sqrt(), sin(), cos(), ln(), e^(x y) and pi for functions. Implicit multiplication like x y^2 works.
  2. Enter the \( x \)-limits \( a \) and \( b \), then the \( y \)-limits \( c \) and \( d \). Limits can be expressions like pi/2, but they must be finite numbers.
  3. Press Integrate. The output shows the rectangle \( R \), the value of \( \iint_R f\,dA \) (with an exact form such as a fraction or a multiple of \( \pi \) when the result matches one), and the average of \( f \) over \( R \).

Formula

Over a rectangle, Fubini’s theorem lets you write the double integral as an iterated integral in either order:

$$\iint_R f\,dA = \int_a^b\!\!\int_c^d f(x, y)\,dy\,dx = \int_c^d\!\!\int_a^b f(x, y)\,dx\,dy$$

The average value of \( f \) over \( R \) divides by the area:

$$f_{\text{avg}} = \frac{1}{(b-a)(d-c)}\iint_R f\,dA$$

The calculator evaluates the integral numerically with a two-dimensional Simpson’s rule on a fine 240 × 240 grid. For smooth functions that is accurate to many decimal places. It gives the value only, not the antiderivatives, so use it to check the final number from your hand calculation.

Worked example

Example 1: iterated integral. Evaluate \( \iint_R (x^2 + 2y)\,dA \) with \( R = [0, 3] \times [0, 2] \).

Integrate in \( y \) first, treating \( x \) as a constant:

$$\int_0^2 (x^2 + 2y)\,dy = \Big[x^2y + y^2\Big]_0^2 = 2x^2 + 4$$

Then integrate in \( x \):

$$\int_0^3 (2x^2 + 4)\,dx = \Big[\tfrac23x^3 + 4x\Big]_0^3 = 18 + 12 = 30$$

The other order agrees: \( \int_0^3 (x^2 + 2y)\,dx = 9 + 6y \), and \( \int_0^2 (9 + 6y)\,dy = 18 + 12 = 30 \). The rectangle has area 6, so the average value of \( f \) is \( \frac{30}{6} = 5 \), the two-variable version of what the average value calculator does in one variable. This example is preloaded in the calculator above.

Example 2: a product that separates. Evaluate \( \iint_R y\sin x\,dA \) with \( R = [0, \pi] \times [0, 2] \).

When \( f(x, y) = g(x)\,h(y) \) on a rectangle, the integral splits into a product:

$$\int_0^\pi \sin x\,dx \cdot \int_0^2 y\,dy = 2 \cdot 2 = 4$$

The average value is \( \frac{4}{2\pi} = \frac{2}{\pi} \approx 0.6366 \). Enter y sin(x) with \( a = 0 \), \( b = \) pi, \( c = 0 \), \( d = 2 \) to check it.

Rectangles only: what to do with other regions

The calculator’s limits are four fixed numbers, so the region is always a rectangle with sides parallel to the axes. Many textbook problems use other regions, such as a triangle under \( y = x \) or a disk. For those:

  • Set up the iterated integral by hand with variable inner limits, for example \( \int_0^1\!\int_0^x f\,dy\,dx \) for the triangle below \( y = x \).
  • Do the inner integral yourself, then check the outer single integral with the definite integral calculator.
  • Switch to polar coordinates for disks and rings. Then \( dA = r\,dr\,d\theta \), and the region becomes a rectangle in \( (r, \theta) \). Enter the integrand multiplied by \( r \), using x for \( r \) and y for \( \theta \).

Two other points trip people up:

  • The result is a signed volume. Where \( f < 0 \) the integral counts negatively. For \( f = x - 1 \) on \( [0, 2] \times [0, 1] \), the positive and negative parts cancel and the integral is 0.
  • The integrand must be defined everywhere on \( R \). A function like \( \frac{1}{x} \) on a rectangle that includes \( x = 0 \) gives an error rather than a number.

For step-by-step setups with non-rectangular regions and switching the order of integration, read the guide to double integrals. Each inner integral is an ordinary single integral evaluated with the fundamental theorem of calculus.

Related guides

Further reading

FAQ

Can the double integral calculator handle non-rectangular regions?

No. It integrates over rectangles \( [a, b] \times [c, d] \) only. For triangles, disks or regions bounded by curves, set up the iterated integral by hand or convert to polar coordinates first.

Does the order of integration matter?

Not over a rectangle. For continuous functions, \( dy\,dx \) and \( dx\,dy \) give the same value, which is why the calculator only asks for the limits.

How do I find the volume under a surface?

If \( f(x, y) \ge 0 \) on the rectangle, the double integral is the volume between the surface \( z = f(x, y) \) and the \( xy \)-plane. Enter \( f \) and the limits, and the result is that volume.

Does it show steps?

It shows the value and the average of \( f \), not the intermediate antiderivatives. The worked examples on this page show how to get there by hand.

Embed this calculator on your website

Teachers, tutors and bloggers are welcome to use this calculator for free. Copy the code below and paste it into any page (in WordPress, use a "Custom HTML" block). The small script makes the calculator grow to fit its answer; if your site removes scripts, it still works at a fixed height. Please keep the credit link.

More calculators

See all calculators