Surface Area and Diagonal of a Cuboid

Calculates the surface area of a cuboid as 2 × (depth×width + width×height + height×depth): three pairs of matching faces. The space diagonal is also shown.

A cuboid has six faces, and opposite faces are identical rectangles. So you need the areas of only three different faces, each counted twice.

S=2(ab+bc+ca)S = 2(ab + bc + ca)

The line joining the two most distant corners, the space diagonal, comes from applying the Pythagorean theorem twice.

d=a2+b2+c2d = \sqrt{a^2 + b^2 + c^2}

Example

With the defaults, a=4a = 4, b=5b = 5 and c=6c = 6:

Watch out

Surface area is a sum of face areas, so its unit is a length squared (cm²), not a length cubed like the volume (cm³). Forgetting the factor of 2 and stopping at ab+bc+caab + bc + ca halves the answer. The diagonal reported here is the space diagonal, the one running through the inside of the solid, not a diagonal drawn on a single face. All three edges must be positive.