Geometry & Trigonometry
Intermediate

Space Diagonal of a Cuboid

Longest diagonal through a rectangular box.

Formula

d=l2+w2+h2d = \sqrt{l^2 + w^2 + h^2}

Live Calculator

Members

Variables

lLength
wWidth
hHeight

Example

A 1 × 2 × 2 box: d = √(1+4+4) = √9 = 3.

How it works

The space diagonal is the straight-line distance from one corner of a rectangular box to the opposite corner inside the box. It works because you can first find the diagonal across the base using the Pythagorean theorem, then combine that with the height using the same idea again, which simplifies to d = \sqrt{l^2 + w^2 + h^2}. In other words, the three perpendicular edges contribute independently to the final distance.

When to use it

Use this formula when you need the longest internal distance across a rectangular prism, such as in packaging, construction, or 3D geometry problems. It is also useful when checking whether a long object will fit inside a box or container.

Worked example, step by step

Find the space diagonal of a box with length 6 cm, width 4 cm, and height 3 cm. Step 1: Substitute into the formula d = \sqrt{l^2 + w^2 + h^2} d = \sqrt{6^2 + 4^2 + 3^2} Step 2: Square each dimension d = \sqrt{36 + 16 + 9} Step 3: Add the values inside the square root d = \sqrt{61} Step 4: Approximate if needed d \approx 7.81 cm Final answer: d = \sqrt{61} cm \approx 7.81 cm

Common mistakes to avoid

  • Adding the side lengths first instead of squaring them first
  • Using only two dimensions and forgetting the third dimension
  • Confusing the space diagonal with a face diagonal on one side of the box

Did You Know?

The space diagonal of a box is the 3-D Pythagorean theorem — the longest straight line that fits inside.

Share this formula

Reviewed & maintained by the FormulaWon editorial teamLast reviewed September 2026