Rectangular Prism Calculator: Volume, Area & Diagonal
Find a rectangular prism's volume, surface area, and space diagonal from length, width, and height — or solve backward from the volume, area, or diagonal.
The three rectangular prism formulas
A rectangular prism (also called a cuboid or box) is defined by its three edges: length , width , and height . Given all three, every other measure follows directly:
The surface area comes from adding up 3 pairs of identical rectangular faces — a pair (top and bottom), a pair (front and back), and a pair (left and right) — hence the factor of 2 on each term. The space diagonal is the 3D extension of the Pythagorean theorem: it's the straight-line distance between two opposite corners of the box, cutting through the interior (the same formula used by a general 3D distance calculation).
Solving in the other direction
This calculator also works backward: give it the volume, surface area, or space diagonal together with length and width, and it solves for the height first, then derives the rest.
| Known | Solve for height | Then |
|---|---|---|
| , , | — (already known) | , , |
| Volume , , | , | |
| Surface area , , | , | |
| Space diagonal , , | , |
Worked example: l = 4, w = 3, h = 2
Because all three edges are whole numbers, the volume and surface area are EXACT integers, and the space diagonal has an exact simplified-radical form () in addition to its decimal approximation.
Worked example (reverse): volume V = 60, l = 4, w = 3
Dividing the volume by the base area gives exactly. Since the height lands on a clean whole number, the surface area and space diagonal also have tidy exact forms: and .
Worked example (reverse): surface area S = 100, l = 4, w = 3
Rearranging the surface-area formula gives — not a clean whole number, so no exact form applies here. The volume comes out as and the space diagonal as , both plain decimal approximations.
Common mistakes
- Dropping a term under the space-diagonal square root. needs all three squared edges — leaving one out (e.g. treating it as a 2D diagonal) always understates the true distance.
- Forgetting the factor of 2 in the surface area. A box has 3 PAIRS of faces, not 3 single faces — , not .
- Confusing the space diagonal with a face diagonal. A face diagonal only uses 2 of the 3 edges (e.g. for the top face); the space diagonal cuts through the interior and always uses all 3.
Where this shows up
- Boxes, rooms, tanks, shipping containers: the volume tells you how much they can hold; the surface area tells you how much material (cardboard, paint, wallpaper) is needed to cover them.
- Fitting a rigid object diagonally: the space diagonal tells you the longest straight object (a pole, a screen) that can fit inside a box-shaped space.
- The general case of the cube: every formula here reduces to the cube's own formulas when , and the same shape of formula (via ) reappears as the plain 3D distance formula between two points.
A rectangular prism is the natural 3D extension of a rectangle — knowing its three edges (or two edges plus one of volume, surface area, or space diagonal) is always enough to determine every other measure.
Frequently asked questions
- What are the formulas for a rectangular prism?
- With length , width , and height : volume , total surface area , and space diagonal . Knowing all three edges is enough to find the other three measures.
- How is a rectangular prism different from a cube?
- A cube is the special case of a rectangular prism where all three edges are equal (). A general rectangular prism (also called a cuboid or box) allows each edge to be a different length.
- How do I find the height if I only know the volume, length, and width?
- Divide the volume by the base area: h = V/(lw). For example, a volume of 24 with l = 4 and w = 3 gives a height of 24/(4×3) = 2, since V = lwh rearranges to h = V/(lw).
- How do I find the height if I only know the surface area, length, and width?
- Rearrange the surface-area formula: h = (S − 2lw)/(2l + 2w). A surface area of 52 with l = 4 and w = 3 gives h = (52 − 24)/14 = 2, since S = 2(lw + lh + wh) solves for h that way.
- How do I find the height from the space diagonal, length, and width?
- Use the rearranged Pythagorean form: h = √(d² − l² − w²). A space diagonal of about 5.3852 with l = 4 and w = 3 gives h ≈ 2, since d = √(l²+w²+h²) rearranges to isolate h² first.
- What is the most common mistake with rectangular prism formulas?
- Leaving out one of the three terms under the square root for the space diagonal (it needs all of l², w², and h²), or forgetting the factor of 2 in the surface-area formula — a box has 3 PAIRS of identical faces, not 3 single faces.
- Do volume and surface area have different units?
- Yes. The three edges and the space diagonal share the same linear unit (e.g. cm), but surface area is that unit squared (e.g. cm²) and volume is that unit cubed (e.g. cm³) — a 4×3×2 cm box has a surface area of 52 cm² and a volume of 24 cm³, not the same number with a different label.
- How is the rectangular prism related to the cube and the square?
- A cube is the special case of a rectangular prism where l = w = h — the rectangular prism is the general 3D box shape. The space-diagonal formula √(l²+w²+h²) is also the 3D distance formula between two opposite corners, and a rectangular prism's rectangular cross-sections are the same rectangle formula extended one dimension.