HomeMath › Volume of a Rectangular Prism Calculator

Volume of a Rectangular Prism Calculator

Multiply length × width × height to get the volume of any box shape. Enter all three dimensions in one unit — inches, feet, centimeters, or meters — and get cubic volume, the liquid equivalent in gallons and liters, surface area, and the space diagonal.

Example: with Length 8 · Width 4 · Height 5 · Unit feet → Volume (l × w × h): 160 ft³.

  • Holds (liquid)≈ 1,196.9 gal (4,530.7 L)
  • Surface area 2(lw + lh + wh)184 ft²
  • Space diagonal √(l² + w² + h²)10.247 ft

Computed by the calculator below using its default values. Change any input to see your own numbers.

Volume (l × w × h)
Holds (liquid)
Surface area 2(lw + lh + wh)
Space diagonal √(l² + w² + h²)

V = l × w × h. The gallon/liter conversion uses exact NIST factors (231 in³ = 1 gal; 1 in = 2.54 cm exactly).

The most-used volume formula there is

A rectangular prism — a box — has the simplest volume formula in geometry: multiply the three edge lengths. V = l × w × h works because volume literally counts unit cubes: an 8 × 4 ft base holds 32 one-foot squares, and stacking that layer 5 high gives 160 cubic feet. Every dimension must be in the same unit before you multiply; that is where most real-world errors happen.

The liquid conversion answers the question people usually have next: what does that hold? A 20 × 10 × 12 inch aquarium works out to 2,400 cubic inches, and dividing by the exact 231 cubic inches per US gallon gives 10.4 gallons — which is exactly why that tank is sold as a "10-gallon". For shipping, the space diagonal tells you the longest rigid item that fits inside the box.

How it’s calculated

V = l × w × h. Surface area = 2(lw + lh + wh); space diagonal = √(l² + w² + h²). Liquid conversions: 1 gal = 231 in³ exactly, so 1 ft³ = 7.480519 gal; 1 in³ = 16.387064 mL exactly (2.54³); 1 ft³ = 28.316847 L; 1 m³ = 1,000 L = 264.172 gal; 1 cm³ = 1 mL.

Right rectangular prisms with square corners, measured inside for capacity. Wall thickness reduces real liquid capacity below the outside-dimension number.

Everyday rectangular prisms

ObjectDimensionsVolumeHolds
10-gallon aquarium20 × 10 × 12 in2,400 in³10.4 gal
Medium moving box18 × 18 × 16 in5,184 in³3.0 ft³
Concrete footing2 × 2 × 1 ft4 ft³29.9 gal
Bedroom (air volume)12 × 10 × 8 ft960 ft³7,181 gal

Computed with V = lwh; gallons at 231 in³/gal (7.48052 gal/ft³), rounded.

Common mistakes

  • Mixing units — a 6 ft × 4 ft × 6 in slab is 6 × 4 × 0.5 = 12 ft³, not 144. Convert everything to one unit first.
  • Confusing volume with surface area: an 8×4×5 box has 160 ft³ of space but 184 ft² of faces — different numbers, different units.
  • Using outside dimensions for capacity; tank walls and box flaps eat into the usable interior volume.
  • Reporting cubic feet when the order form wants cubic yards — divide ft³ by 27, not by 3.

Frequently asked questions

What is the volume of a rectangular prism?

V = length × width × height, with all three in the same unit. An 8 × 4 × 5 ft box is 160 cubic feet. The result is in cubic units of whatever you measured in.

How do I convert the volume to gallons?

From cubic inches divide by 231 (exact US definition); from cubic feet multiply by 7.48. The 160 ft³ default holds about 1,197 gallons.

Is a cube a rectangular prism?

Yes — a cube is the special case where l = w = h. A 10 cm cube is 1,000 cm³, which is exactly 1 liter; that is how the liter is defined.

Volume vs surface area — which do I need?

Volume (cubic units) measures what fits inside: water, soil, air. Surface area (square units) measures the faces themselves: paint, wrapping, sheet metal. This page reports both so you can grab the right one.

What is the space diagonal for?

√(l² + w² + h²) is the longest straight line inside the box, corner to opposite corner. It tells you whether a rigid item — a rod, a bat, a curtain pole — can fit diagonally in a container.