Double Integral Calculator Online Free
Double Integral Calculator
Work out a double integral over a rectangle numerically. Type a function of x and y, set the x range and the y range, and this calculator approximates the double integral with a two-dimensional Simpson’s rule on a fine grid, entirely in your browser. Nothing is uploaded to a server.
Function f(x, y):
x from: to:
y from: to:
Scope, stated plainly: this calculator gives a NUMERICAL APPROXIMATION over a rectangular region only — rectangles whose sides are constant x and y limits. It does not do symbolic integration, it cannot show antiderivatives or working steps, and it does not handle circles, triangles, or regions described by curves. You can write the function with + – * / ^ (powers), brackets, the constants pi and e, the variables x and y, and the functions sin, cos, tan, asin, acos, atan, exp, log, ln, sqrt and abs. Shortcuts like 2x and xy are understood as multiplication. log means base 10 and ln means the natural logarithm. Angles are in radians.
A double integral measures the total “accumulation” of a function of two variables across a flat region: the volume under a surface, the mass of a plate whose density varies from point to point, the total charge spread over a sheet. When the region is a rectangle and the function is anything more complicated than a simple polynomial, working the integral out by hand means two rounds of symbolic integration — and for many real functions, no tidy antiderivative exists at all. The double integral calculator at the top of this page takes the practical route: you type a function of x and y, give the x range and the y range of a rectangle, and it approximates the integral numerically, sampling the function on a fine grid with a two-dimensional form of Simpson’s rule, entirely in your browser. As a first example, the double integral of f(x, y) = x² + y² over x from 0 to 1 and y from 0 to 2 comes out as approximately 3.333333 — the exact answer, for readers who want to check, is 10/3.
That word “approximately” is the honest centre of this tool, and it is worth being clear about it up front. This is a numerical calculator, not a symbolic one. It does not produce antiderivatives, it does not show integration steps, and it works only on rectangles — regions described by four constant limits. What it does give is a value computed by a well-understood method, with a built-in accuracy cross-check (it computes the integral on two grids, one twice as fine as the other, and reports how closely they agree), and a plain warning in the cases where a function misbehaves inside the region. For homework checking, engineering estimates, and building intuition about what a double integral “adds up to,” that is exactly the right tool.
What a Double Integral Is
A single integral adds up the values of a function along a line, weighted by tiny lengths. A double integral does the same over an area: imagine the rectangle divided into a grid of tiny cells, each of area Δx × Δy. In each cell, multiply the function’s height at that point by the cell’s area — that product is the approximate volume of a thin column standing on the cell — then add the contributions of every cell. As the grid is refined, the sum settles toward the true value of the double integral, written ∬ f(x, y) dA. If f is a height, the result is a volume. If f is a density, the result is a total mass. If f is 1 everywhere, the result is simply the area of the rectangle, which is a useful sanity check on any calculation: the integral of the constant 1 over a 2-by-3 rectangle must come out as 6.
Simpson’s rule, the method this calculator uses, improves on the plain grid sum by weighting the sample points in a pattern of 1, 4, 2, 4, …, 2, 4, 1 along each axis — the signature of fitting smooth parabolas through the sampled values instead of treating each cell as flat-topped. In two dimensions the weights multiply: a sample point gets the product of its x-weight and its y-weight, and the total is scaled by (hx × hy)/9, where hx and hy are the grid spacings. Because Simpson’s rule reproduces polynomials up to degree three exactly, smooth functions converge to the true integral very quickly as the grid refines. This calculator evaluates the integral on an 80 × 80 grid and then on a 160 × 160 grid — 25,921 sample points — and reports both, so you can see the size of the remaining numerical wobble for yourself rather than taking the digits on faith.
The classical alternative is iterated integration: hold y fixed, integrate over x, then integrate the result over y (or the other way round — Fubini’s theorem says the order does not matter for well-behaved functions on rectangles). That is how the exact answers quoted in this article were produced, and it is how you should check the calculator when the function is simple enough to integrate by hand. The numerical method exists for the many cases where it is not.
How to Use the Calculator
Using the tool takes a few seconds. Follow these steps:
- Type your function of x and y into the function box, using + − * / and ^ for powers, brackets for grouping, and the function names sin, cos, tan, asin, acos, atan, exp, log, ln, sqrt and abs. Shortcuts such as 2x and xy are read as multiplication, and pi and e are available as constants.
- Fill in the four limits: x from, x to, y from, y to. Limits are plain numbers (pi is allowed, so 0 to pi works).
- Press “Calculate Double Integral”.
- Read the result line, then the method line underneath it: it shows the rectangle’s area, the value from the coarser 80 × 80 grid, the value from the finer 160 × 160 grid, and how closely the two agree.
Two conventions to know before you start. Angles are in radians everywhere, so sin(x) over x from 0 to pi is the natural way to write the classic hump. And the two logarithms are different: log is base 10, ln is the natural logarithm — log(100) is 2, ln(e) is 1. If the function cannot be understood, or cannot be evaluated somewhere in the region, the tool says what is wrong rather than printing a confident nonsense number.
Worked Examples
Example 1: x² + y² over the rectangle x in [0, 1], y in [0, 2]
This is the calculator’s pre-filled example, and it can be checked exactly by iterated integration. Integrating with respect to x first: the antiderivative of x² + y² over x is x³/3 + xy², which between x = 0 and x = 1 gives 1/3 + y². Integrating that over y from 0 to 2 gives y/3 + y³/3 evaluated at 2, which is 2/3 + 8/3 = 10/3 ≈ 3.333333. The calculator returns approximately 3.333333, with the coarse and fine grids agreeing to far more digits than it prints — as expected for a low-degree polynomial, which Simpson’s rule handles essentially exactly.
Example 2: xy over the unit square
The integral of xy over x and y both running from 0 to 1 separates into the product of two single integrals, each equal to 1/2, so the exact answer is 1/4. The calculator returns 0.250000. Type it as x*y or simply xy — the parser understands the implied multiplication, exactly as it reads 2x as 2 times x. This example is a good first test whenever you meet any double integral tool: a product of a function of x and a function of y over a rectangle must equal the product of the two single integrals.
Example 3: sin(x)·cos(y) over [0, π] × [0, π]
Here the x-part, the integral of sin from 0 to π, is 2, while the y-part, the integral of cos from 0 to π, is 0 — the positive and negative halves of the cosine cancel exactly. The product is therefore 0, and the calculator returns approximately 0.000000, with the fine grid landing within a thousandth of zero. Cancellations like this are a meaningful test of a numerical method: the sampled values reach as high as 1 and as low as −1 across the region, yet the weighted sum still lands on zero because the symmetry is real, not approximate.
Example 4: exp(x + y) over the unit square
The exponential separates too: exp(x + y) is exp(x) times exp(y), so the exact answer is (e − 1)² ≈ 2.9524924420. The calculator returns 2.952492 — agreement to six decimal places on a function that is not a polynomial at all, which is the typical behaviour of Simpson’s rule on smooth functions over modest regions. Compare the two grid values the tool reports: for this example they differ by only a few parts in a hundred million.
Example 5: abs(x − y) over the unit square — reading the agreement line honestly
The absolute-value function has a crease along the diagonal x = y, and creases are where smooth-grid methods earn their keep least easily. The exact value is 1/3 ≈ 0.333333; the calculator returns about 0.333325 on the fine grid — close, but the two grids differ in the fifth decimal place, and the agreement figure the tool prints tells you so. This is the right way to use any numerical integrator: the headline number is the fine grid’s value, and the grid-agreement figure is the honest error bar. For machine-precision answers on friendly functions it will be tiny; on creased, spiky or rapidly oscillating functions it will be visibly larger, and widening the region makes it larger still.
How to Read the Output
The result line gives the headline value to six decimal places. The line beneath it carries the information that lets you judge that value. First, the region and its area — check these against what you intended, because a mistyped limit is the commonest source of “wrong” answers, and the area gives you a scale: a function hovering around height 2 over an area of 4 should give an answer near 8, not 80. Second, the method note and the two grid values, with their difference written in scientific notation (a figure like 2.22e-9 means the grids differ by about two billionths — nothing; a figure like 3.5e-3 means they differ by a few thousandths, and the last printed digits deserve suspicion). Third, occasionally, a note that the function was undefined at some sample points — for instance the logarithm or square root of a negative number at some grid points, or a division by zero along a curve inside the region. The calculator skips a small number of such points and tells you it did; if undefined points are more than a quarter of the grid, it refuses to print a value at all, because the “integral” of such a function over that region is usually infinite or meaningless, and a printed number would be a lie.
One more reading skill: signs. If your limits run backwards (x from 1 to 0 instead of 0 to 1), the calculator follows the mathematics and the sign of that variable’s contribution flips, so the whole integral changes sign. That is correct behaviour — a reversed integral is a negated integral — but if you did not intend it, the negative result is your clue.
Where Double Integrals Are Used
The volume interpretation is the one everyone meets first, but working scientists and engineers reach for double integrals constantly. In physics, the mass, centre of mass and moment of inertia of a flat plate with varying density are all double integrals of the density function (times 1, x or y, and x² + y² respectively). In probability, the chance that two independent continuous quantities land in a rectangular range is a double integral of their joint density — and every joint density must integrate to exactly 1 over its whole plane, a fact best appreciated by computing a few. In electrical engineering, total charge over a surface and flux calculations begin as double integrals. In economics and geography, population totals over a region come from integrating a density map. In each case the pattern is the same: a quantity known point-by-point, and a total needed over an area. The rectangle restriction of this calculator matches a large share of real setups — sensor grids, rectangular plates, map tiles, and textbook problems alike — and where the real region is not a rectangle, a rectangle that bounds it is often the first estimate worth having.
Common Mistakes
The first common mistake is expecting a symbolic answer. This calculator approximates; it will not tell you that an integral “equals 10/3”, only that it is approximately 3.333333 — recognising the fraction in the decimal is your job, and for contest or coursework answers the decimal is a check, not a substitute. The second is mixing up degrees and radians: every trigonometric function here works in radians, so sin over 0 to 180 gives a meaningless answer where 0 to pi was meant. The third is swapping log and ln — a factor of about 2.303 hides in that confusion. The fourth is trusting the digits blindly on difficult functions: a function with a spike (say, a narrow tall peak between grid points) can be under-sampled, which is exactly what the two-grid agreement figure is for — if the grids disagree in the third decimal, believe the disagreement, not the digits. The fifth is feeding in a region the function cannot live on: integrating sqrt(x − y) over a square where x − y is often negative, or 1/(x − y) across the diagonal where it explodes. The tool detects many such cases and says so, but the mathematics itself is the limit — an improper integral needs analysis, not a bigger grid. The sixth is forgetting that multiplication must sometimes be explicit: x(y + 1) and (x + 1)(y + 1) are fine — the parser inserts multiplication between a value and a following bracket — but a minus sign is never multiplication, and -x^2 means −(x²), following the standard convention.
Limits: What This Tool Does and Does Not Do
This calculator approximates double integrals over rectangles with constant limits, using Simpson’s rule on grids up to 160 × 160 subintervals, and reports a two-grid agreement estimate with every result. It parses functions built from + − * / ^, brackets, the constants pi and e, and the functions sin, cos, tan, asin, acos, atan, exp, log (base 10), ln (natural), sqrt and abs, with implicit multiplication such as 2x and xy. It does not perform symbolic integration and shows no antiderivatives or steps. It does not handle non-rectangular regions — no circles, triangles, polar coordinates, or limits that are themselves functions of the other variable — and it does not evaluate improper integrals over infinite regions; functions with singularities inside the region are flagged, not tamed. Triple integrals and line or surface integrals are different tools for a different day. Within its stated scope, though, the method is the standard one, the grid agreement is reported honestly, and the worked examples above can be verified by hand — which is the right standard for a calculator to meet.
Privacy: Your Function Stays in Your Browser
A function you type into a calculator can be homework, research, or a half-formed idea you are not ready to share. Everything you enter into this double integral calculator stays in your browser: the expression is parsed locally, the 25,921 sample evaluations happen on your own device, and nothing is sent to a server, stored, or shared. There is no account and no history. This browser-only design is the same principle behind the other free tools on Your Smart Kit — the strongest form of privacy is a calculation that never leaves the page.
Frequently Asked Questions
Is the answer exact?
For polynomials of low degree, effectively yes — Simpson’s rule integrates cubics exactly, so examples like x² + y² match the true value to all printed digits. In general the answer is a numerical approximation. The tool computes the integral on two grids and reports how much they differ; for smooth functions that difference is typically far below the sixth decimal place it prints.
Why does the calculator only accept rectangles?
Because constant limits are what make the grid method simple and reliable: the region is a regular lattice of sample points, and Simpson’s weights apply cleanly. Regions bounded by curves need the limits expressed as functions, which is a different (and more error-prone) input style. If your region is a disc or triangle, this tool can still bound the answer by integrating over a surrounding rectangle when the function is defined there — but the rectangle’s value is not the region’s value.
What functions and symbols can I use?
You can use + − * / and ^ for powers, brackets, the variables x and y, the constants pi and e, and the functions sin, cos, tan, asin, acos, atan, exp, log, ln, sqrt and abs. Implicit multiplication works: 2x, xy, 2(x + y) and (x + 1)(y − 1) are all understood. Powers are right-associative, so 2^3^2 means 2^(3^2) = 512, and −x^2 means −(x²).
What is the difference between log and ln here?
log is the base-10 logarithm (log(100) = 2) and ln is the natural, base-e logarithm (ln(e) = 1). The distinction matters — the two differ by a factor of about 2.303 — and it follows the convention of most calculators and textbooks.
The tool says my function was undefined at some sample points. What does that mean?
At some grid points the function has no real value — a division by zero, or the square root or logarithm of a negative number, for example. The calculator skips a small number of such points and warns you, because the result is then less trustworthy; if too much of the region is undefined it refuses to give a value at all. Check the region against the function’s domain: the fix is usually a smaller rectangle or a corrected function.
Is anything I type uploaded or saved?
No. The expression is parsed and evaluated entirely in your browser; nothing is sent to a server or stored anywhere.
Related Tools on Your Smart Kit
If you found the double integral calculator useful, the neighbouring tools on Your Smart Kit cover the rest of a calculus-and-summation workflow. The Sigma calculator adds up sequences and series term by term. The Piecewise Integral calculator approximates single integrals of functions defined in pieces, numerically, in the same spirit as this tool. The Infinite Series calculator examines what an endless sum settles toward, and the Mid Point Rule calculator approximates ordinary integrals with the midpoint method, a good contrast with Simpson’s rule. For the derivative side, the Partial Differentiation calculator works numerically with functions of two variables. And the Exponent calculator and Log calculator handle the building-block arithmetic. Each runs in your browser, free, with no sign-up, and each states its method and its limits as plainly as this one does. Try the calculator at the top of this page with the worked examples first — when a tool reproduces answers you can check by hand, you can trust it with the ones you cannot.
