InfyCalculator
➗

Rectangular Prism Calculator: volume, surface area and diagonal of a box

Find the volume, total and lateral surface area, face areas, space and face diagonals and edge length of a rectangular prism (box or cuboid) from length, width and height, or work out the height from the volume, surface area or diagonal. With units, capacity in liters and gallons, and steps.

Calculate
Length
Width
Height
Volume
Total surface area
Space diagonal
Length unit
Loading calculator…

How it works

Volume V = l × w × h · Total surface area S = 2(lw + lh + wh) · Lateral area = 2h(l + w) · Space diagonal d = √(l² + w² + h²) · Face diagonals √(l² + w²), √(l² + h²), √(w² + h²) · Edge length = 4(l + w + h) · Height from V: h = V ÷ (lw) · from S: h = (S − 2lw) ÷ 2(l + w) · from d: h = √(d² − l² − w²)

A rectangular prism, also called a cuboid or simply a box, has six rectangular faces that meet at right angles. Its volume is length × width × height. The total surface area adds three pairs of identical faces: top and bottom (l × w), front and back (l × h) and the two ends (w × h). The lateral area leaves out the top and bottom, which is what you need for the walls of a room or the label around a box. The space diagonal, the longest straight line that fits inside from one corner to the opposite corner, applies the Pythagorean theorem twice: √(l² + w² + h²). The calculator can also work backwards. If you know the volume, the total surface area or the space diagonal together with the length and width, it solves for the height and then fills in everything else. Choose a length unit under More options to label the answers and to see the capacity in liters and US gallons (1 L = 1,000 cm³, 1 US gal = 231 in³ = 3.785 L). All lengths must be in the same unit; areas come out in that unit squared and volumes in that unit cubed.

Worked example

For a box 5 × 4 × 3: the volume is 5 × 4 × 3 = 60 cubic units. The surface area is 2 × (20 + 15 + 12) = 2 × 47 = 94 square units, of which the four side walls make up 2 × 3 × (5 + 4) = 54. The space diagonal is √(25 + 16 + 9) = √50 = 7.0711, the face diagonals are 6.4031, 5.831 and 5, and the 12 edges add up to 4 × (5 + 4 + 3) = 48. If the lengths are in feet, the box holds 60 ft³, which is 1,699.01 L or 448.831 US gallons.

Sources: Wikipedia: Cuboid · CalculatorSoup: Rectangular prism calculator (solve for height from S, V or d) · Omni Calculator: Rectangular prism (18 × 12 × 15 in example) · Calculator.net: Volume calculator (rectangular tank example)

Frequently asked questions

How do you find the volume of a rectangular prism?

Multiply length × width × height. A box 18 in long, 12 in wide and 15 in high holds 18 × 12 × 15 = 3,240 in³, which is 1.875 ft³ or about 53.1 liters.

How do you find the surface area of a box?

Add the areas of the three different faces and double the total: S = 2(lw + lh + wh). For the 18 × 12 × 15 in box that is 2 × (216 + 270 + 180) = 1,332 in².

What is the space diagonal used for?

It is the longest straight object that fits inside the box, corner to opposite corner, which helps you check whether a pole, rod or screen will fit in a container. For a 5 × 4 × 3 box nothing longer than about 7.07 units fits.

How do I find the height if I know the volume?

Divide the volume by the base area: h = V ÷ (l × w). A 24 ft³ box with a 4 ft × 3 ft base is 24 ÷ 12 = 2 ft high. From the surface area use h = (S − 2lw) ÷ 2(l + w), and from the diagonal h = √(d² − l² − w²).

How is a rectangular prism different from a cube?

A cube is a rectangular prism whose length, width and height are all equal. Then V = s³, S = 6s² and the diagonal is s√3. A rectangular prism lets the three dimensions differ.

Related calculators

This calculator is for educational purposes. Double-check important results before acting on them.