Rectangular Prism Calculator

Enter length, width and height. You get the volume, the surface area, and the space diagonal that tells you the longest object the box will take.

Known values

All three measurements must be in the same unit. Mixing inches with centimetres is the commonest cause of a wrong answer here.

Scale drawing · updates as you type
Example — This is a worked example. Change the values above to solve your own.
Volume 480cm³
Space diagonal 15.2643cm
Decimals
More properties
Surface area 392 cm²
Base area 40 cm²
Lateral area 312 cm²

How this was solved

1

Pick the formula

V = lwh — the base rectangle extended straight through the height.

2

Substitute

V = 8 × 5 × 12

3

Evaluate

V = 480 cm³

Have the AI walk through it Full explanation with the reasoning behind each step · 1 credit

Volume is just base times height

A rectangular prism — a box — has volume V = lwh. The reasoning is worth stating because it generalises well beyond boxes: the base is a rectangle of area lw, and that same rectangle continues unchanged all the way up through the height. Volume is base area times height.

Any solid whose cross-section stays constant follows the same rule, whatever the shape of that cross-section. A triangular prism, a hexagonal nut and a length of extruded aluminium channel are all handled by finding the area of the end face and multiplying by the length. The box is simply the case where the end face is a rectangle, which is why it is the one everybody meets first.

The space diagonal, and the pole-in-a-box problem

The space diagonal runs from one corner of the box to the corner diagonally opposite, passing through the interior. Its length is √(l² + w² + h²) — the Pythagorean theorem extended to three dimensions, and the reason this page reports it alongside the volume.

It comes from applying the familiar two-dimensional version twice. The diagonal across the base is √(l² + w²); treat that as one leg of a right triangle with the height as the other, and the hypotenuse is √(l² + w² + h²). Our 3D Pythagorean theorem calculator works the same relationship in the other direction.

The practical use is deciding whether something long will fit. A rigid pole, a curtain rail or a length of pipe goes into a box only if it is no longer than the space diagonal, and only if it can be angled corner to corner. For the worked example on this page — 8 by 5 by 12 — the diagonal is about 15.26, so a 15-unit rod fits diagonally though it is longer than any single edge.

One unit, all three dimensions. Length, width and height must share a unit before they are multiplied. A box measured as 24 inches by 30 centimetres by 1 foot has no meaningful product until all three are converted. Convert first, then calculate — and remember that converting the answer afterwards means cubing the conversion factor, not applying it once: a cubic foot is 1,728 cubic inches, not 12.

Surface area: six faces in three pairs

A box has six rectangular faces that come in three matching pairs: two of l×w, two of l×h and two of w×h. Adding them gives A = 2(lw + lh + wh).

The split matters when only part of the surface is in play. Painting a room means the four walls and the ceiling but not the floor. Wrapping a parcel needs all six. A box with an open top needs five. The lateral area this calculator reports — 2h(l + w) — is the four upright sides alone, which is the figure you want for a label wrapping round a carton or for the sides of an open crate.

Shipping, packing and dimensional weight

Carriers charge by whichever is greater, actual weight or volumetric weight, because a van fills up before it reaches its weight limit. Volumetric weight is the box's volume divided by a published divisor — commonly 5,000 for centimetre measurements, giving kilograms. A 60×40×40 cm carton comes to 96,000 cm³, so 19.2 kg volumetric, and a consignment of pillows will be billed on that rather than its real weight.

This is why reducing a carton's dimensions pays more than it first appears. Trimming every side by a tenth cuts the volume by about 27%, since volume responds to the cube of the linear change. It is also why void fill is expensive: the air inside an oversized box is charged at the same rate as the goods.

Frequently asked questions

What is the formula for the volume of a rectangular prism?
V = lwh — length times width times height. All three must be in the same unit before you multiply.
How do I know if a long object will fit in a box?
Compare it with the space diagonal, √(l² + w² + h²). Anything no longer than that can fit if it is angled from one corner to the opposite one.
What is the difference between a rectangular prism and a cube?
A cube is the special case where all three dimensions are equal. Every cube is a rectangular prism; most rectangular prisms are not cubes.
How do I convert the answer between units?
Cube the linear conversion factor. One foot is 12 inches, so one cubic foot is 12³ = 1,728 cubic inches. Applying the factor once instead of three times is a common mistake.