Volume of a Rectangular Prism: Formula & Calculator
- Surface area
- m²
- Result
- Space diagonal
- m
- Result
- Length
- 5 m
- You entered
This calculator finds the volume of a rectangular prism (also called a rectangular box or cuboid) when you enter its length, width, and height. You get the volume in cubic units, plus the surface area and the space diagonal as a bonus. The formula is simply length × width × height, but the calculator saves you the multiplication and helps you avoid unit mistakes.
Formula
The volume V of a rectangular prism is the product of its three dimensions:
V = l × w × h
- l = length (in meters, feet, inches, etc.)
- w = width (same unit as length)
- h = height (same unit as length)
The result is always in cubic units of whatever you measured with. If you measure in meters, the volume is in cubic meters (m³); if you measure in feet, it’s in cubic feet (ft³). The surface area formula (2lw + 2lh + 2wh) and the space diagonal formula (√(l² + w² + h²)) are also included because they often come up alongside volume.
Worked Example
Using the default values from the calculator: length = 5 m, width = 3 m, height = 2 m.
- Multiply length × width: 5 × 3 = 15 m² (this is the base area).
- Multiply the base area by height: 15 × 2 = 30 m³.
The volume is 30 cubic meters. The calculator shows the same result: 30.00 m³. Surface area: 2(5×3 + 5×2 + 3×2) = 2(15 + 10 + 6) = 2 × 31 = 62 m². Space diagonal: √(25 + 9 + 4) = √38 ≈ 6.16 m.
What a Rectangular Prism Is
A rectangular prism is a three-dimensional shape with six faces, all of which are rectangles. Opposite faces are identical and parallel. It has 12 edges and 8 vertices. Common examples include a shoebox, a brick, a fish tank, a room, or a shipping carton. When all six faces are squares, it’s a cube, which is just a special case where length = width = height.
The volume tells you how much space the shape occupies. For a box, that’s how much water it can hold, how much soil it can contain, or how much air it displaces. The formula works for any rectangular prism, from a matchbox to a warehouse, as long as you measure the three inside dimensions correctly.
When to Use This Calculator
Use this calculator whenever you need the capacity or volume of a rectangular container or object. Typical situations include:
- Finding the volume of a fish tank or aquarium (then convert to gallons or liters).
- Calculating how much concrete, sand, or mulch is needed to fill a rectangular area.
- Determining the volume of a shipping box to estimate freight costs (though carriers often use dimensional weight).
- Working out the volume of a room for heating, cooling, or acoustic purposes.
- Checking a math homework answer.
If your object is not a perfect rectangle, this formula will overestimate the volume. For a cylinder, use πr²h instead; for an irregular shape, use water displacement or a more complex method.
How to Read the Result
The volume number alone is meaningless without the cubic unit. For example, 30 m³ is very different from 30 cm³. Always note the unit you used for length, width, and height, and then cube it. If you measured in inches, the volume is in cubic inches; to convert to gallons (US), divide by 231. To convert cubic feet to gallons, multiply by 7.48052. To convert cubic meters to liters, multiply by 1000.
The surface area output is useful when you need to know how much material covers the box (like wrapping paper or paint). The diagonal is the longest straight line inside the box, from one corner to the opposite corner. It’s handy when checking if a long object fits inside a box.
Common Mistakes and How to Avoid Them
- Mixing units: The biggest error. If length is in meters and width in centimeters, the volume will be wrong. Convert all dimensions to the same unit first.
- Forgetting to cube the unit: Write the answer as cubic units (m³, ft³, in³), not just a number.
- Using the wrong dimension: For a box, the height is the vertical dimension, not the depth. It doesn’t matter which side you call length, width, or height—the product is the same—but you must use three distinct perpendicular edges.
- Rounding too early: If you round each dimension to 2 decimal places and then multiply, you may lose accuracy. Keep full precision until the final answer.
- Confusing volume with surface area: Volume is the space inside (cubic units), surface area is the total area of all six faces (square units).
Also, note that the formula assumes the prism is a right rectangular prism—that is, all faces meet at 90° angles. If the box is slanted (an oblique prism), the volume is base area × height (perpendicular distance between bases), not the product of three edge lengths.
Limits of the Formula
The formula V = l × w × h is exact only for a rectangular prism with straight edges and right angles. It does not apply to shapes with curved sides, tapered sides, or irregular bases. For a trapezoidal prism, you’d need the area of the trapezoid base. For a cylinder, use πr²h. For a sphere, use (4/3)πr³. Also, if you’re measuring a real object, the outside dimensions give the external volume; the internal volume (capacity) is smaller if the walls have thickness.
For a hollow container, measure the inside dimensions to get the capacity. For example, a fish tank with 1 cm thick glass will hold less than the external volume suggests. Always decide whether you need the volume of the material (walls included) or the volume of the empty space inside.
Frequently Asked Questions
How do I find the volume if I only know the surface area?
You can’t uniquely determine the volume from surface area alone. Many different rectangular prisms can have the same surface area but different volumes. For example, a cube with surface area 54 m² has volume 27 m³, but a prism with dimensions 1×2×8 has surface area 52 m² (close) and volume 16 m³. You need at least two dimensions, or one dimension plus the surface area, to solve for the others.
What if the length, width, and height are in different units?
Convert all three to the same unit before multiplying. For instance, if length is 2 meters and width is 50 centimeters, convert 50 cm to 0.5 m, then multiply. If you forget, your volume will be off by a factor of 100 or more.
Does the order of multiplication matter?
No. Multiplication is commutative, so l × w × h gives the same result as w × h × l. Just make sure you use the three perpendicular edges. It doesn’t matter which one you call length, width, or height.
How do I convert cubic meters to liters?
1 cubic meter = 1000 liters. So multiply the volume in m³ by 1000. For example, 0.3 m³ = 300 liters. To convert cubic feet to gallons (US), multiply by 7.48052.
Can I use this formula for a cube?
Yes. A cube is a rectangular prism where all three dimensions are equal. So if each side is 4 cm, the volume is 4 × 4 × 4 = 64 cm³. The calculator works fine if you enter the same number for length, width, and height.
Why is the volume in cubic units?
Because you’re multiplying three lengths together. Each length has a unit (like meters), and when you multiply them, the unit is raised to the third power (m × m × m = m³). That’s why volume is always measured in cubic units, such as cubic inches, cubic feet, or cubic centimeters.
Related
Formula used
in l | Length | m | 5 | 0 in w | Width | m | 3 | 0 in h | Height | m | 2 | 0 out vol | Volume | m³ | l * w * h | 2 out area | Surface area | m² | 2 * (l * w + l * h + w * h) | 2 out diag | Space diagonal | m | sqrt(l^2 + w^2 + h^2) | 2
Each line is one input (in, sel, list) or one result (out: label, unit, formula, decimals). How the calculators work
Method: the standard formula for this calculation, rounded as each result states. See how the calculators work or report an error.