Skip to content
LoveToCalc

Theorem — what does that mean?

Space diagonal of a cuboid

Pythagoras twice — across the base, then up to the opposite corner.

In Swedish: Rätblockets rymddiagonal

Space diagonal of a cuboid

The relation

d²=l²+w²+h²

Pythagoras twice: across the base, then up to the opposite corner.

A box seen at an angle, with the hidden edges dashed. The length l runs along the bottom of the front face, the height h up its left side and the width w back into the picture. A dashed line d cuts through the box from the bottom front-left corner to the top back-right one.
Solve for
Solved for d

d=l²+w²+h²

d=13cm

d equals the square root of ((3 squared plus 4 squared) plus 12 squared), equals the square root of ((9 plus 16) plus 144), equals the square root of (25 plus 144), equals the square root of (169), equals 13 cm

Working5 steps

Practice questions

You are given

  • d=36cm
  • l=4cm
  • w=16cm

Pick the unit your lengths are in. Areas are then labelled in square units and volumes in cubic units; nothing is converted.

What the formula says

The space diagonal is the line straight through the box, from one bottom corner to the corner furthest away — diagonally across and one storey up. It is the longest straight line that fits inside the box.

You reach it with Pythagoras’ theorem, but the theorem has to be used twice:

  1. Across the base. The length l and the width w are the legs of a right-angled triangle lying flat on the base. Its hypotenuse — the base diagonal — is √(l² + w²).
  2. Up to the corner. That base diagonal and the height h are in turn the legs of a second right-angled triangle, standing up inside the box. Its hypotenuse is the space diagonal.

Square the second step and the root from the first one disappears, leaving the whole formula on one line:

d² = l² + w² + h²

The step that gets skipped

The first step is an ordinary Pythagoras question: the base diagonal. The second makes this a solid’s formula, and it is where the answer tends to stop too early. An answer shorter than the height cannot be the space diagonal.

One way to check: the space diagonal has to be longer than every single edge, and longer than the base diagonal. If it is not, something has gone wrong in the working.

Worked examples

A box 3 × 4 × 12 cm. The base diagonal is √(3² + 4²) = √25 = 5 cm. The space diagonal is then √(5² + 12²) = √169 = 13 cm. Straight from the formula: √(9 + 16 + 144) = √169 = 13 cm — the same number, without the intermediate step.

Working backwards. A cuboid has a space diagonal of 13 cm, a width of 4 cm and a height of 12 cm. Then l² = 169 − 16 − 144 = 9, so the length is 3 cm.

Will the plank fit in the van? The load space is 2.0 × 1.2 × 1.0 m. The space diagonal is √(4 + 1.44 + 1) = √6.44 ≈ 2.54 m, so a 2.2 m plank goes in at an angle even though it is longer than any single measurement. That is a common reason to work this out outside a classroom.

Common mistakes

Common questions

Why is it valid to use Pythagoras twice? Because both triangles are right-angled. The height of a cuboid is perpendicular to the base, and so to the base diagonal as well, which is what the theorem requires.

Is it called the space diagonal or the body diagonal? Both are used, and they mean the same thing. In Swedish it is rymddiagonal, occasionally kroppsdiagonal.

What is the space diagonal of a cube? All three measurements are equal, so d = √(3s²) = s√3 ≈ 1.732 · s. A cube with a 10 cm side has a space diagonal of about 17.3 cm.

Can I find an edge from the diagonal and the other two? Yes. Subtract the two known edges’ squares from the diagonal’s square and take the root of what is left. The diagonal has to be longer than the diagonal across the two known edges, or there is nothing left to take a root of.

Looking for another letter? The formula solved for each one
Solved for each letter
Solve forRearrangedWith the numbersComes to
ld²−w²−h²13²−4²−12²3 cm
wd²−l²−h²13²−3²−12²4 cm
hd²−l²−w²13²−3²−4²12 cm
dl²+w²+h²3²+4²+12²13 cm

Last reviewed October 6, 2026 ·How pages are reviewed

More about the cuboid

The same drawing, measured in the other ways it can be measured.

GeometryAll formulas

Put this formula on your site

Copy the code into your page where the formula card should appear. It loads from lovetocalc.com, so it stays current on its own — all we ask is that the credit line comes with it.