The volume of a rectangular prism is length times width times height, written V = l × w × h. To get that number for any box, cuboid or rectangular solid, type the three edge lengths into the Rectangular Prism Volume Calculator and the volume, surface area and space diagonal appear instantly. The logic is direct: the base of the prism is a rectangle whose area is l × w, and the height h stacks that base upward to fill the box, so multiplying the three edges gives the enclosed space. Whatever unit you used for the sides, the answer comes out in the cube of that unit — centimetres produce cubic centimetres, inches produce cubic inches, metres produce cubic metres. For a box that is 2 units by 3 units by 4 units, V = 2 × 3 × 4 = 24 cubic units. Because the three faces come in matching pairs, the surface area is 2(lw + lh + wh), and the corner-to-opposite-corner space diagonal follows the 3D Pythagorean theorem as √(l² + w² + h²).

how to get the volume of the rectangular prism
How to Get the Volume of a Rectangular Prism

The Volume Formula in Plain English

The expression l × w × h is shorthand for length multiplied by width multiplied by height. Geometrically, the rectangular prism sits on one of its rectangular faces. That face has an area of l × w. The height h is how far the prism extends upward from that base, so the total space enclosed is base area times height, which collapses to l · w · h.

This works for any rectangular solid regardless of orientation. If the box is lying on its side, "height" simply means whichever dimension is perpendicular to the base you chose. The arithmetic is identical because multiplication is commutative: 2 × 3 × 4 gives the same 24 whether the height is the 2, the 3 or the 4.

You can verify the formula the long way by counting unit cubes. A 2 × 3 × 4 prism fits 2 cubes along one edge, 3 along another, and 4 layers deep, for a total of 24 unit cubes. That count and the multiplication always agree, which is why V = l × w × h is taught before any other 3D volume formula and why it shows up in every early geometry class.

What Counts as a Rectangular Prism

A rectangular prism — also called a cuboid or simply a box — is a solid with six flat rectangular faces meeting at right angles. Its opposite faces are congruent rectangles, and every corner is a 90° angle. Everyday objects that fit this description include shoeboxes, bricks, books, shipping cartons, fish tanks, suitcases and rooms. Because so many real things share the shape, the volume formula gets used far more often than the formula for any other 3D figure.

The defining requirement is that all three pairs of opposite faces are rectangles and meet at right angles. If any face tilts or curves, the solid is no longer a rectangular prism and the formula does not apply. A slanted box is a parallelepiped, a tube is a cylinder, and a ball is a sphere — each needs its own volume formula. The rectangular prism is the simplest 3D shape, which is exactly why its volume formula is the one most people learn first.

How to Find the Volume Step by Step

  1. Enter the length (l) of the rectangular prism, for example 2.
  2. Enter the width (w) and height (h), for example 3 and 4.
  3. Read the volume (l × w × h = 24), surface area and space diagonal as they update instantly.

The calculator accepts whole numbers or decimals, requires the three values to be zero or positive, and computes everything locally in your browser. There is no signup, no upload and no waiting for a server to respond. If you only need the volume, just read the top number; if you also want to wrap the box or fit a long object inside it, the surface area and diagonal sit right below. Because every output is derived from the same three inputs, you do not need to retype anything to get all three results.

Worked Example for a 2 × 3 × 4 Box

Take a rectangular box with length l = 2, width w = 3 and height h = 4 (in any consistent unit).

Volume. V = l × w × h = 2 × 3 × 4. Compute the first two products: 2 × 3 = 6. Then 6 × 4 = 24. The volume is 24 cubic units.

Surface area. S = 2(lw + lh + wh). Substitute: lw = 2 × 3 = 6, lh = 2 × 4 = 8, wh = 3 × 4 = 12. Add them: 6 + 8 + 12 = 26. Double: 2 × 26 = 52. The surface area is 52 square units.

Space diagonal. d = √(l² + w² + h²). Substitute: 2² + 3² + 4² = 4 + 9 + 16 = 29. d = √29 ≈ 5.39 units. That is the longest straight object that can fit corner to opposite corner.

All three numbers match what the calculator displays for the same inputs, which is the simplest way to confirm a hand calculation. Once you trust the result, you can move on to real problems — estimating the water a fish tank holds, the concrete a footing needs or the cubic capacity of a shipping carton — without redoing the arithmetic.

QuantityFormulaWhat it tells you
VolumeV = l · w · hHow much space the box encloses
Surface areaS = 2(lw + lh + wh)Total area of all six faces
Space diagonald = √(l² + w² + h²)Longest straight line corner to opposite corner

Getting Surface Area and Diagonal Alongside the Volume

The Rectangular Prism Volume Calculator returns three values at once because the same three numbers drive all three formulas. Surface area is the total area of the six faces, and because they come in three matching pairs, you add the three distinct rectangle areas and double the sum. The space diagonal is the straight line from one corner of the box to the corner directly across from it, passing through the interior of the solid. It is the 3D version of the Pythagorean theorem and gives the longest possible internal measurement.

Surface area is what you reach for when estimating paint, wrapping paper, sheet material or the outer skin of a container. The space diagonal tells you the longest rod, pole or shelf that can be slid into the box without bending. None of those questions require a separate calculator — the same three side lengths produce all three answers. That is also why volumetric weight in shipping is computed from l × w × h rather than from mass: the carrier needs to know the space the parcel occupies in the truck, not how heavy it is.

Matching Units to the Answer You Need

The three edges must all be expressed in the same unit before you multiply, or the result is meaningless. Use centimetres throughout and the answer is in cubic centimetres (cm³). Use metres and the answer is in cubic metres (m³). Use inches and the answer is in cubic inches (in³). Once the volume is in cubic units, you can convert to liquid measures such as litres or gallons through a separate conversion step. For example, 1 cubic centimetre is exactly 1 millilitre, 1 cubic metre is 1000 litres, and the cubic-inch-to-US-gallon relationship is a fixed constant you can apply once the volume is known — the rectangular prism volume in gallons guide walks through that conversion in detail.

A practical tip: if your three side lengths are mixed — say 2 feet, 3 inches and 4 centimetres — convert them all to a single unit before typing them in. The calculator will compute correctly only after the units line up. Mixing units is the most common cause of an answer that "looks right but feels wrong," and the fix is always to normalise the inputs first.

When the Box Is Really a Cube

A cube is the special case of a rectangular prism where every edge is the same length. Set l = w = h = s, and the three formulas collapse: V = s · s · s = s³, S = 2(s² + s² + s²) = 6s², and d = √(3s²) = s√3. For a cube with side 5, the volume is 125 cubic units, the surface area is 150 square units and the space diagonal is 5√3 ≈ 8.66 units.

The calculator recognises a cube automatically and labels the case so you know you are looking at the familiar s³, 6s² and s√3 forms. If you only have one measurement to enter, that is a strong signal that the solid is a cube rather than a general rectangular prism, and the simpler formulas apply. The cube is also the shape that maximises volume for a given surface area — a property that shows up in packaging, biology and even the geometry of why bees build hexagonal cells — but for everyday calculation, it is just the rectangular prism with all three sides equal.

If you're weighing options, How to Calculate Sphere Surface Area and Volume covers this in detail.