The diagonal of a rectangular prism is the line that connects a vertex on the prism with an opposite vertex. The length of the diagonal can be calculated using the Pythagorean theorem in three dimensions. This theorem is useful when we have right angles, just as we have in a rectangular prism. The formula for the diagonal is written in terms of the base, width, and height of the rectangular prism.
Here, we will learn about the formula that we can use to calculate the diagonal of these prisms. Also, we will use this formula to solve some practice problems.
GEOMETRY

Relevant for…
Learning about the diagonal of a rectangular prism with examples.
GEOMETRY

Relevant for…
Learning about the diagonal of a rectangular prism with examples.
Formula to find the diagonal of a rectangular prism
The diagonal of a rectangular prism extends from one corner of the prism to the opposite corner of the prism. We can use the Pythagorean theorem in three dimensions to find the length of the diagonal using the lengths of the base, width, and height of the prism. Therefore, we have the formula:
$latex d=\sqrt{{{b}^2}+{{l}^2}+{{h}^2}}$ |
where b is the length of the base, l is the length of the width, and h is the length of the height.

Diagonal of a rectangular prism – Examples with answers
The formula for the diagonal of rectangular prisms is used to solve the following examples. Each example has its respective solution, where you can look at the reasoning and process used.
EXAMPLE 1
A rectangular prism has a base of 5 m, a width of 4 m, and a height of 3 m. What is its diagonal?
Solution
We have the following lengths:
- Base, $latex b=5$
- Width, $latex l=4$
- Height, $latex h=3$
Using the diagonal formula with these values, we have:
$latex d=\sqrt{{{b}^2}+{{l}^2}+{{h}^2}}$
$latex d=\sqrt{{{5}^2}+{{4}^2}+{{3}^2}}$
$latex d=\sqrt{25+16+9}$
$latex d=\sqrt{50}$
$latex d=7.07$
The diagonal measures 7.07 m.
EXAMPLE 2
If a rectangular prism has a base of 6 m, a width of 5 m, and a height of 7 m, what is its diagonal?
Solution
We have the following information:
- Base, $latex b=6$
- Width, $latex l=5$
- Height, $latex h=7$
We replace these values in the formula for the diagonal:
$latex d=\sqrt{{{b}^2}+{{l}^2}+{{h}^2}}$
$latex d=\sqrt{{{6}^2}+{{5}^2}+{{7}^2}}$
$latex d=\sqrt{36+25+49}$
$latex d=\sqrt{50}$
$latex d=10.49$
The diagonal measures 10.49 m.
EXAMPLE 3
What is the length of the diagonal of a rectangular prism that has a base of length 10 m, a width of 5 m, and a height of 6 m?
Solution
We have the following information:
- Base, $latex b=10$
- Width, $latex l=5$
- Height, $latex h=6$
Using these values in the formula, we have:
$latex d=\sqrt{{{b}^2}+{{l}^2}+{{h}^2}}$
$latex d=\sqrt{{{10}^2}+{{5}^2}+{{6}^2}}$
$latex d=\sqrt{100+25+36}$
$latex d=\sqrt{161}$
$latex d=12.69$
The diagonal measures 12.69 m.
EXAMPLE 4
What is the length of the diagonal of a rectangular prism that has a base of length 12 m, a width of 11 m, and a height of 8 m?
Solution
We have the following values:
- Base, $latex b=12$
- Width, $latex l=11$
- Height, $latex h=8$
Substituting these values in the formula, we have:
$latex d=\sqrt{{{b}^2}+{{l}^2}+{{h}^2}}$
$latex d=\sqrt{{{12}^2}+{{11}^2}+{{8}^2}}$
$latex d=\sqrt{144+121+64}$
$latex d=\sqrt{329}$
$latex d=18.14$
The diagonal measures 18.14 m.
Diagonal of a rectangular prism – Practice problems
Use the formula for the diagonal of rectangular prisms to solve the following problems. If you need help with this, you can look at the solved examples above.
See also
Interested in learning more about rectangular prisms? Take a look at these pages: