Skip to content
MoneyDeck

Rectangular Prism Calculator

Box volume, surface area and diagonal — with litres and gallons

Updated · Free, no signup

Volume

9,000

In cubic units of your input.

Total surface area

2,700

Space diagonal

39.0512

Corner to opposite corner through the inside.

Face diagonal (length × width)

36.0555

Face diagonal (length × height)

33.541

Face diagonal (width × height)

25

Capacity (litres)

9

Capacity (US gallons)

2.378

  • Filled to the top it holds about 9 L — 2.38 US gallons.
  • The longest rod that fits inside is 39.05 cm (the space diagonal).
  • A cube with the same volume would have 20.801 cm sides and 2,596.05 square cm of surface.

Surface area by face pair

About the Rectangular Prism Calculator

A rectangular prism (also called a cuboid or simply a box) has six rectangular faces meeting at right angles. Enter its length, width and height and this calculator returns the volume, the total surface area, the three face diagonals and the space diagonal — the longest straight line that fits inside the box, from one corner to the opposite corner.

It is built for everyday measuring jobs: working out how much water an aquarium or planter holds, how much cardboard or wrapping a box needs, whether a long item such as a pole or umbrella will fit diagonally inside a case, and for geometry homework on cuboids and cubes.

Choose the unit you measured in and the volume is also converted to litres and US gallons. The capacity figures assume inside dimensions; wall thickness reduces what a real container holds.

With the default inputs, the volume is 9,000. Change any value above to recalculate instantly.

How to use the rectangular prism calculator

  1. 1Measure the length, width and height (inside dimensions for capacity).
  2. 2Enter them and choose the unit you measured in.
  3. 3Read the volume and the capacity in litres and gallons.
  4. 4Use the surface area for paint, wrapping or material estimates.
  5. 5Check the space diagonal to see whether a long item will fit.

Formula and method

V = l·w·h · S = 2(lw + lh + wh) · d = √(l² + w² + h²)

The volume of a rectangular prism is the base area (length × width) multiplied by the height. The surface area adds up the six faces, which come in three identical pairs: top and bottom (l × w), front and back (l × h) and the two ends (w × h).

The space diagonal comes from applying the Pythagorean theorem twice: the diagonal of the base is √(l² + w²), and that forms a right triangle with the height, giving √(l² + w² + h²). Litres use 1 L = 1,000 cm³ = 0.001 m³, 1 in³ = 16.387064 mL, 1 ft³ = 28.3168 L and 1 US gallon = 3.785411784 L.

l, w, h
Length, width and height
V
Volume
S
Total surface area
d
Space diagonal

Worked examples

Storage box 30 × 20 × 15 cm

Volume = 30 × 20 × 15 = 9,000 cm³, which is exactly 9 litres. The six faces cover 2 × (600 + 450 + 300) = 2,700 cm², and the longest diagonal inside is about 39.05 cm.

55-gallon style aquarium, 48 × 13 × 21 inches

The tank measures 48 × 13 × 21 = 13,104 cubic inches. A US gallon is 231 in³, so that is about 56.7 gallons (214.7 L) before subtracting glass thickness and substrate.

Box 3 × 4 × 12 (whole-number diagonal)

The base diagonal is √(9 + 16) = 5, and combining that with the height gives √(25 + 144) = 13 — a neat 3-4-12-13 box. The volume is 144 and the surface area 192 square units.

Frequently asked questions

How do you find the volume of a rectangular prism?+

Multiply length × width × height. A box that is 30 cm long, 20 cm wide and 15 cm tall has a volume of 9,000 cm³, which is 9 litres.

What is the surface area formula for a cuboid?+

Surface area = 2(lw + lh + wh). Each of the three different rectangles appears twice, once on each side of the box.

How do I convert box volume to gallons?+

In inches, divide cubic inches by 231 to get US gallons. In centimetres, divide cubic centimetres by 1,000 for litres, then by 3.785 for US gallons. Choosing a unit here does it for you.

What is the space diagonal of a box?+

It is the straight line from one corner to the diagonally opposite corner through the inside, √(l² + w² + h²). It tells you the longest rigid item that can fit inside.

Is a cube a rectangular prism?+

Yes. A cube is a rectangular prism whose length, width and height are equal, so its volume is s³, its surface area 6s² and its space diagonal s√3.

Related tools