Math · 75 calculators
Diagonal Of A Rectangular Prism Calculator
The diagonal of a rectangular prism is the longest straight line you can draw inside it, running between opposite corners through the solid. This page shows how the three edge lengths combine under a three-dimensional version of Pythagoras' theorem, how that space diagonal differs from the face diagonals, and how to compute the volume at the same time.
Last updated
Space diagonal
13
- Base diagonal
- 5
- Side diagonal
- 12.6491
- Volume
- 144
Values update as you type. This calculator covers the single scenario its formula assumes — see Common Mistakes for what it leaves out.
The formula this calculator uses
d = sqrt(l^2 + w^2 + h^2)
- l
- Length of the prism
- w
- Width of the prism
- h
- Height of the prism
- d
- Space diagonal from corner to opposite corner
How to check the result by hand
- 1
Identify the three perpendicular edges
Write down the length, width and height of the prism and confirm that they meet at right angles. In the worked prism the edges are 3, 4 and 12, so length is 3, width is 4 and height is 12; the side diagonal is then formed by width and height.
- 2
Square each edge
Multiply each edge by itself: 3 times 3 is 9, 4 times 4 is 16 and 12 times 12 is 144. Squaring removes any concern about sign and turns each edge into the area of a square built on it, which is exactly the quantity Pythagoras' theorem adds together. Keep these three squares written down, because different diagonals use different subsets of them.
- 3
Add the appropriate squares
For the space diagonal add all three squares: 9 plus 16 plus 144 gives 169. For the base diagonal add only length and width squares: 9 plus 16 gives 25. For the side diagonal add only width and height squares: 16 plus 144 gives 160. Selecting the right subset at this stage is the single most important decision in the whole calculation, so check which corners the line you want actually joins.
- 4
Take the square root
The diagonal is the square root of each sum. The square root of 169 is exactly 13, the square root of 25 is exactly 5, and the square root of 160 is 12.649110640673518. Preserve the full value of any non-integer root during calculation and round only at the end for presentation, since early rounding introduces avoidable error into any figure derived from the diagonal.
- 5
Compute the volume and check consistency
Multiply the three edges for the volume: 3 times 4 times 12 is 144 cubic units. Then check that the space diagonal of 13 exceeds both the base diagonal of 5 and the side diagonal of 12.649110640673518, as it must. If a supposed space diagonal comes out shorter than a face diagonal, you have used the wrong subset of squares and should return to the previous step.
Common Questions
How does the Diagonal Of A Rectangular Prism Calculator work?
Square the length, width and height, add the three squares, then take the square root to get the space diagonal. A face diagonal uses only two of the edges: the base diagonal is sqrt(l^2 + w^2) and the side diagonal is sqrt(w^2 + h^2). For a prism measuring 3 by 4 by 12 units, the space diagonal is 13, the base diagonal is 5, the side diagonal is 12.649110640673518 and the volume is 144 cubic units.
What do I need to enter in the Diagonal Of A Rectangular Prism Calculator?
It takes 3 inputs: Length (length), Width (length), Height (length). Fields that expect a unit say so next to the label.
Where does Space diagonal come from?
It comes from d = sqrt(l^2 + w^2 + h^2) — square each of the three perpendicular edges, add the squares and take the square root. This is Pythagoras' theorem applied twice, once across the base and once from the base diagonal up to the opposite corner.
What is the most common mistake with the Diagonal Of A Rectangular Prism Calculator?
Adding the edges instead of their squares. Pythagoras' theorem adds squared lengths, not the raw edges. Adding 3, 4 and 12 gives 19, which is not a diagonal of anything. Always square each edge first, then add, then take the square root.
For worked examples, common mistakes and the limits of this formula, read the full How To Calculate The Diagonal Of A Rectangular Prism page.
