Geometry
How To Calculate The Volume Of A Rectangular Prism
Volume of a rectangular prism is length times width times height. Nearly every error on this page comes from somewhere else: mismatched units, external instead of internal measurements, or a cubic answer read as a liquid one.
Quick Answer
V = l x w x h
- l
- Length — one edge of the base, in the chosen unit
- w
- Width — the other edge of the base, in the same unit
- h
- Height — how far the solid rises, in the same unit
- V
- Volume in cubic units; divide by 1000 to reach litres
Multiply the three edge lengths, all expressed in the same unit. A box measuring 40 x 30 x 20 centimetres holds 40 x 30 x 20 = 24000 cubic centimetres, which is 24 litres or 6.34012926 US gallons, and its total surface area is 2 x (1200 + 800 + 600) = 5200 square centimetres. The order of the three multiplications makes no difference, so take them in whatever sequence is easiest. What does make a difference is scaling: doubling one dimension doubles the volume, doubling two multiplies it by four, and doubling all three — 80 x 60 x 40 — gives 192000 cubic centimetres, eight times the original rather than twice.
What Is The Volume Of A Rectangular Prism?
A rectangular prism, also called a cuboid, is the solid bounded by six rectangular faces meeting at right angles: twelve edges, eight corners, and three independent measurements rather than one. A shoebox, a brick, a fish tank and a shipping crate are all cuboids, which is why this one formula does so much practical work. A cube is the special case where all three measurements agree, so its volume is the edge length cubed. Nothing about the general case is harder; you simply have three numbers to keep track of instead of one, and the whole skill lies in making sure they describe the same solid in the same unit.
The multiplication itself has a physical meaning worth holding on to, because it explains why the answer is cubic. Imagine filling the base with unit cubes: 40 along the length and 30 along the width lays down 1200 of them in a single layer. That layer is one unit tall, so stacking twenty such layers reaches the full height and uses 1200 x 20 = 24000 cubes. Volume is therefore counting, not abstract algebra, and the unit of the answer is the unit cube — cubic centimetres when the measurements were in centimetres.
Because the operation is pure multiplication, the order is arbitrary. Length times width times height, height times length times width, or width times height times length all produce 24000 for the 40 x 30 x 20 box, and the same is true of the grouping: multiplying the first two and then the third gives the same result as multiplying the last two first. This is genuinely useful in practice, because you can combine whichever pair produces a round intermediate number and reduce the chance of a slip.
Units carry the cube, which is where careless work tends to break. Measurements in centimetres give cubic centimetres, measurements in metres give cubic metres, and the two are not related by a factor of 100. Since a metre is 100 centimetres, a cubic metre contains 100 x 100 x 100 = 1000000 cubic centimetres. The conversion factor is cubed along with the unit. Converting before you multiply is almost always simpler than converting afterwards, precisely because it avoids having to remember that rule at the point where it applies.
Capacity units are the reason most people run this calculation at all, and the bridge from cubic centimetres is short: one litre is one cubic decimetre, so one litre is exactly 1000 cubic centimetres. The 24000 cubic centimetre box therefore holds 24000 / 1000 = 24 litres. That division by a thousand is the entire conversion, and it is a shift of the decimal point rather than a fresh calculation, which is why metric capacity is so much less error-prone than the alternatives.
US gallons need a genuine factor, not a decimal shift. One US liquid gallon is 3.785411784 litres, or 3785.411784 cubic centimetres, so the same 24000 cubic centimetre box holds 24000 / 3785.411784 = 6.34012926 US gallons. The Imperial gallon is a different unit again at 4.54609 litres, roughly twenty percent larger, so it produces a noticeably smaller count for the same physical box. Establish which gallon a label means before dividing, because that choice changes the answer far more than any rounding decision ever will.
Surface area is a different quantity that people reach for in the same breath, and it must not be confused with volume. It is the sum of the six face areas, which pair up into three equal couples, giving 2(lw + lh + wh). For the 40 x 30 x 20 box the three distinct faces are 1200, 800 and 600 square centimetres, summing to 2600 and doubling to 5200 square centimetres. Volume governs how much the box holds; surface area governs how much material covers it, how fast it heats or cools, and how much wrapping paper it consumes. Neither determines the other.
Scaling is the intuition that separates people who understand the formula from people who merely apply it. Multiplying a length by a factor scales one dimension, so the volume scales by that factor once: 2, in the doubling case. Two dimensions doubled give 2 x 2 = 4. All three doubled give 2 x 2 x 2 = 8, which is why 80 x 60 x 40 comes to 192000 cubic centimetres against the original 24000. The same rule tells you that halving every dimension leaves an eighth of the volume, a fact that surprises people sizing down packaging or storage.
Two habits close the subject. Measure the inside of a container when you want capacity and the outside when you want clearance, and never mix the two in one calculation; a quoted dimension that ignores wall thickness overstates what the box actually holds. Then keep every measurement in one unit, carry the unrounded product through any further conversion, and round once at the very end to a precision the original measurement can defend. Most wrong answers on this page are right multiplications applied to the wrong three numbers.
Formula
V = l x w x h
Multiply the three measurements, all in the same unit. The result is in that unit cubed: centimetres give cubic centimetres.
| Symbol | Meaning | Unit | Notes |
|---|---|---|---|
| l | Length of the base | length | One edge of the footprint. Any of the three edges may be called the length. |
| w | Width of the base | length | The other edge of the footprint. Must be in the same unit as length and height. |
| h | Height of the solid | length | How far the prism rises above the base. Doubling it alone doubles the volume. |
SA = 2(lw + lh + wh)
The six faces pair into three equal couples, so add the three distinct face areas and double. Measured in square units, not cubic ones.
| Symbol | Meaning | Unit | Notes |
|---|---|---|---|
| SA | Total surface area of all six faces | square units | 5200 square centimetres for the 40 x 30 x 20 box. Governs material and wrapping, not capacity. |
| lw + lh + wh | Sum of the three distinct face areas | square units | 1200 + 800 + 600 = 2600 square centimetres before doubling. |
h = V / (l x w)
Divide the known volume by the area of the known base. The same rearrangement finds length or width if either is the unknown instead.
| Symbol | Meaning | Unit | Notes |
|---|---|---|---|
| V | Known volume | cubic units | Must be in cubic units matching those of the two known edges. |
| l x w | Area of the known base | square units | 1200 square centimetres when length is 40 and width is 30. |
| h | The unknown third dimension | length | 24000 divided by 1200 gives 20, recovering the original height exactly. |
How To Calculate The Volume Of A Rectangular Prism
- 1
Decide whether you need inside or outside measurements
Capacity questions need internal dimensions; clearance and packing questions need external ones. The 40 x 30 x 20 box only holds 24000 cubic centimetres if those figures are the clear space inside it, because walls, lids and internal fittings all eat into what actually fits. Decide this before measuring, since re-measuring afterwards is far more work than choosing correctly at the start.
- 2
Express all three measurements in the same unit
Length, width and height must share a unit before any multiplication happens. A box quoted as 40 centimetres by 300 millimetres by 0.2 metres is a 40 x 30 x 20 centimetre box, and only in that form does the product mean anything. Converting first is safer than converting the cubic answer, because unit conversions for volume apply the factor three times over.
- 3
Multiply length by width to get the footprint, then by height
The footprint is 40 x 30 = 1200 square centimetres, and raising that layer twenty times gives 1200 x 20 = 24000 cubic centimetres. Splitting the work this way keeps the intermediate number small enough to check by eye, and it makes the counting interpretation of volume obvious.
- 4
Convert to litres or gallons if capacity is what you need
Divide cubic centimetres by 1000 for litres: 24000 / 1000 = 24. Divide by 3785.411784 for US gallons: 24000 / 3785.411784 = 6.34012926. Keep the unrounded value if anything downstream uses it, and remember that an Imperial gallon of 4.54609 litres gives a different count for the same box.
- 5
Compute surface area separately, and round once at the end
Add the three distinct face areas and double: 2 x (1200 + 800 + 600) = 5200 square centimetres. Never report that figure as a volume, and never report the volume as an area. Round the final displayed numbers to a precision the original measurements can support, rather than rounding at each stage and letting the error accumulate.
Examples
Example 1: A 40 x 30 x 20 cm storage box
- Length
- 40 cm
- Width
- 30 cm
- Height
- 20 cm
| Step | Calculation | Result |
|---|---|---|
| Footprint of the base | 40 x 30 | 1200 |
| Volume in cubic centimetres | 1200 x 20 | 24000 |
| Capacity in litres | 24000 / 1000 | 24 |
| Capacity in US gallons | 24000 / 3785.411784 | 6.34012926 |
| Total surface area | 2 x (1200 + 800 + 600) | 5200 |
Result: 24000 cubic centimetres, which is 24 litres or 6.34012926 US gallons, with a total surface area of 5200 square centimetres.
Example 2: A 60 x 30 x 35 cm aquarium in litres
- Length
- 60 cm
- Width
- 30 cm
- Height
- 35 cm
| Step | Calculation | Result |
|---|---|---|
| Footprint of the base | 60 x 30 | 1800 |
| Volume in cubic centimetres | 1800 x 35 | 63000 |
| Capacity in US gallons | 63000 / 3785.411784 | 16.6428393 |
| Capacity in litres | 63000 / 1000 | 63 |
Result: 63 litres, or 16.6428393 US gallons — a 63000 cubic centimetre tank rated at 63 litres on the label.
Example 3: Doubling every dimension of the same box
- Original
- 40 x 30 x 20 cm
- Doubled
- 80 x 60 x 40 cm
| Step | Calculation | Result |
|---|---|---|
| Volume of the original box | 40 x 30 x 20 | 24000 |
| Volume once each dimension is doubled | 80 x 60 x 40 | 192000 |
| How many times larger | 192000 / 24000 | 8 |
| Capacity after doubling, in litres | 192000 / 1000 | 192 |
Result: 192000 cubic centimetres — eight times the original 24000, not twice — which is 192 litres and 50.72103405 US gallons.
Calculator
Volume in cubic centimetres
24,000
- Capacity in litres
- 24
- Total surface area in square centimetres
- 5,200
- Capacity in US gallons
- 6.3401
Values update as you type. This calculator covers the single scenario its formula assumes — see Common Mistakes for what it leaves out.
Prefer a full-width tool? Open the The Volume Of A Rectangular Prism calculator page.
Common Mistakes
Measuring the three dimensions in three different units
Length in centimetres, width in millimetres and height in metres produces a product with no meaning at all. Put all three into one unit before multiplying. Converting the cubic answer afterwards is the harder route, because a volume conversion applies the factor three times: a cubic metre holds 1000000 cubic centimetres, not 100.
Reporting the surface area as if it were the volume
The 40 x 30 x 20 box has a volume of 24000 cubic centimetres and a surface area of 5200 square centimetres. They answer different questions — how much fits inside against how much material covers the outside — and they are not even in the same kind of unit. A result quoted in square units cannot be a volume.
Using external dimensions and forgetting wall thickness
A crate quoted at 40 x 30 x 20 on the outside does not hold 24000 cubic centimetres, because the walls, the base and the lid all occupy space that contents cannot use. Measure the internal clear space when the question is capacity, and treat any manufacturer dimension as external until it says otherwise.
Reading cubic centimetres straight off as litres
One litre is 1000 cubic centimetres, so 24000 cubic centimetres is 24 litres and not 24000 litres. The division by a thousand is a decimal shift rather than a real calculation, which makes it easy to skip and catastrophic to skip. US gallons need the further division by 3785.411784, giving 6.34012926 rather than 24.
Assuming that doubling the dimensions doubles the volume
Doubling one dimension doubles the volume; doubling two multiplies it by four; doubling all three multiplies it by eight. That is why 80 x 60 x 40 gives 192000 cubic centimetres against 24000 for the original, a factor of 8 rather than 2. Scaling a box up is far more consequential than the change in its measurements suggests.
FAQ
Does it matter which dimension I call length, width or height?
No. The formula is pure multiplication, so any ordering gives the same product: 40 x 30 x 20 and 20 x 40 x 30 both reach 24000. What matters is that all three describe the same solid, in the same unit, measured in the same sense — all internal or all external.
How do I turn cubic centimetres into litres?
Divide by 1000, because one litre is one cubic decimetre and therefore 1000 cubic centimetres. A volume of 24000 cubic centimetres is 24 litres. For US gallons, divide instead by 3785.411784, which gives 6.34012926 US gallons for the same box.
What happens to the volume if I double every dimension?
It grows by a factor of eight, not two. Each dimension contributes one factor of two, and 2 x 2 x 2 is 8, so the box goes from 24000 cubic centimetres to 192000. Doubling only one dimension doubles the volume, and doubling two of them multiplies it by four.
Can I work out a missing dimension if I already know the volume?
Yes, by dividing the volume by the product of the two dimensions you do know. With a volume of 24000 cubic centimetres and a base of 40 by 30 centimetres, the base area is 1200 square centimetres and the height is 24000 / 1200 = 20. The same rearrangement recovers either of the other two edges.
Why is the surface area a different number from the volume?
They measure different things and carry different units. Volume counts the unit cubes that fill the solid; surface area adds up the six faces that cover it, which for the 40 x 30 x 20 box means 2 x (1200 + 800 + 600) = 5200 square centimetres against a volume of 24000 cubic centimetres. Neither figure can be derived from the other without knowing the shape.
References
- [1]Wikipedia, Cuboid — https://en.wikipedia.org/wiki/Cuboid
- [2]Wikipedia, Volume — https://en.wikipedia.org/wiki/Volume
- [3]Wikipedia, Litre — https://en.wikipedia.org/wiki/Litre