A rectangular prism, also called a cuboid or simply a box, has six rectangular faces that meet at right angles. Shipping cartons, rooms, aquariums, raised beds, concrete slabs and refrigerators are all rectangular prisms, so this is the solid you will measure most often. Enter the length, width and height, or enter the length and width with a volume, space diagonal or surface area and let the calculator find the missing height.
How to use the rectangular prism calculator
- In I know the, choose Length, width and height, Length, width and volume (find the height), Length, width and space diagonal (find the height) or Length, width and surface area (find the height).
- Enter the Length (l) and Width (w), then the Height (h), Volume (V) in cubic units, Space diagonal (d) from corner to opposite corner through the inside, or Surface area (S) in square units.
- Pick the Units. Use one unit for every value: 2 ft 6 in should go in as 30 in or 2.5 ft.
- Read the volume, or the height in the reverse modes. The list adds capacity in liters and US gallons, total surface area, lateral area (4 sides), the three face areas, the space diagonal and the base diagonal.
Rectangular prism formulas
Solving for the height in the reverse modes:
Worked example: the water in a 55-gallon aquarium
A standard 55-gallon tank measures about 48 × 13 × 21 in on the outside. Enter l = 48, w = 13 and h = 21 in inches.
- Volume: 48 × 13 × 21 = 13,104 in³
- Capacity: 13,104 ÷ 231 ≈ 56.73 US gal, or about 214.74 L
- Glass: the front and back panels are 1,008 in² each and the bottom is 624 in²
The tank holds less than its outside volume because of the glass thickness and the gap below the rim, and gravel and decor displace more. At about 8.34 lb per gallon, even 50 gallons of water weighs over 400 lb, so check the stand and the floor.
Working backward to a height
The volume box takes cubic units, so convert a capacity target first. For a 30-gallon tank on a 36 × 12 in footprint, 30 × 231 = 6,930 in³. Choose Length, width and volume, enter 36, 12 and 6,930, and the height comes out at about 16.04 in.
Will it fit? The space diagonal
The space diagonal is the longest straight line inside a box. Shipping a 36 in level in a 30 × 18 × 12 in carton looks impossible, because the floor diagonal is only 34.99 in. The space diagonal, though, is 36.99 in, so the level fits tilted from a bottom corner to the opposite top corner. To size a box with a 30 × 18 in base for a 40 in tripod, choose Length, width and space diagonal with d = 40: it needs to be at least 19.39 in tall. Real objects have thickness, so leave some margin.
Cubic units, gallons and liters
| Volume | Cubic inches | US gallons | Liters |
|---|---|---|---|
| 1 in³ | 1 | 0.004329 | 0.016387 |
| 1 ft³ | 1,728 | 7.4805 | 28.3168 |
| 1 yd³ | 46,656 | 201.97 | 764.55 |
| 1 US gal | 231 | 1 | 3.7854 |
| 1 L | 61.024 | 0.26417 | 1 |
| 1 m³ | 61,023.7 | 264.17 | 1,000 |
The US gallon is defined as exactly 231 in³, and the liter as exactly 1,000 cm³. Combined with the international inch of exactly 2.54 cm, that makes every figure above an exact conversion, rounded only for display.
A 12 × 10 × 8 ft room encloses 960 ft³ of air, the figure used when sizing fans or air purifiers by air changes per hour. Its walls have a lateral area of 352 ft² before you subtract doors and windows; the paint calculator takes it from there. For bulk materials, divide cubic feet by 27 to get cubic yards, or use the cubic feet to cubic yards converter. When all three sides are equal, the cube calculator is quicker.
Frequently asked questions
How do I find the volume of a rectangular prism?
Multiply length × width × height. A box 12 in long, 8 in wide and 6 in tall holds 576 in³, which is about 2.49 US gallons or 9.44 liters.
How many gallons are in a cubic foot?
A US gallon is defined as exactly 231 cubic inches, and a cubic foot is 1,728 cubic inches, so one cubic foot holds 1,728 ÷ 231 ≈ 7.48 US gallons. It is also about 28.32 liters.
How do I check whether a long object fits in a box?
Compare its length with the space diagonal, √(l² + w² + h²), the longest straight line that fits inside. A 30 × 18 × 12 in box has a space diagonal of about 36.99 in, so a thin 36 in rod fits corner to corner even though the floor diagonal is only about 34.99 in.
What is the difference between surface area and lateral area?
Surface area counts all six faces, 2(lw + lh + wh). Lateral area counts only the four sides, 2h(l + w), and leaves out the top and bottom. For a room, the lateral area is the wall area you would paint, before subtracting doors and windows.
Is a cuboid the same as a rectangular prism?
Yes. Cuboid, rectangular prism and rectangular box all describe a solid with six rectangular faces meeting at right angles. A cube is the special case where length, width and height are equal.