The formula

Multiply the
three sides.

The volume of a rectangular box is the product of its length, width, and height — provided all three are in the same unit. That's the whole story.

Why it works.

A rectangular box (also called a cuboid or rectangular prism) is built from a base of area l × w stacked to a height of h. Picture a stack of identical paper sheets: each sheet has area length × width, and you stack h sheets to fill the box.

The total enclosed space — the volume — is therefore (l × w) × h, which is the same as l × w × h.

The result is always in cubic units — cubic centimeters, cubic inches, cubic meters — because you've multiplied three lengths together.

The three formulas
V = l × w × h

Surface area
A = 2(lw + lh + wh)
Space diagonal
d = √(l² + w² + h²)
Worked examples

Try the math by hand.

Watch the substitution, step by step

Type three numbers below and the formula will substitute them one symbol at a time. This is how to think about it on paper.

Step 1. Start with the formula:
V = L × W × H
Step 2. Substitute the length:
V = 30 × W × H
Step 3. Substitute the width:
V = 30 × 20 × H
Step 4. Substitute the height:
V = 30 × 20 × 15
Step 5. Multiply length × width:
V = 600 × 15
Step 6. Multiply by height:
V = 9,000

1 · A shoebox

A shoebox is 30 cm long, 20 cm wide, and 15 cm high.

V = 30 × 20 × 15
V = 9,000 cm³
V = 9 liters

2 · An aquarium

A tank measures 90 cm × 45 cm × 50 cm.

V = 90 × 45 × 50
V = 202,500 cm³
V ≈ 53.5 US gallons

3 · A shipping box

A package is 18 in × 12 in × 10 in.

V = 18 × 12 × 10
V = 2,160 in³
V = 1.25 ft³

4 · Mixed units

A crate is 2 ft × 50 cm × 18 in. Convert all to cm first.

2 ft = 60.96 cm
18 in = 45.72 cm
V = 60.96 × 50 × 45.72
V ≈ 139,374 cm³
Quick reference

Volume unit conversions.

From To Multiply by
1 m³cm³1,000,000
1 m³liters1,000
1 m³ft³35.3147
1 m³US gallons264.172
1 ft³in³1,728
1 ft³liters28.3168
1 ft³US gallons7.4805
1 litercm³1,000
1 literUS gallons0.2642
1 US gallonUK gallons0.8327
Related reading

From the blog.

Article
Volume of a Rectangular Prism →
Article
The Box Diagonal Formula →
Article
Surface Area vs Volume →