Rectangular Prism Calculator
Enter length, width, and height in any single unit — inches, feet, cm, m, or plain units — and get the box's volume, total surface area, space diagonal, and lateral area at once.
Example: with Length (l) 8 · Width (w) 5 · Height (h) 4 · Unit generic units → Volume: 160 cubic units.
- Total surface area184 square units
- Space diagonal10.247 units
- Lateral surface area104 square units
Computed by the calculator below using its default values. Change any input to see your own numbers.
V = lwh, SA = 2(lw + lh + wh), diagonal = √(l² + w² + h²) — the three workhorse box formulas.
One box, four numbers
A rectangular prism — a box — is fully described by three edges, and everything else follows. Volume l × w × h says how much it holds. Surface area 2(lw + lh + wh) says how much cardboard, paint, or wrapping covers it. The space diagonal √(l² + w² + h²) is the longest straight line inside — the corner-to-opposite-corner distance that decides whether a rod, curtain track, or ski fits in the box.
Lateral area, 2h(l + w), covers only the four upright sides. It is the number you want for painting walls but not ceilings, or wrapping a label around a carton.
Why the diagonal formula works
It is the Pythagorean theorem applied twice. The floor diagonal is √(l² + w²); stand it up against the height and the space diagonal becomes √(l² + w² + h²). For the default 8 × 5 × 4 box that is √105 ≈ 10.247 — noticeably longer than any single edge, which is why long items ship in short boxes.
How it’s calculated
V = l × w × h; SA = 2(lw + lh + wh); space diagonal d = √(l² + w² + h²); lateral area = 2h(l + w). Results appear in your chosen unit, its square, or its cube, rounded to 3 decimals.
Assumes a true rectangular prism with every corner at 90° — boxes that bulge or taper will differ from these ideals.
The four formulas at a glance
| Quantity | Formula | 8 × 5 × 4 example |
|---|---|---|
| Volume | l × w × h | 160 cubic units |
| Total surface area | 2(lw + lh + wh) | 184 square units |
| Space diagonal | √(l² + w² + h²) | 10.247 units |
| Lateral area | 2h(l + w) | 104 square units |
Computed with the formulas shown for the default 8 × 5 × 4 prism.
Common mistakes
- Mixing units — length in feet with height in inches; convert everything to one unit first.
- Doubling only some faces in surface area: it is 2lw + 2lh + 2wh, six faces in all.
- Using the floor diagonal √(l² + w²) when the question needs the space diagonal √(l² + w² + h²).
- Reporting volume in square units — volume is always cubic.
Frequently asked questions
What are the formulas for a rectangular prism?
Volume = l × w × h; surface area = 2(lw + lh + wh); space diagonal = √(l² + w² + h²); lateral area = 2h(l + w). All four use the same three edge lengths.
What is the space diagonal used for?
It is the longest straight object that fits inside the box — corner to opposite corner. Movers, shippers, and gamers checking whether a GPU fits a case all use it.
Is a cube a rectangular prism?
Yes — the special case l = w = h = s. The formulas collapse to volume s³, surface area 6s², and diagonal s√3.
Why is my volume wildly off?
Almost always mixed units. One dimension in feet among inches inflates or deflates the result by 12× per slip — and volume errors compound, since 1 cubic foot is 1,728 cubic inches.