Cube and Cuboid Volume and Surface Area Calculator
A cuboid (also called a rectangular prism or rectangular box) — six rectangular faces, like a box — is worked out from its 3 dimensions: length, width and height. A cube is simply a special case of cuboid — all 3 dimensions equal — so the same formula applies without any change.
Enter these 3 dimensions: the calculator returns the volume, the total surface area (all 6 faces), and the diagonal of the solid.
Dimensions
Technical terms marked * are unpacked in the glossary at the end.
A cube is a cuboid with L = W = H
UK school geometry says cuboid*. US classroom talk more often says rectangular box or rectangular prism. Same solid: six rectangular faces, every corner a right angle. Three edges do the work — length, width, height. A cube* is that box on the day the three edges match. There is no separate page, no “cube mode”. The same three fields, the same three numbers, and the calculator flags the special case.
Set a = L = W = H and the formulae collapse: V = a³, S = 6a², space diagonal a√3. School books often split the two because a cube is quicker to sketch. The general case already contains it. The other way round is not “almost a cube”: one edge different, and the faces stop being squares, the face diagonals stop matching, and the box no longer looks the same from every side. One family. Two shapes.
Volume as a product; surface as twice three rectangles
Volume is the product of the three edges. Surface is twice the sum of the three distinct face areas — front-and-back, top-and-bottom, the two ends.
No π, no one-third, no slant. That is why a packing crate is the first solid most people can size without a formula sheet. The price of that simplicity is unit hygiene: ℓ, w and h must speak the same language before they multiply. A cylinder or a sphere hides the same demand inside π; a box makes it obvious.
Space diagonal: Pythagoras applied twice
The space diagonal* runs from one corner through the interior to the opposite corner. It cannot be read off a single face. Pythagoras, twice.
- On the base, the face diagonal is √(ℓ² + w²).
- That segment and the height make a second right triangle. The space diagonal is then √(ℓ² + w² + h²).
d = √(ℓ² + w² + h²)
On a cube of edge a that shrinks to a√3. The face diagonal stays a√2 — shorter, because it never climbs. A broom handle, a copper pipe, anything that must slide into a box on the slant: compare its length with d, not with ℓ. A 1.18 m handle does squeeze into a 1 m × 0.50 m × 0.40 m crate, because √(1² + 0.50² + 0.40²) ≈ 1.19 m. Barely. Pythagoras wants right angles. Once the solid is no longer a cuboid, that square root stops telling the truth.
Recovering a missing edge from a known capacity
Volume known, two edges known, third edge wanted. Divide.
h = V / (ℓ × w) ; ℓ = V / (w × h) ; w = V / (ℓ × h)
A tank of 1,200 L (1.2 m³), 2 m long and 1 m wide: the water can stand at most 1.2 / (2 × 1) = 0.6 m. A 48 L crate on a 40 cm × 30 cm base: convert first (48 L = 0.048 m³, 0.40 m × 0.30 m), then h = 0.048 / 0.12 = 0.40 m, so 40 cm. Skip the unit change and the result lands on 4 mm or 40 m — the sort of answer that already feels wrong.
Surface area does not invert as neatly. Given S and two edges, the third still solves a linear equation, but it is fiddly. Volume is the short road. A zero in the denominator means the box has already gone flat; there is no missing height to find.
Cuboid versus a sheared parallelepiped
Every cuboid is a parallelepiped*. The converse is false. A general parallelepiped still has three pairs of parallelogram faces, but the edges no longer meet at 90°. Nudge a stack of paperbacks and the picture is there: the volume is no longer ℓ × w × h.
Volume of a parallelepiped is base area times the perpendicular height onto that base, not the length of the leaning edge. In vectors, V = |a · (b × c)|. The formulae on this page assume pairwise perpendicular edges. A rhombohedron, a crushed crate, a crystal — out of scope.
Surface area and the space diagonal go the same way. Six rectangles unfolding, the root √(ℓ² + w² + h²): both live on the right angle. An oblique solid needs other tools. This page stays with the cuboid, which is what almost every room, cardboard box and rectangular tank actually is.
Room, crate, rectangular tank
A removal carton 60 × 40 × 40 cm: V = 0.60 × 0.40 × 0.40 = 0.096 m³, so 96 L. That is a better description of what fits — books, bedding — than “large box” on the side panel. The 1.28 m² of surface matters more when taping or costing the cardboard.
A room 5 × 4 m with a 2.5 m ceiling holds 50 m³ of air. Useful for a ventilation rate or a stove. It is not the paint area. The walls are 2 × (5 + 4) × 2.5 = 45 m², plus 20 m² if the ceiling is included, minus the windows. Volume and area are two different jobs. Tank, aquarium, resin bath: volume is capacity, once the litre is reached. A 2 × 1 × 0.80 m trough is 1.6 m³, 1,600 L. Wetted area, if the tank is not full, is not the total surface: drop the lid, and count the walls only up to the waterline.
Worked case: 4 × 3 × 2
Take 4, 3 and 2 in the same unit. Metres, to keep the picture honest.
V = 4 × 3 × 2 = 24 m³
S = 2 × (4×3 + 4×2 + 3×2) = 2 × 26 = 52 m²
d = √(16 + 9 + 4) = √29 ≈ 5.385 m
Six faces: two of 12 m², two of 8, two of 6. They add to 52. A 3 m cube would have given V = 27 m³ and S = 54 m², with diagonal 3√3 ≈ 5.196 m. A bit dumpier. The 4 × 3 × 2 box is longer, flatter, and its space diagonal is longer too. The same three numbers in centimetres: 24 cm³, 52 cm², d ≈ 5.385 cm. The algebra does not move. Only the unit travels.
Litres, cubic metres, and the imperial gallon
A solid’s volume and a liquid’s capacity are the same quantity. The bridge is the litre.
1 m³ = 1,000 L ; 1 L = 1,000 cm³ = 1 dm³
The 4 × 3 × 2 m box above is 24,000 L — not a parcel. A 40 × 30 × 20 cm crate is 24,000 cm³, so 24 L, more like a bottle box. The usual trap is multiplying centimetres and treating the product as litres already. 40 × 30 × 20 = 24,000, not 24. A further ÷ 1,000 (cm³ → L) is still required, or a pass through the decimetre.
UK gallons sit to one side: 1 imperial gallon ≈ 4.546 L, so 1 m³ ≈ 220 gallons. Fine for a water butt. For the arithmetic, stay in litres or cubic metres until the last line. Mixing gallons with centimetres in the middle of a product is how a tank becomes a thimble on paper.
Lateral area, wrapping paper, and the net
Total surface is all six faces. Lateral area is the four upright faces, no lid, no floor. For a cuboid that is 2h(ℓ + w). Painting a room is lateral work. Wrapping a present is the total — plus overlap.
The net* is the same sum laid flat: six rectangles, edge to edge, no overlap. Its area equals S. Real wrapping paper needs flaps, so the roll that is cut is a little more than S. This calculator reports the geometric area, not the sheet to buy. A cube’s net is six squares; the wrong face cannot be picked. On a cuboid, stick the small rectangle where the large one belongs and the box will not close. Sketch before cutting.
One unit for all three edges
ℓ × w × h is nonsense until the three speak the same language. 2 m × 50 cm × 30 cm is not 3,000 of anything. It is 2 × 0.50 × 0.30 = 0.30 m³, or 200 × 50 × 30 = 300,000 cm³ — one volume, two spellings. On this page the unit selector is only a label: nothing is converted, so the three edges go in the same unit. By hand, pick a base (the metre, the centimetre) and bring every edge into it before multiplying. The answer then comes in that unit cubed. The diagonal comes in that unit, full stop.
Put another way, the same hygiene runs through the rest of solid geometry: cylinder, cone, sphere, square pyramid. Different formulae. Same demand that every length already share a unit.
Glossary
- Cuboid
- A rectangular box: six rectangular faces, all corners right angles. Also called a rectangular prism or rectangular box, especially in US usage. Volume ℓwh; total surface 2(ℓw + ℓh + wh).
- Cube
- The special cuboid in which length, width and height are equal. Volume a³, surface 6a², space diagonal a√3. Not a separate solid on this site: the same three fields, three equal numbers.
- Space diagonal
- The segment from one corner of the box through the interior to the opposite corner, √(ℓ² + w² + h²). Distinct from a face diagonal, which stays on one rectangle and omits the third square.
- Parallelepiped
- A solid with three pairs of parallelogram faces. A cuboid is the right-angled case. Once the edges lean, volume is base area times perpendicular height, not ℓwh.
- Net
- The six faces unfolded into the plane, edge to edge, without overlap. Its area equals the total surface. Wrapping paper needs extra for flaps; the net does not include that allowance.