Rectangular Prism Diagonal Calculator

Rectangular Prism Diagonal Calculator

Leading AI Skill PRO
Rectangular box (cuboid)
Rectangular box (cuboid)Rectangular box (cuboid)l = 3h = 12w = 4d = 13d = 13
Worked stepsStep 2 of 2

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

Download figure
Figure data
Length3
Width4
Height12
Space diagonal13
Volume144
Rectangular box (cuboid) in the Library: formulas and every calculator

Enter Calculation

Formula

d=Length2+Width2+Height2d = \sqrt{\text{Length}^{2} + \text{Width}^{2} + \text{Height}^{2}}

Example

d=32+42+122=13d = \sqrt{3^{2} + 4^{2} + 12^{2}} = 13
Usage stats

Advertisement

Results

Space Diagonal
13
units
Base face diagonal (√(l²+w²)) 5
Volume 144

Report an error on this page

What Is the Diagonal of a Rectangular Prism?

A rectangular prism (also called a cuboid or box) has three dimensions: length (l), width (w), and height (h). The space diagonal is the straight line that runs from one corner of the box through its interior to the opposite corner. It is the longest straight segment that fits inside the prism. This calculator finds that diagonal instantly from the three side lengths.

Rectangular prism showing length, width, height and space diagonal
The space diagonal connects two opposite corners of the box through its interior.

How to Use the Calculator

Enter the length, width, and height of your box using the same unit (cm, inches, meters — anything works, as long as all three match). The calculator returns the space diagonal in those same units, plus the base face diagonal and the volume for convenience.

The Formula Explained

The space diagonal comes from applying the Pythagorean theorem twice. First, the diagonal of the base rectangle is \(\sqrt{l^2 + w^2}\). Then that base diagonal and the height form a right triangle, giving the full 3D diagonal:

$$d = \sqrt{l^2 + w^2 + h^2}$$

It works because the three edges are mutually perpendicular, so their squared lengths simply add.

Advertisement
Two right triangles showing how the base diagonal combines with height to form the space diagonal
The base diagonal \(\sqrt{l^2+w^2}\) and the height \(h\) form a right triangle whose hypotenuse is the space diagonal \(d\).

Worked Example

Suppose a box measures \(l = 3\), \(w = 4\), and \(h = 12\). Then $$d = \sqrt{3^2 + 4^2 + 12^2} = \sqrt{9 + 16 + 144} = \sqrt{169} = 13.$$ So the longest object that could fit corner-to-corner inside the box is 13 units long.

Advertisement

What the Diagonal Tells You

  • Longest straight line inside the box: the space diagonal runs from one corner to the opposite corner through the interior. A perfectly thin, straight object longer than \(d\) cannot fit, even when placed diagonally.
  • Always longer than any edge or face diagonal: \(d > \sqrt{l^2 + w^2}\), and that face diagonal is itself longer than \(l\) and \(w\). The same holds for the other two faces.
  • Always less than \(l + w + h\): a straight line is shorter than a path along three edges. For the 30 × 20 × 10 box, \(d \approx 37.42 < 30 + 20 + 10 = 60\).
  • Cube: with all edges equal to \(a\), \(d = \sqrt{3a^2} = a\sqrt{3} \approx 1.732a\).
  • Real-world fit depends on thickness: the diagonal applies to an ideal line with no width. A real object such as a rod, rolled poster or fishing rod has thickness, and its ends need clearance. It must therefore be somewhat shorter than \(d\), and a rigid or bulky item may not fit at all even if its length is below \(d\).

FAQ

Does the order of l, w, and h matter? No. Because all three terms are squared and added, you can swap them freely and get the same diagonal.

What units does the answer use? The same unit you enter. Use consistent units for all three dimensions.

What is the difference between the face diagonal and the space diagonal? The face diagonal lies flat on one side of the box, while the space diagonal cuts through the interior and is always longer.

Last updated:

Most popular in Geometry

View all Geometry calculators