Connect via MCP →

Enter Calculation

Formula

Formula: Rectangular Prism Calculator (Cuboid)
Show calculation steps (1)
  1. Total surface area & diagonal

    Total surface area & diagonal: Rectangular Prism Calculator (Cuboid)

    Total surface area is the sum of all six faces; the space diagonal connects opposite corners.

Advertisement

Results

Volume
30
Length (l) 5
Width (w) 3
Height (h) 2
Space diagonal (d) 6.16441
Total surface area (Stot) 62
Lateral surface area (Slat) 32
Top surface area (Stop) 15
Bottom surface area (Sbot) 15

What is a rectangular prism (cuboid)?

A rectangular prism, also called a cuboid, is a three-dimensional box bounded by six rectangular faces meeting at right angles. It is fully described by three edge lengths: length (\(l\)), width (\(w\)) and height (\(h\)). A cube is the special case where \(l = w = h\). This calculator works in pure geometry, so it applies universally — no country or unit system is assumed.

Rectangular prism with length, width and height labeled
A rectangular prism (cuboid) with its three dimensions: length, width and height.

How to use this calculator

Pick a calculation mode based on what you know. Length and width are always required. The third known value can be the height, the total surface area, the volume, or the space diagonal. The tool solves for the missing height and then reports every property: volume, total/lateral/top/bottom surface area and the body diagonal. Choose a unit label (or none) and how many significant figures to round to.

The formulas explained

Volume is $$V = l \cdot w \cdot h.$$ Total surface area is $$S_{tot} = 2(lw + lh + wh).$$ The four vertical side faces give the lateral area $$S_{lat} = 2h(l + w),$$ while top and bottom each equal \(l \cdot w\). The space diagonal is $$d = \sqrt{l^2 + w^2 + h^2}.$$ To recover height: from surface area, \(h = \frac{S - 2lw}{2(l + w)}\); from volume, \(h = \frac{V}{l \cdot w}\); from diagonal, \(h = \sqrt{d^2 - l^2 - w^2}\).

Advertisement
Cuboid showing space diagonal from one corner to the opposite corner
The space diagonal \(d\) connects two opposite vertices through the interior.

Worked example

With \(l = 5\), \(w = 3\), \(h = 2\): $$V = 5 \cdot 3 \cdot 2 = 30.$$ Top = bottom = \(5 \cdot 3 = 15\). Lateral = \(2 \cdot 2 \cdot (5+3) = 32\). Total = \(2 \cdot (15 + 10 + 6) = 62\), which equals \(32 + 15 + 15\). Diagonal = \(\sqrt{25 + 9 + 4} = \sqrt{38} \approx 6.16441\).

FAQ

What if my surface area gives no solution? If \(S \le 2lw\), the base alone already uses all the area, leaving no room for height — that prism cannot exist.

Why is my diagonal rejected? The space diagonal must satisfy \(d^2 > l^2 + w^2\). A shorter diagonal cannot reach across a real box with that base.

Does it convert units? No. All inputs are assumed to share one unit; outputs simply carry that label (lengths in unit, areas in unit\(^2\), volume in unit\(^3\)).

Last updated: