Quick Answer: The volume of a rectangular prism is length × width × height, so a box 10 cm by 6 cm by 4 cm holds 240 cm³, which is 0.24 litres. A cube is the same with all three edges equal.
What does this calculator do?
This calculator finds the volume of a rectangular prism, the solid most people just call a box, along with its total surface area, the area of its four sides, the length of its space diagonal and its capacity in litres and US gallons.
The same page handles a cube, which is a box with equal edges, and a right triangular prism, a solid whose two ends are matching triangles joined by three rectangles, like a tent or a wedge.
All prisms share one idea: a flat shape carried straight along a length. The volume is the area of the end times that length. For a box the end is a rectangle, width times height, so the volume is length times width times height. For a triangular prism the end is a triangle, and the calculator works out its area from the three sides.
Lengths can be in any unit, all in the same one. Volume comes back in that unit cubed and areas in that unit squared, and for millimetres, centimetres, metres, inches, feet and yards the volume is also converted to litres and US gallons. Results are rounded to four decimal places for display.
Using the Volume of a Rectangular Prism Calculator
- Choose box, cube or triangular prism.
- For a box, enter the length, width and height. For a cube, enter the edge in the first box. For a triangular prism, enter its length in the first box and the three sides of its triangular end in the triangle boxes.
- Pick the unit.
The cards give the total surface area, the side faces alone, the space diagonal (or for a triangular prism, the area of each end), and the capacity. The presets load an 18 by 12 by 12 inch shipping carton, a cube with 3 cm edges and a triangular prism with 3-4-5 ends, 10 long. Two tables below the calculator list rectangular tank sizes in gallons and the volume, surface and diagonal of cubes from 1 to 100.
How is this calculated?
- Box volume. The product of the three edges.
V = lwh
- Box surface. Six faces in three matching pairs. The side faces alone are the four around the height, which is the perimeter of the base times the height.
S = 2(lw + lh + wh); S_sides = 2(l + w)h
- Space diagonal. The straight line from one corner to the opposite one, through the inside, by the Pythagorean theorem applied twice.
d = √(l² + w² + h²)
- Cube. The box with all edges equal to s: volume s³, surface 6s², diagonal s√3.
- Triangular prism. The calculator checks that the three sides can form a triangle, finds the end area B by Heron's formula and the end perimeter p by adding the sides, then multiplies by the prism length L. The surface is the two triangular ends plus the three rectangles, whose widths add up to the perimeter.
V = BL; S = 2B + pL
- Capacity. For units with a cubic form in the unit tables, the volume is converted to litres and to US liquid gallons of exactly 231 cubic inches.
- Round for display to four decimal places, half up.
Worked Example
The default is a box 10 cm long, 6 cm wide and 4 cm high.
- Volume: 10 × 6 × 4 = 240 cm³, which is 0.24 L.
- Surface: 2 × (60 + 40 + 24) = 248 cm². The four sides alone are 2 × (10 + 6) × 4 = 128 cm².
- Space diagonal: the square root of 100 + 36 + 16 = 152, 12.3288 cm. That is the longest thin rod that fits inside.
An 18 by 12 by 12 inch carton holds 2,592 in³, which is exactly 1.5 cubic feet, 11.2208 US gallons or 42.4753 L. Wrapping it takes 1,152 in² of paper with no overlap.
A cube with 3 cm edges holds 27 cm³, has a surface of 54 cm² and a space diagonal of 5.1962 cm.
A triangular prism with 3-4-5 ends and a length of 10 has an end area of 6 by Heron's formula and an end perimeter of 12. Its volume is 6 × 10 = 60 and its surface is 2 × 6 + 12 × 10 = 132.
How Do You Find the Volume of a Box?
Multiply its length, width and height. It does not matter which edge you call which, since multiplication gives the same answer in any order. For something that holds water or soil, measure inside the walls.
The tank table below the calculator shows how quickly volume grows: a 20 by 10 by 12 inch tank holds 10.39 gallons, while a 48 by 18 by 24 inch tank holds 89.77, more than eight times as much.
What Is the Volume Formula for a Triangular Prism?
The area of the triangular end times the length of the prism, V = BL. If you know the triangle's base and height, B is half their product. If you know its three sides, use Heron's formula, which is what this calculator does.
The same rule, end area times length, is the volume of a right prism of any cross-section, which is why it is often written V = Bh with h for the prism's height.
What Is the Surface Area Formula for a Triangular Prism?
Twice the end area plus the perimeter of the end times the length, S = 2B + pL. The three side faces are rectangles, each one prism-length long and as wide as one side of the triangle. Add their widths and you get the triangle's perimeter.
What does this calculator not account for?
- Wall thickness. The calculator works on one set of dimensions. For the capacity of a container, enter the inside measurements.
- Oblique prisms. A prism that leans has the same volume as an upright one with the same base and perpendicular height, but a different surface area. The surface figures here are for right prisms only.
- Filling to the brim. Tank capacities assume the water reaches the top edge. Real aquariums are filled lower and lose volume to gravel and decorations.
- Other cross-sections. Trapezoidal prisms have their own calculator. A cylinder is a prism with a circular end.
- Imperial gallons. Gallons here are US liquid gallons.
What mistakes do people make with this?
- Adding instead of multiplying. Length + width + height is not a volume.
- Mixing units. A box 2 ft by 18 in by 6 in must be put into one unit before multiplying.
- Confusing surface area and volume. Surface area is the cardboard; volume is what fits inside. They are in different units.
- Using the slanted side as the triangle's height. In a triangular prism, the end area needs the perpendicular height of the triangle, or all three sides.
- Treating the space diagonal as the face diagonal. The diagonal across one face is shorter than the one through the inside.
Frequently Asked Questions
How do I find the volume of a rectangle?
What is the volume of a cube with 10 cm edges?
How many cubic inches are in a cubic foot?
How many gallons is a 20 by 10 by 12 inch tank?
What is a right prism?
How do I find the surface area of a rectangular prism?
Sources
- OpenStax, Prealgebra 2e, §9.6 Solve Geometry Applications: Volume and Surface Area (rectangular solid V = LWH, S = 2LH + 2LW + 2WH). openstax.org/books/prealgebra-2e/pages/9-6-solve-geometry-applications-volume-and-surface-area
- OpenStax, Contemporary Mathematics, §10.7 Volume and Surface Area (right prism V = Bh, SA = 2B + ph). openstax.org/books/contemporary-mathematics/pages/10-7-volume-and-surface-area
- NIST Handbook 44, Appendix C, General Tables of Units of Measurement: the US gallon of 231 cubic inches, the litre and the cubic foot. nist.gov/pml/owm/nist-handbook-44-current-edition
- OpenStax, Algebra and Trigonometry 2e, §10.2 Non-right Triangles: Law of Cosines (Heron's formula for the triangular end). openstax.org/books/algebra-and-trigonometry-2e/pages/10-2-non-right-triangles-law-of-cosines

