StatGardenREF. DESK
Calculators/Maths/Cuboid
Maths

Cuboid calculator

Volume, surface area, individual face areas and space diagonal of a cuboid from its three edge lengths.

Published 21 August 2026

What this calculator does

A cuboid is a rectangular box: six rectangular faces meeting at right angles, with three edge lengths, usually called length, width and height, that between them fully determine every other measurement. A shipping carton, a brick, a shoebox and a shipping container are all cuboids, whatever their proportions.

This calculator takes those three edge lengths and returns the volume, the total surface area, the area of each pair of matching faces separately, and the space diagonal, the straight-line distance from one corner through the middle of the box to the opposite corner.

The formula

FormulaV = l·w·h; A = 2(lw + lh + wh); diagonal = √(l²+w²+h²)

Volume is length times width times height. Surface area is twice the sum of the three pairs of face areas: length×width, length×height and width×height, since a cuboid has two of each. The space diagonal comes from a three-dimensional version of Pythagoras' theorem: the square root of the sum of the squares of all three edges.

TermMeaning
l, w, hThe three edge lengths of the cuboid: length, width and height.
VVolume: l × w × h.
Space diagonalThe distance from one corner of the cuboid to the opposite corner, passing through its interior: √(l² + w² + h²).

The inputs explained

FieldWhat to enter
LengthThe length of the cuboid.
WidthThe width of the cuboid.
HeightThe height of the cuboid.

When to use it

Working out packaging or shipping volume

Cartons, pallets and shipping containers are cuboids, and their volume and surface area (for the cardboard or wrap needed) both follow directly from the three edge measurements.

Checking whether an item fits inside a box

The space diagonal is the longest straight line that fits inside a cuboid, which is the figure to check when working out whether a long, rigid item can be packed in at an angle even if it does not fit along any single edge.

Estimating paint, wrap or laminate for a box-shaped surface

The individual face areas, rather than just the total surface area, are useful when only some faces of a cuboid, such as the four sides but not the top and bottom, need covering.

Worked examples

Every figure in the tables below is produced by this page’s own calculator at build time, so the numbers and the tool always agree. Select any row to load that scenario.

How do volume and surface area change as a cuboid gets taller?

A fixed 12 by 8 base, with height increasing.

12 × 8 base, height varied
HeightVolumeSurface areaSpace diagonal
3288.000312.00014.731
5480.000392.00015.264
8768.000512.00016.492
10960.000592.00017.550
151,440.00792.00020.809
Volume scales directly with height on a fixed base, from 288.000 at height 3 to 1,440.00 at height 15, a fivefold increase in height giving exactly a fivefold increase in volume. Surface area grows more slowly, from 312.000 to 792.000, since the fixed 96.000 top-and-bottom-pair area does not change with height.

Questions

What is the difference between a cuboid and a rectangular prism?

They describe the same shape. "Cuboid" is the more common term in British and Australian maths curricula; "rectangular prism" is more common in the United States. Both mean a box with six rectangular faces at right angles.

What is the difference between a cuboid and a cube?

A cube is a special case of a cuboid where all three edge lengths are equal. Every cube is a cuboid, but most cuboids, having at least two different edge lengths, are not cubes.

Why does the calculator show three separate face areas instead of just the total?

A cuboid has three distinct face shapes, each appearing twice (top and bottom, front and back, left and right), and they are not usually equal to each other. Showing each pair separately is useful whenever only some faces need covering, painting or measuring, rather than the whole surface.

How do I convert the volume figure into litres?

If length, width and height are measured in centimetres, dividing the volume in cm³ by 1,000 gives the capacity in litres, since 1,000 cm³ equals one litre. This calculator includes that conversion directly, on the assumption the inputs are in centimetres.

For a cuboid that tapers to a point instead of a flat top, see the pyramid calculator. For a more general rectangular prism and cube tool with the same underlying maths, see the prism calculator.