Cube and Cuboid Calculator

Volume, surface, and diagonal of cubes and boxes.

Math and PercentUpdated 2026-10-122 min read
Cube and Cuboid Calculator
Volume
...
Surface area...
Space diagonal...

What it does

Boxes are cubes or cuboids. A cube repeats one edge six times, while a cuboid mixes length, width, and height. Volume tells what fits inside, surface tells what wraps outside, and the space diagonal tells the longest straight rod that hides within.

The tool above covers both shapes. A 5 cm cube gives 125 cm3, 150 cm2, and an 8.66 cm diagonal. The imperial mirror at 2 in gives 8 in3, 24 in2, and 3.46 in. Flip to cuboid and an 8 by 5 by 4 cm box gives 160 cm3, 184 cm2, and a 10.25 cm diagonal, useful for shipping and storage planning.

Surface and volume scale differently. Double the edge and surface quadruples while volume grows eightfold, which is why small boxes feel light on material and large boxes drink paint. The diagonal follows Pythagoras twice: first across one face, then up through the depth.

This page assumes square corners and flat faces. It does not add wall thickness, lids, flaps, or packing fill. For a real shipment, add the box weight and the fill before quoting freight.

How to use

  1. Pick metric (cm) or imperial (in).
  2. Pick cube or cuboid shape.
  3. For cube enter one side; for cuboid enter all three edges.
  4. Read volume first, then surface.
  5. Read the space diagonal for the longest rod that fits.
  6. Switch shape to compare a cube with a box.

Formula

Cube: V = s^3, SA = 6 x s^2, diagonal = s x root(3). Cuboid: V = l x w x h, SA = 2 x (lw + lh + wh), diagonal = root(l^2 + w^2 + h^2).
s
Edge of the cube, in cm or in.
l, w, h
Length, width, height of the cuboid, in the same unit.
diagonal
Longest inside line, corner to far corner.

Box with square corners and flat faces. At any zero edge there is no solid. Cube is the special cuboid with all edges equal, so one input drives all three outputs in cube mode.

Worked example

Example: 5 cm cube

Defaults: metric cube with 5 cm sides. Imperial mirror is 2 in. Cuboid mode uses length, width, height.

  1. Inputs (metric default): cube with 5 cm sides.
  2. Volume: 5 cubed is 125 cm3.
  3. Surface: 6 times 25 is 150 cm2.
  4. Diagonal: 5 times root 3 is 8.66 cm.
  5. Imperial mirror (2 in cube) gives 8 in3, 24 in2, 3.46 in. Tool shows the same.

Reference table

Checks
BoxVolumeSurface
Cube 5 cm125 cm3150 cm2
Cube 10 cm1000 cm3600 cm2
8 by 5 by 4 cm160 cm3184 cm2
Cube 2 in8 in324 in2
3 by 2 by 2 in12 in332 in2

Limits

  • Square corners only. Rounded cases need other math.
  • Thin wall assumed. Real boxes have thickness and flaps.
  • Outside area only. Seams and waste are extra.
  • One box at a time. Pallets need stacking math.

Common mistakes

  • Mixing side units with height units.
  • Using face diagonal as space diagonal.
  • Pricing paint from surface without coats or waste.
  • Reading volume when the job needs surface.
  • Entering diameter or girth as edge length.

Try it yourself

Quick checks. Answers sit tucked under each question.

Cuboid 8 by 5 by 4 cm?

Volume is 8 times 5 times 4 is 160 cm3. Surface is 2 times (40 plus 32 plus 20) is 184 cm2. Diagonal is root 105 is 10.25 cm.

Cube with 10 cm sides?

Volume is 1000 cm3. Surface is 600 cm2. Diagonal is 10 times root 3 is 17.32 cm.

Questions

What are the cube formulas?

Cube: V = s cubed, SA = 6 s squared. Here 125 cm3 and 150 cm2.

What are the cuboid formulas?

Cuboid: V = l w h, SA = 2(lw plus lh plus wh). A 8 by 5 by 4 box gives 160 cm3 and 184 cm2.

How is the space diagonal figured?

Cube: s times root 3. Cuboid: root of l squared plus w squared plus h squared. Here 8.66 cm.

Can I do a shipping box?

Yes. Pick cuboid and enter the three edges. The same three outputs update.

Is this the paint to buy?

No. Surface here is outside area. Sheet or paint needs extra for seams, waste, and coats.

What happens if I double the edge?

Volume cubes with edge, surface squares. Double the edge and volume grows eightfold.

Sources

How this page was checked. The formula above was matched against the cited sources, and the worked example was run through the tool on this page before publishing. If you spot an error, contact us so we can fix it and note the correction.