BedrockCalculator
Figures cited to primary sourcesWritten by Aapt Dubey, MBA (Marketing & Banking), ISB 4 primary sourcesLast updated

Volume of a Rectangular Prism Calculator (Box, Cube and Triangular Prism)

The Volume of a Rectangular Prism Calculator finds the volume of a rectangular prism, cube or triangular prism, with surface area, space diagonal and capacity in litres and US gallons. Formulas shown.

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.

Assumptions

Computed

Preset scenarios

Volume
240 cm³
Total surface area
248 cm²
Side faces only
128 cm²
Space diagonal or end area
12.3288 cm corner to opposite corner
Capacity in litres
0.24 L
Capacity in US gallons
0.0634 US gal

Rectangular tank sizes in US gallons

Download CSV
Each row is this calculator run on a box of the length, width and height shown, in inches. Gallons are US liquid gallons of 231 cubic inches, rounded to two decimal places, for the tank filled to the brim.
Length (in)Width (in)Height (in)Volume (in³)Capacity (US gal)
168101,2805.54
2010122,40010.39
2412123,45614.96
2412164,60819.95
3012124,32018.7
3012186,48028.05
3612166,91229.92
36181610,36844.88
4812169,21639.9
48132113,10456.73
48182420,73689.77
72182431,104134.65

This table and its CSV are free to reuse with a link to this page, CC BY 4.0.

Cube volume, surface and diagonal by edge

Download CSV
Each row is this calculator run on a cube with the edge in the first column. Volume and surface are exact; the space diagonal is the edge times the square root of 3, rounded to four decimal places.
EdgeVolume (unit cubed)Surface (unit squared)Space diagonal
1161.7321
28243.4641
327545.1962
464966.9282
51251508.6603
621621610.3923
734329412.1244
851238413.8564
972948615.5885
101,00060017.3205
121,72886420.7846
153,3751,35025.9808
208,0002,40034.641
2515,6253,75043.3013
50125,00015,00086.6025
1001,000,00060,000173.2051

This table and its CSV are free to reuse with a link to this page, CC BY 4.0.

Volume of a Rectangular Prism Calculator (Box, Cube and Triangular Prism): Volume 240 cm³ (Shape: Rectangular prism (box); Length (box), edge (cube) or prism length (triangular prism): 10; Width (box): 6; Height (box): 4; Length unit: Centimetres (cm)).

Save or share this result

A one-page summary of this calculator's default example, drawn from the same calculation as the result above.

The infographic is free to reuse with a link to this page, CC BY 4.0.

Illustration of plain cardboard boxes, a rounded glass tank of water plants and a wooden wedge on a pale floor
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

  1. Choose box, cube or triangular prism.
  2. 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.
  3. 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?

  1. Box volume. The product of the three edges.

V = lwh

  1. 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

  1. 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²)

  1. Cube. The box with all edges equal to s: volume s³, surface 6s², diagonal s√3.
  1. 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

  1. 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.
  1. 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.

  1. Volume: 10 × 6 × 4 = 240 cm³, which is 0.24 L.
  2. Surface: 2 × (60 + 40 + 24) = 248 cm². The four sides alone are 2 × (10 + 6) × 4 = 128 cm².
  3. 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?

A rectangle is flat, so it has an area, not a volume. The solid with rectangular faces is a rectangular prism, and its volume is length times width times height. For the area of a flat rectangle, use the rectangle area calculator.

What is the volume of a cube with 10 cm edges?

1,000 cm³, which is exactly one litre. Its surface is 600 cm² and its space diagonal 17.3205 cm.

How many cubic inches are in a cubic foot?

1,728, since a cubic foot is 12 × 12 × 12 inches. The 18 by 12 by 12 inch carton, 2,592 cubic inches, is therefore 1.5 cubic feet.

How many gallons is a 20 by 10 by 12 inch tank?

10.39 US gallons when full to the top: 2,400 cubic inches divided by 231.

What is a right prism?

A prism whose side faces are at right angles to its ends, so it stands straight up. Its volume is the end area times the height. Boxes and cubes are right prisms with rectangular ends.

How do I find the surface area of a rectangular prism?

Add the areas of the six faces: 2 × (length × width + length × height + width × height). The default box has a surface of 248 cm².

Sources

Did this calculator answer your question?

How this calculator is tested

This calculator is checked by 7 automated test cases: specific inputs whose correct result is known in advance, and rules the output must always obey. They run on every change to the site. See the testing and corrections policy.

Show the test cases
  • Default: a 10 by 6 by 4 cm box is 240 cm³
  • an 18 by 12 by 12 in carton is 2,592 in³, or 11.2208 US gallons
  • a cube with 3 cm edges is 27 cm³ with a 5.1962 cm diagonal
  • a 3-4-5 triangular prism 10 long is 60 with surface 132
  • a cube equals a box with equal edges
  • refuses a missing length and an impossible triangle
  • builds the reference tables from compute()

Add This Website as Preferred Source on Google

See Bedrock Calculator first in your Search results & AI Overviews