Box Diagonal CalculatorFree online math calculator — instant results, no sign-up

Calculate the space diagonal of a rectangular box.

Inputs

Result
13

Sign in to save results and favorites.

About the Box Diagonal Calculator

The Box Diagonal Calculator finds the straight-line distance between opposite corners of a rectangular box through its interior. It uses the box’s length, width, and height to calculate this space diagonal with the three-dimensional Pythagorean theorem. With the default dimensions of 3, 4, and 12, the diagonal is 13.

Length
The length is one edge dimension of the rectangular box, entered in the same length unit as the width and height.
Width
The width is the edge dimension perpendicular to the length along the base, entered in the same length unit as the other dimensions.
Height
The height is the edge dimension perpendicular to the base, entered in the same length unit as the length and width.

Formula and method

d = √(l² + w² + h²); with the default inputs, d = √(3² + 4² + 12²) = √(9 + 16 + 144) = √169 = 13.
  • dThe space diagonal connecting opposite corners of the box, in the same unit as the inputs.
  • lThe box’s length; the default value is 3.
  • wThe box’s width; the default value is 4.
  • hThe box’s height; the default value is 12.

Square the length, width, and height, add those squares, and take the positive square root. This applies the Pythagorean theorem first across the base and then between the base diagonal and the height. For the default inputs, the squared dimensions sum to 169, so the space diagonal is exactly 13.

Worked example

These are the calculator's starting values and the results it actually produces for them.

Inputs

  • Length3
  • Width4
  • Height12

Results

  • Result13

How to use the Box Diagonal Calculator

  1. 1Enter 3 in Length to follow the default example, or enter your box’s measured length.
  2. 2Enter 4 in Width for the default example, using the same unit as Length.
  3. 3Enter 12 in Height for the default example, keeping all three dimensions in the same unit.
  4. 4Run the calculation to evaluate √(l² + w² + h²).
  5. 5Read the Result row: the default dimensions produce a space diagonal of 13 in the input unit.

Reading your result

The Result row reports the space diagonal, not a diagonal across a single face or a distance along the edges. A result of 13 means the straight-line distance through the box between opposite corners is 13 units; if the inputs are in centimeters, the result is 13 centimeters.

Limitations

The formula assumes a rectangular box with mutually perpendicular length, width, and height edges; it does not apply directly to slanted or irregular boxes. Use positive dimensions for a physical box and convert mixed units before entering values. Measurement uncertainty carries into the result, and non-exact square roots may require rounding. For fit checks, use internal dimensions: the diagonal alone does not guarantee that an object with thickness will fit or pass through the opening.

Common questions

How is the space diagonal different from the base diagonal?+

The base diagonal lies on the bottom face and equals √(l² + w²). With length 3 and width 4, it is 5; including height 12 gives the space diagonal √(5² + 12²) = 13.

Does swapping the length, width, and height change the box diagonal?+

No. Each dimension is squared and added, so assigning 3, 4, and 12 to different edge labels still produces a diagonal of 13.

Can I use the result to check whether a rod fits inside a box?+

The space diagonal is the longest straight-line distance within the rectangular interior, so it gives an upper length limit for an ideal rod with negligible thickness. A real rod also needs clearance for its thickness and a way to pass through the opening.

Do all opposite-corner diagonals of a rectangular box have the same length?+

Yes. A rectangular box has four space diagonals, and each spans the same three edge dimensions, so all four have length √(l² + w² + h²).

Does the calculator save my information?+

Calculations run in your browser. While signed in, inputs and results are automatically recorded in account history; saving a result creates a separate saved record.

You might also like

Results are estimates for informational purposes and are not financial, medical or legal advice.