Triple Integral Calculator — Exact Answers Over a Box, Step by Step

Type any function of x, y and z, set the six constant bounds of your rectangular box, and get the triple integral — solved exactly by symbolic integration where possible, cross-checked by tanh–sinh quadrature, with the average value of the function over the box included.

100% FreeNo sign-up neededInstant results

Your triple integral

∭ over the unit box of (x + y + z) dV
x bounds
y bounds
z bounds
Advanced options — z bounds (lower and upper)

The z bounds are already included in the result with their default values — open Advanced options to change them.

Use + − * / and ^ for powers, brackets, and sin, cos, tan, exp, ln, sqrt, abs — plus the constants pi and e. Multiplication can be implicit: 2x, xy and 2(x + y) all work. Bounds are used exactly as entered — swapping a pair flips the sign.

Result

Triple integral value
1.5
∭ of (x + y + z) over the box [0, 1] × [0, 1] × [0, 1]
MethodExact — symbolic
Volume of the box1
Average value of f over the box1.5
1Set up the iterated integral: ∫ from 0 to 1, ∫ from 0 to 1, ∫ from 0 to 1 of (x + y + z) dz dy dx. By Fubini, any order gives the same value on a box.
2Integrate with respect to z, then apply the z bounds.
3Integrate the result with respect to y, then apply the y bounds.
4Integrate with respect to x, apply the x bounds: the value is 1.5.
5Cross-check: tanh–sinh (double-exponential) quadrature agrees with the exact value.
Cartesian coordinates over a rectangular box only — cylindrical and spherical coordinates are not supported in this version. Values display to 10 significant digits.

🔒 All calculations happen in your browser — no data leaves your device.

The region: one rectangular box

A triple integral over constant bounds accumulates f over every point of this box. The three edge directions are the x, y and z ranges you entered.

The box region B ∭ f dV accumulates f over all of B

Keep exploring

Three companion tools for calculus work.

Key Takeaways
  • A triple integral is an ordinary integral done three times — z, then y, then x — over a rectangular box with constant bounds only.
  • The answer is solved exactly by symbolic integration where possible and cross-checked by tanh–sinh quadrature, with the average value of the function over the box included.
  • Type any function of x, y and z — polynomials, products, sin, cos, exp, ln, sqrt and more — and set the six bounds that define the box.

How it works

Three steps from function and box to a verified answer.

1

Type the function

Any expression in x, y and z — polynomials, products, sin, cos, exp, ln, sqrt and more.

2

Set the six bounds

The lower and upper limit for each variable. Constant bounds only: the region is a rectangular box.

3

Integrate three times

One variable at a time — z, then y, then x — exactly where possible, and cross-checked numerically.

The math behind the triple integral

A triple integral is an ordinary integral done three times. By Fubini’s theorem, on a rectangular box with constant bounds the three integrations can be carried out one variable at a time, in any order, and the answer is the same. This calculator integrates with respect to z first, then y, then x:

∭B f dV = ∫x₁x₂ ∫y₁y₂ ∫z₁z₂ f(x, y, z) dz dy dx · average value = (1 ÷ V) × ∭B f dV

Worked examples (each one verified against an independent symbolic engine):

IntegralRegionValue
∭ (x + y + z) dVUnit cube [0, 1]³1.5
∭ x² dVUnit cube [0, 1]³1/3 ≈ 0.3333333333
∭ xyz dVUnit cube [0, 1]³0.125
∭ 1 dV[0, 2] × [0, 3] × [0, 1]6 — the volume itself
∭ e^(x + y + z) dVUnit cube [0, 1]³(e − 1)³ ≈ 5.073214112

Go deeper

The details that separate a rough guess from a trustworthy number.

For a continuous function over a rectangular box, all six integration orders give the same value:

  • dz dy dx — the order this calculator uses: innermost z, then y, then x.
  • Any other order — dy dz dx, dx dy dz and so on — must agree, which is a powerful way to check a hand computation.
  • Constant bounds are the key: the theorem is simple here because each variable runs between two fixed numbers. With curved regions described by variable bounds, the setup changes with the order even though the value still does not.

If your region is a ball, a cylinder or a cone, its Cartesian description needs variable bounds — and in practice those problems belong in spherical or cylindrical coordinates, which this version does not support.

Two engines run on every calculation:

  • Symbolic engine: a small exact integrator covering polynomials, products of powers, and sin, cos, tan, exp, ln and sqrt of linear arguments. When it succeeds, the answer is exact — no approximation at all.
  • Tanh–sinh (double-exponential) quadrature: 25 sample nodes per axis, clustered towards the edges of the box, computed over the whole box and again over 8 half-boxes — 140,625 points in total. The edge clustering keeps it accurate even when a function has a sharp edge or a logarithmic singularity at a bound, the cases where plain quadrature falls apart.
  • Cross-check policy: when the symbolic engine succeeds, the numeric result must agree with it before the exact value is shown. If they ever disagreed, the page would show the numeric value instead.

Functions with no closed-form antiderivative in the symbolic engine — for example 1/(1 + x + y + z) — are answered by the quadrature alone, and the method line on the result says so honestly.

Five functions, one box, five answers you can check

A triple integral over a rectangular box is an iterated integral: integrate with respect to one variable, then the next, then the third, with the other variables held constant at each step. The calculator does that symbolically first, and only falls back to numerical quadrature when no closed-form antiderivative exists, as its own guide explains, and the method line on the result says which route was taken. The five examples below were all run through this page’s own calculator over the default box, [0, 1] × [0, 1] × [0, 1], except where a different box is stated, so you can reproduce every value by typing the same function in. The box has volume 1, which makes the average value of the function over the box equal to the integral itself in these examples, a convenience worth noting before it confuses a later example where the volume is not 1.

Function f(x, y, z)Triple integral over [0, 1]³Average valueWhy, in one line
x + y + z1.51.5Each variable contributes 0.5, and 0.5 + 0.5 + 0.5 is 1.5
111Integrating 1 over a region gives its volume, which is 1
x0.50.5The average of x over [0, 1] is 0.5, times volume 1
x·y·z0.1250.1250.5 × 0.5 × 0.5, one factor per variable
x²0.33333333330.3333333333The integral of x² over [0, 1] is 1/3, times volume 1 in y and z

The default, x + y + z, is the best first example because it separates cleanly. Integrate with respect to z first, holding x and y constant: the antiderivative is (x + y)z + z²/2, evaluated from 0 to 1, giving x + y + 0.5. Integrate that with respect to y, from 0 to 1: the antiderivative is xy + y²/2 + 0.5y, evaluated to give x + 0.5 + 0.5, which is x + 1. Integrate with respect to x, from 0 to 1: the antiderivative is x²/2 + x, evaluated to give 0.5 + 1, which is 1.5. The calculator displays its own step-by-step version of that chain, and the point of reading it is not to admire the algebra but to see Fubini’s theorem at work: on a rectangular box, with a continuous function, the order of integration does not change the value, so the calculator may integrate in any order and the answer is the same, which is why the page’s own frequently asked question can answer “does the order matter” with a plain no for this region.

The product example, x·y·z, shows the opposite structure, separation rather than addition. Because the function is a product of a function of x alone, a function of y alone and a function of z alone, the triple integral factorises into the product of three single integrals, each from 0 to 1: the integral of x is 0.5, the integral of y is 0.5, the integral of z is 0.5, and 0.5 × 0.5 × 0.5 is 0.125, exactly what the calculator displays. The constant function, f = 1, is the limiting case of the same idea: integrating 1 over any region gives the region’s volume, and over the unit box the volume is 1, so the integral is 1 and the average value is also 1. The x² example shows the calculator’s display precision rather than any new mathematics: the exact value is one third, and the calculator displays 0.3333333333, ten decimal places, which is the exact fraction rounded for display, not a numerical approximation, as the “Exact — symbolic” method line confirms. If the method line ever said otherwise, for a function with no closed-form antiderivative, the value would be a quadrature result, and the page’s own guide is explicit that the method line says so honestly in that case.

Changing the box: volume, average, and swapped bounds

Changing the box changes the integral in two distinct ways, through the volume and through the function’s values over the new region, and the calculator displays both, so they can be separated. Stretch the x-range of the default function, x + y + z, from [0, 1] to [0, 2], keeping y and z on [0, 1], and the integral becomes 4, with a box volume of 2 and an average value of 2. The arithmetic separates as follows: integrating x over [0, 2] gives 2, while y and z, each integrated over their unit ranges and multiplied by the x-range length of 2, contribute 1 each, and 2 + 1 + 1 is 4. The average value, the integral divided by the volume, is 4 divided by 2, which is 2, and it is larger than the unit-box average of 1.5, because the stretched box includes larger x values, up to 2, where the function itself is larger. Volume and average are therefore not redundant displays: the volume tells you how big the region is, the average tells you how large the function is on average over it, and the integral is their product.

Moving the box without stretching it shows the other effect cleanly. Keep x and y on [0, 1] and move z from [0, 1] to [1, 2], and the integral of x + y + z becomes 2.5, with volume still 1 and average value 2.5. The box is the same size, but it sits where z is larger by exactly 1 throughout, so the function is larger by exactly 1 at every point, and the integral rises by exactly 1, from 1.5 to 2.5. That is the sense in which a triple integral is an accumulation: shifting the region in the direction where the function grows adds the shift, times the volume, to the total. Swapping a lower and an upper bound, by contrast, changes the sign rather than the size: the page’s own frequently asked question explains that reversing the bounds of one integral reverses the sign of the whole iterated integral, because each single integral changes sign when its bounds are swapped, and a single swap therefore negates the triple integral, while two swaps restore it. The calculator follows that rule, and it is worth testing once, with a bound pair deliberately reversed, to see the sign change happen rather than merely believing it.

Two limits of this calculator deserve a plain statement, because they decide whether a given problem belongs here at all. First, the region is a rectangular box, with constant bounds for each variable: a region whose bounds depend on the other variables, such as a sphere or a tetrahedron, cannot be entered as such, and must be handled by other means, however natural the question feels. Second, the symbolic engine covers the functions it covers, and functions with no closed-form antiderivative in its engine, such as 1/(1 + x + y + z), are answered by quadrature alone, with the method line saying so. The page does not hide that distinction, and neither should any report of a value taken from it: quote the value with its method, “exact — symbolic” or quadrature, because the two kinds of answer carry different kinds of certainty, even when their displayed digits look equally confident.

What a triple integral is for, beyond the box

Inside the box, a triple integral is a sum over a volume, and its physical meanings follow from what the function represents. If f is a density, mass per unit volume, then the integral is the total mass in the box: a constant density of 1 over the unit box gives a mass of 1, in the same units, which is the f = 1 example read physically. If f is 1 everywhere, the integral is the volume itself, which is why the volume display and the f = 1 integral always agree. If f is a temperature, or a concentration, or any other quantity distributed through the box, then the average value, the integral divided by the volume, is the single number that summarises the distribution, and it is the number a sensor averaging over the box would report. Those three readings, total, volume and average, are the same calculation with different labels on the function, and the calculator’s three displays, integral value, box volume and average value, exist so that whichever reading you need is already on the page.

Beyond the box, the same idea extends, with more work, to regions that are not boxes, to coordinate systems beyond Cartesian, and to applications from centre of mass to moments of inertia to the total charge in a volume from a charge density. The page’s own frequently asked question notes which coordinate systems this calculator supports, and the honest boundary is that it supports the box in the coordinates it offers, not arbitrary regions in arbitrary coordinates. That boundary is not a flaw in the idea; it is the price of an exact symbolic answer, which is possible on a box because the iterated integrals separate, and much harder on a general region, where the bounds themselves become functions. Use this page to learn the mechanics on a box, to check a hand calculation, and to build intuition for what “integrate over a volume” means, and when the region stops being a box, carry the intuition with you to a tool built for that region, knowing exactly which step, the separation of the iterated integrals, was doing the work here.

Integrating a product, step by step, and why order never matters here

The product example from the guide above, x·y·z over the unit box, deserves a full step-by-step treatment, because it is the example where the iterated structure is most visible and where a single misstep in the order of variables produces a wrong-looking answer that is actually right in disguise. Integrate with respect to z first, holding x and y constant: the antiderivative of x·y·z with respect to z is x·y·z²/2, and evaluating from 0 to 1 gives x·y/2, with the z gone and a factor of one half left behind. Integrate that with respect to y, holding x constant: the antiderivative of x·y/2 with respect to y is x·y²/4, and evaluating from 0 to 1 gives x/4, with the y gone and another factor of one half accumulated. Integrate that with respect to x, from 0 to 1: the antiderivative of x/4 is x²/8, and evaluating from 0 to 1 gives 1/8, which is 0.125, exactly the calculator’s displayed value. Each step removes one variable and contributes one factor of one half, because each single integral over [0, 1] of the remaining variable contributes its own average of one half, and the product of the three halves is one eighth.

Now run the same integral in the opposite order, x first, then y, then z, and watch the same factors appear in a different sequence. Integrating x·y·z with respect to x first gives y·z·x²/2, evaluated from 0 to 1 as y·z/2. Integrating with respect to y gives z·y²/4, evaluated as z/4. Integrating with respect to z gives z²/8, evaluated as 1/8. The intermediate expressions differ at every step, the first order leaves x·y/2 then x/4, the second leaves y·z/2 then z/4, but the final value is identical, because Fubini’s theorem guarantees it for a continuous function on a rectangular box, and the calculator’s symbolic engine exploits that guarantee by choosing whichever order its internal routines handle most cleanly. The page’s own guide states the consequence plainly: on a box, any order gives the same value, and the step display on the result shows one order, not the only order. If your hand calculation integrates in a different order and reaches the same final value by different intermediates, that is agreement, not disagreement, and the intermediates are not supposed to match.

The same step-by-step discipline applied to x² over the unit box shows why the calculator’s display has ten decimal places. Integrate with respect to z first: x² does not depend on z, so the integral over [0, 1] multiplies it by the length of the z-range, 1, leaving x² unchanged. Integrate with respect to y: x² does not depend on y either, so the integral over [0, 1] again multiplies by 1, leaving x² unchanged. Integrate with respect to x: the antiderivative of x² is x³/3, evaluated from 0 to 1 as 1/3. The exact value is therefore the fraction one third, and the displayed 0.3333333333 is that fraction written to ten decimal places, with the method line confirming “Exact — symbolic” so that the reader knows the trailing digits are a display rounding, not a measurement of numerical error. A quadrature answer would also display ten digits, but its method line would say so, and its last digits would carry genuine approximation error rather than mere rounding. Reading the method line is, in the end, the difference between quoting a value and understanding it, and it costs nothing: it is printed on the result, directly beneath the number it qualifies.

One more check ties the whole page together, and it is the check to run whenever a triple integral answer looks implausible: compare the integral with the volume times a plausible average. The integral of x + y + z over the unit box is 1.5, the volume is 1, so the average is 1.5, and the function ranges from 0 at the origin to 3 at the opposite corner, with an average of 1.5 sitting exactly in the middle, as symmetry suggests it should for a linear function over a symmetric box. The integral of x·y·z is 0.125, the volume is 1, so the average is 0.125, and the function ranges from 0 on every coordinate plane to 1 at the opposite corner, with most of the box near the planes where the function is small, so an average well below the midpoint is exactly what intuition should expect. If an integral ever comes out larger than the volume times the function’s maximum, or smaller than the volume times its minimum, something has gone wrong, either a bound entered backwards, flipping the sign, or a function typed with the wrong variable, and that bounding check will catch it before the answer goes any further.

Setting up the iterated integral: innermost first

This calculator integrates in the order dz, then dy, then x. Written out, the triple integral over the box B is the iterated integral below, with the innermost integral done first and the outer integrals done last. Each inner integral treats the other variables as constants, which is what makes a triple integral an ordinary integral done three times.

Triple integral over B of f dV
= integral from a to b, integral from c to d, integral from e to f
of f(x, y, z) dz dy dx

The bounds are constants: a and b for x, c and d for y, e and f for z. Because no bound depends on another variable, the region is a rectangular box, and the order can be changed without changing the answer, which is the Fubini check the guide uses throughout.

Volume and average value from the same integral

Integrating 1 over the box gives its volume, because adding up 1 at every point of the region totals the size of the region. For a box the volume is the product of the three side lengths: (b minus a) times (d minus c) times (f minus e). The average value of a function over the box is then the triple integral divided by that volume.

Over the unit cube, from 0 to 1 in every variable, the worked values check by hand. The integral of x plus y plus z is 3/2: the inner integral gives x plus y plus 1/2, the middle gives x plus 1, and the outer gives 3/2, and with volume 1 the average is also 3/2. The integral of x is 1/2, and the integral of x times y times z is 1/8, because a separable product splits into three single integrals multiplied together.

Other coordinates: setting up in cylindrical and spherical

Some regions are easier in other coordinates, and the setup changes in two places: the variables and the volume element. In cylindrical coordinates the variables are r, theta, and z, and the volume element carries an extra factor r. In spherical coordinates the variables are rho, theta, and phi, and the volume element carries rho squared times sin phi. Those extra factors are part of the integral, not decorations, and leaving one out is the commonest setup error.

This calculator works in Cartesian coordinates over a rectangular box only, so a cylindrical or spherical setup must be done by hand or in a tool built for that region. The box practice still transfers: choose the order, write the bounds variable by variable, and check the result in a second order or against the volume case before trusting it.

Frequently asked questions

Quick answers about this triple integral calculator.

What does a triple integral calculate?

A triple integral adds up a function f(x, y, z) over a three-dimensional region. If f is a density, the result is the total mass; if f = 1, the result is simply the volume of the region. Here the region is a rectangular box, so the integral accumulates f over every point of that box.

Which coordinate systems does this calculator support?

Cartesian coordinates only, over a rectangular box with constant bounds. Cylindrical and spherical coordinates are not supported in this version — if your region is a ball, a cylinder or a cone, this is not the right tool yet.

Does the order of integration matter?

No. By Fubini’s theorem, for a continuous function over a box, all six orders (dz dy dx, dy dz dx, and so on) give exactly the same value. This calculator integrates with respect to z first, then y, then x.

How accurate is the numeric result?

When no closed-form antiderivative is found, the calculator uses tanh–sinh (double-exponential) quadrature: 25 nodes per axis, clustered towards the edges, over the whole box and 8 half-boxes — 140,625 sample points in total. For smooth functions the error is typically below one part in a trillion; the independent checks used to verify this page matched exact answers to within 0.00000000002 for every smooth test function, and even the hard case of ln(x) at a bound matched to within 0.000000000001.

What happens if I swap the lower and upper bounds?

Swapping one pair of bounds flips the sign of the result, exactly as with a single integral. The calculator uses your bounds in the order you enter them, so a box entered backwards gives the negative of the forwards value — and the average value stays consistent, because the signed volume flips too.

What can I type in the function box?

Use x, y and z with + – * / and ^ for powers, brackets, and the functions sin, cos, tan, exp, ln, sqrt and abs, plus the constants pi and e. Multiplication can be left implicit, so 2x, xy and 2(x + y) all work. Example: x^2 * y + sin(z).

Why is the integral of 1 over the box equal to its volume?

Because integrating 1 means adding up 1 at every point of the region, and the total of 1 over a region is the region’s size. Over the default unit box the volume is 1, so the integral of f = 1 is 1, and the average value is also 1. Over the stretched box [0, 2] × [0, 1] × [0, 1], the volume is 2, so the integral of f = 1 over that box would be 2. The volume display and the f = 1 integral always agree, because they are the same calculation.

How do I know whether my answer is exact or numerical?

Read the method line on the result. For the functions in the guide, x + y + z, 1, x, x·y·z and x² over the unit box, the method is “Exact — symbolic”, and the value 0.3333333333 for x² is the exact fraction one third rounded for display, not a numerical approximation. Functions with no closed-form antiderivative in the symbolic engine, such as 1/(1 + x + y + z), are answered by quadrature alone, and the method line says so honestly. Quote a value with its method, because the two kinds of answer carry different kinds of certainty.

What happens if I swap a lower and an upper bound?

The sign of the whole iterated integral reverses for a single swap, because each single integral changes sign when its bounds are swapped. Swap two bounds and the sign is restored, because two negations cancel. The calculator follows that rule, so a deliberately reversed bound pair is a quick way to test it: the magnitude stays the same and the sign flips. A negative triple integral over a box is therefore not an error; it is the sign convention for reversed bounds, or for a function that is mostly negative over the region.

Can this calculator handle a sphere or a tetrahedron?

Not as a region entered directly. This calculator integrates over a rectangular box, with constant bounds for each variable, which is what makes the iterated integrals separate and an exact symbolic answer possible. A region whose bounds depend on the other variables, such as a sphere or a tetrahedron, needs a tool that accepts variable bounds. Use this page to learn the mechanics on a box and to check hand calculations, and carry the intuition, integral as accumulation over a volume, to a tool built for the region you actually have.

What is the average value of x + y + z over the unit cube?

3/2. The triple integral of x + y + z over the cube from 0 to 1 in every variable is 3/2: the inner integral gives x + y + 1/2, the middle gives x + 1, and the outer gives 3/2. The volume of the unit cube is 1, so dividing the integral by the volume leaves 3/2, which is also the average of the three coordinate averages, 1/2 each.

How do I check a triple integral by hand?

Three checks catch most errors. Integrate in a second order and compare: Fubini's theorem says all six orders agree for a continuous function on a box. Test the volume case, f = 1, which must return the volume of the box. And test a separable product, where the triple integral splits into three single integrals multiplied together, as with x times y times z over the unit cube, which gives 1/8.

Can this calculator handle a region with variable bounds?

No. The region here is a rectangular box with constant bounds, six numbers that never depend on each other. A region whose bounds vary, a sphere, a tetrahedron, or a wedge, needs its bounds set up by hand, variable by variable, and a tool built for that region. Use this page to learn the mechanics on a box and to check the constant-bound steps.

Related calculators

More tools for calculus and beyond.

Disclaimer

This calculator is for information and study only. It works in Cartesian coordinates over a rectangular box with constant bounds; cylindrical and spherical coordinates are not supported in this version. Exact answers are produced by the symbolic engine where possible and are always cross-checked numerically; purely numeric answers come from tanh–sinh (double-exponential) quadrature — 25 nodes per axis over the whole box and 8 half-boxes. For graded coursework, always show your own working.

↑