Rectangular Prism Calculator
Rectangular prism calculator for volume, surface area, lateral area, face areas, diagonal, cubic yards and litres. Solve for a missing side too.
Published
Last updated
How the Rectangular Prism Calculator Formula Works
A rectangular prism is a box with six rectangular faces. Its volume is the length times the width times the height, V = l x w x h, because the base holds l x w unit squares and there are h layers of them. A box 4 by 3 by 2 feet holds 24 cubic feet.
The surface is three pairs of matching faces. The top and bottom are l x w, the front and back are l x h, and the two ends are w x h. Adding one of each and doubling gives the total surface area, S = 2 (lw + lh + wh). The four side faces alone are the lateral area, 2 h (l + w).
Two diagonals matter. The base diagonal is √(l2 + w2), found with Pythagoras. The space diagonal runs through the inside to the opposite corner, d = √(l2 + w2 + h2), which is the longest item that fits in the box. If you know the volume and two edges, the third is V / (the other two multiplied).
V = l × w × h; S = 2 (lw + lh + wh); lateral = 2h (l + w); d = √(l2 + w2 + h2)- llengthLength of the box.
- wlengthWidth of the box.
- hlengthHeight of the box.
- Vlength cubedVolume of the box.
- Slength squaredTotal surface area of all six faces.
- + 1 more input below
- l
- length
- Length of the box.
- w
- length
- Width of the box.
- h
- length
- Height of the box.
- V
- length cubed
- Volume of the box.
- S
- length squared
- Total surface area of all six faces.
- d
- length
- Space diagonal from corner to opposite corner.
Using the Rectangular Prism Calculator
Enter length unit
Choose from Millimetres, Centimetres, Metres, Inches, Feet, Yards.
Enter i want to
Choose from Find volume and area from all three sides, Find the height from the volume and base.
Enter length (in your unit)
Type the figure you already have, then press Calculate.
Enter width (in your unit)
Type the figure you already have, then press Calculate.
Enter height (in your unit)
Type the figure you already have, then press Calculate.
Enter known volume (cubic units of your unit)
Type the figure you already have, then press Calculate.
Read the result
Press Calculate to update the result. Until you do, the last result is dimmed and marked as out of date, so you always know which numbers belong to the values in the boxes.
A Real Worked Example
A box is 4 feet long, 3 feet wide and 2 feet high. The volume is 4 × 3 × 2 = 24 cubic feet, which is 0.889 cubic yards or 679.6 litres.
The surface area is 2 × (12 + 8 + 6) = 52 square feet, and the four sides alone are 28. The space diagonal is √(29) = 5.385 feet.
A 12 x 12 x 12 inch cube
Choose inches and enter 12, 12 and 12. The volume is 1,728 cubic inches, exactly one cubic foot, which is 28.317 litres or 7.481 US gallons.
The surface area is 864 square inches and the space diagonal is 20.785 inches.
A 2 x 1.5 x 1 metre tank
Choose metres. The volume is 3.0 cubic metres, which is 3,000 litres or 3.924 cubic yards.
The surface area is 13.0 square metres and the four sides are 7.0. The space diagonal is 2.693 metres.
A 120 x 80 x 60 cm crate
Choose centimetres. The volume is 576,000 cubic cm, which is 576 litres, or 20.34 cubic feet.
The top and bottom are 9,600 square cm each, and the space diagonal is 156.20 cm.
Find the height: 60 cubic feet on a 5 x 4 ft base
Choose the missing height mode in feet with a length of 5, a width of 4 and a volume of 60 cubic feet. The base is 20 square feet, so the height is 60 / 20 = 3 feet.
The surface area is 94 square feet and the space diagonal is 7.071 feet.
A 20 x 12 x 8 ft room in cubic yards
Choose feet and enter 20, 12 and 8. The volume is 1,920 cubic feet, which is 71.11 cubic yards or 54.37 cubic metres.
The walls, the lateral area, are 512 square feet, and the whole surface including floor and ceiling is 992 square feet.
What Else to Know
How to Calculate a Rectangular Prism
A rectangular prism, also called a cuboid or a box, has six rectangular faces. To calculate its volume, multiply the length, the width and the height: V = l x w x h. All three edges must be in the same unit, and the result is in cubic units of it.

The l x w x h formula counts unit cubes. The base holds l x w of them in one layer, and the box stacks h layers. A 4 × 3 × 2 box holds 24.

The calculator also gives the surface area, lateral area, face areas, diagonals and conversions, all from the same three numbers.
Rectangular Prism Surface Area and Lateral Area
The surface has three different faces, each appearing twice. The total surface area is S = 2 (lw + lh + wh). The lateral surface area is only the four sides, 2 h (l + w), which is the total minus the top and bottom, 2 l w.

Use the total when you cover everything, such as wrapping a gift or painting a box. Use the lateral area for walls of a room, or an open-top container's sides. For an open box with no top, subtract one l x w face from the total.

The face-area outputs list l x w, l x h and w x h separately.
Space Diagonal and Face Diagonal
Pythagoras gives both diagonals. The base diagonal is √(l2 + w2). The space diagonal goes from one corner through the middle to the opposite corner, d = √(l2 + w2 + h2).

The space diagonal is the longest straight object that fits inside the box, such as a rod in a crate. For a cube of edge a it is a x √(3).
The diagonal table lists several box sizes, including 3 × 4 × 12 whose diagonal is a whole 13.
Finding a Missing Side
If you know the volume and two edges, the third edge is the volume divided by the product of the other two: h = V / (l x w). Choose the missing height mode in the calculator, enter the base and the volume, and it solves for the height.

The volume must be in cubic units of the length unit you picked. If your volume is in litres, convert it first: 1,000 litres is one cubic metre.
Once the height is known the calculator gives all the other results as usual.
Cubic Yards, Litres and Other Conversions
Volume converts with the cube of the length factor. One cubic yard is 27 cubic feet, one cubic metre is 1,000 litres, and a US gallon is exactly 231 cubic inches or 3.785411784 litres. The calculator shows cubic feet, cubic yards, cubic metres, litres and US gallons for any unit you enter.

Cubic yards are the usual unit for concrete, soil and gravel orders. Litres suit tanks and aquariums. The conversion table lists one cubic inch, foot, yard, centimetre and metre in every unit.
Unit definitions follow the Wikipedia pages for the cubic foot, cubic yard and gallon.
Making a Rectangular Prism and Other Prisms
To make a box from paper, draw a net: six rectangles, two each of l x w, l x h and w x h, joined along edges. Fold on the shared edges and glue the flaps. The areas of those six rectangles add up to the surface area.

Other prisms follow the same idea: volume is base area times height. A triangular prism uses a triangle base, V = (b x t / 2) x L. The prism table lists the formulas.
This calculator is for the rectangular case, where the base is l x w.
Limits and Related Calculators
The calculator assumes a perfect box with flat faces and square corners. It does not model wall thickness, rounded corners or a box that is not rectangular. Use inside edges when you want a capacity.

For material orders on a rectangular area, see the gravel calculator, the stone calculator and the board foot calculator. For shares of a total, the percentage calculator helps.
Reference Tables
| Quantity | Formula | Notes |
|---|---|---|
| Volume | V = l x w x h | Cubic units of the edge unit |
| Total surface area | S = 2 (lw + lh + wh) | All six faces |
| Lateral surface area | 2 h (l + w) | Four side faces, no top or bottom |
| Base (top or bottom) area | l x w | Each of two faces |
| Front or back face | l x h | Two faces |
| Side faces | w x h | Two faces |
| Space diagonal | √(l2 + w2 + h2) | Corner to opposite corner through the inside |
| Face diagonal (base) | √(l2 + w2) | Corner to corner across the base |
| Total edge length | 4 (l + w + h) | Twelve edges |
| Length (ft) | Width (ft) | Height 1 ft | Height 2 ft | Height 4 ft | Height 8 ft |
|---|---|---|---|---|---|
| 2 | 2 | 4.0 | 8.0 | 16.0 | 32.0 |
| 3 | 2 | 6.0 | 12.0 | 24.0 | 48.0 |
| 4 | 3 | 12.0 | 24.0 | 48.0 | 96.0 |
| 6 | 4 | 24.0 | 48.0 | 96.0 | 192.0 |
| 8 | 4 | 32.0 | 64.0 | 128.0 | 256.0 |
| 10 | 8 | 80.0 | 160.0 | 320.0 | 640.0 |
| 12 | 10 | 120.0 | 240.0 | 480.0 | 960.0 |
| l x w x h (ft) | Volume (cu ft) | Total surface area (sq ft) | Lateral area (sq ft) | Base area (sq ft) |
|---|---|---|---|---|
| 1 × 1 × 1 | 1.0 | 6.0 | 4.0 | 1.0 |
| 2 × 1 × 1 | 2.0 | 10.0 | 6.0 | 2.0 |
| 3 × 2 × 2 | 12.0 | 32.0 | 20.0 | 6.0 |
| 4 × 3 × 2 | 24.0 | 52.0 | 28.0 | 12.0 |
| 5 × 4 × 3 | 60.0 | 94.0 | 54.0 | 20.0 |
| 8 × 4 × 4 | 128.0 | 160.0 | 96.0 | 32.0 |
| 10 × 8 × 6 | 480.0 | 376.0 | 216.0 | 80.0 |
| l x w x h | Base diagonal | Space diagonal | Ratio to longest edge |
|---|---|---|---|
| 1 × 1 × 1 | 1.414 | 1.732 | 1.732 |
| 3 × 4 × 12 | 5.000 | 13.000 | 1.083 |
| 2 × 3 × 6 | 3.606 | 7.000 | 1.167 |
| 4 × 3 × 2 | 5.000 | 5.385 | 1.346 |
| 10 × 8 × 6 | 12.806 | 14.142 | 1.414 |
| 12 × 12 × 12 | 16.971 | 20.785 | 1.732 |
| 40 × 30 × 20 | 50.000 | 53.852 | 1.346 |
| 1 cubic ... | Cubic feet | Cubic yards | Cubic metres | Litres | US gallons |
|---|---|---|---|---|---|
| inch | 0.00058 | 0.000021 | 0.000016 | 0.016 | 0.004 |
| foot | 1.00000 | 0.037037 | 0.028317 | 28.317 | 7.481 |
| yard | 27.00000 | 1.000000 | 0.764555 | 764.555 | 201.974 |
| centimetre | 0.00004 | 0.000001 | 0.000001 | 0.001 | 0.000 |
| metre | 35.31467 | 1.307951 | 1.000000 | 1,000.000 | 264.172 |
| Box (in) | Cubic inches | Cubic feet | Litres | US gallons |
|---|---|---|---|---|
| 6 × 6 × 6 | 216 | 0.125 | 3.54 | 0.94 |
| 10 × 8 × 6 | 480 | 0.278 | 7.87 | 2.08 |
| 12 × 12 × 12 | 1,728 | 1.000 | 28.32 | 7.48 |
| 16 × 12 × 12 | 2,304 | 1.333 | 37.76 | 9.97 |
| 18 × 18 × 16 | 5,184 | 3.000 | 84.95 | 22.44 |
| 24 × 18 × 18 | 7,776 | 4.500 | 127.43 | 33.66 |
| 48 × 40 × 40 | 76,800 | 44.444 | 1,258.53 | 332.47 |
| Space (ft) | Cubic feet | Cubic yards | Cubic metres | Surface area (sq ft) |
|---|---|---|---|---|
| 10 × 10 × 8 | 800 | 29.63 | 22.65 | 520 |
| 12 × 12 × 8 | 1,152 | 42.67 | 32.62 | 672 |
| 20 × 12 × 8 | 1,920 | 71.11 | 54.37 | 992 |
| 24 × 24 × 9 | 5,184 | 192.00 | 146.79 | 2,016 |
| 20 × 8 × 8.5 | 1,360 | 50.37 | 38.51 | 796 |
| 40 × 8 × 8.5 | 2,720 | 100.74 | 77.02 | 1,456 |
| Prism | Base area B | Volume | Lateral area |
|---|---|---|---|
| Rectangular (l x w base, height h) | l w | l w h | 2 h (l + w) |
| Triangular (base b, triangle height t, length L) | b t / 2 | b t L / 2 | (sum of triangle sides) x L |
| Cube (edge a) | a2 | a3 | 4 a2 |
| Any right prism | B | B x height | P x height |
| Term | Meaning |
|---|---|
| Rectangular prism | A solid with six rectangular faces, also called a cuboid or a box |
| Face | One flat rectangular side; there are six |
| Edge | A line where two faces meet; there are twelve |
| Vertex | A corner where three edges meet; there are eight |
| Lateral area | Area of the four side faces, without top and bottom |
| Space diagonal | Longest straight line inside the box, corner to opposite corner |
| Net | A flat pattern of six rectangles that folds into the box |
| Mistake | Effect | Fix |
|---|---|---|
| Mixing inches and feet | Volume wrong by 12 or 1,728 times | Use one unit for all three edges |
| Using area units for volume | Square units reported where cubic units belong | Volume is length x width x height |
| Counting only three faces | Surface area half the true value | Double the sum lw + lh + wh |
| Adding the lateral area and calling it total | Top and bottom missing | Add 2 l w to the lateral area |
| Converting cubic feet to yards by 3 | Off by a factor of 9 | Divide cubic feet by 27 |
| Measuring outside size for capacity | Capacity too high | Use inside edges for what a box holds |
Frequently Asked Questions About the Rectangular Prism Calculator
How do you calculate a rectangular prism?
Multiply its three edges for the volume: V = l x w x h. For the surface, add the areas of the three different faces and double it: 2 (lw + lh + wh). A box 4 ft long, 3 ft wide and 2 ft high has volume 24 cubic feet and surface area 52 square feet. Enter your own length, width and height in the calculator for exact answers.
What is the l * w * h formula?
l x w x h is the volume of a rectangular prism: length times width times height. It counts how many unit cubes fit inside. A 10 × 8 × 6 inch box holds 480 cubic inches, which is 0.278 cubic feet. All three edges must use the same unit. Enter your own length, width and height in the calculator for exact answers.
How can I make a rectangular prism?
Draw a net: six rectangles that fold into a box, two of l x w, two of l x h and two of w x h. Cut along the outline, fold on the shared edges and tape the seams. Add small flaps for glue. Check that opposite faces match before you cut. Enter your own length, width and height in the calculator for exact answers.
How do I calculate a prism?
For any right prism, multiply the area of the base by the height, V = B x h. For a rectangular prism the base is l x w. For a triangular prism with base b, triangle height t and length L, V = (b x t / 2) x L. A triangle 3 by 4 and length 10 gives 60. Enter your own length, width and height in the calculator for exact answers.
What is the volume of a rectangular prism calculator formula?
The formula is V = l x w x h with all edges in the same unit, so the answer is in cubic units of that unit. To go the other way, divide: h = V / (l x w). The calculator has a mode that solves for a missing height when you know the volume and the base. Enter your own length, width and height in the calculator for exact answers.
How do I find the surface area of a rectangular prism?
Add the areas of the three pairs of faces and double the total: S = 2 (lw + lh + wh). For 5 × 4 × 3 that is 2 × (20 + 15 + 12) = 94 square units. Choose any unit, the answer is in square units of it. Enter your own length, width and height in the calculator for exact answers.
What is the lateral surface area of a rectangular prism?
The lateral area is the four side faces without the top and bottom: 2 h (l + w). For 5 × 4 × 3 it is 2 × 3 × 9 = 54 square units. Add the top and bottom, 2 x l x w = 40, to get the total 94. Enter your own length, width and height in the calculator for exact answers.
How do I find the area of one face?
Multiply the two edges that border that face. The top and bottom are l x w, the front and back l x h, the two ends w x h. For 4 × 3 × 2 the faces are 12, 8 and 6 square units. The calculator shows all three. Enter your own length, width and height in the calculator for exact answers.
How do I find the diagonal of a rectangular prism?
The space diagonal is d = √(l2 + w2 + h2). For 4 × 3 × 2 it is √(29) = 5.385. It is the longest straight rod that fits in the box. The base diagonal is √(l2 + w2) = 5. Enter your own length, width and height in the calculator for exact answers.
How do I find a missing side from the volume?
Divide the volume by the product of the two known edges. If the volume is 60 cubic feet and the base is 5 by 4 feet, the height is 60 / 20 = 3 feet. Choose the missing side mode and enter the volume. Enter your own length, width and height in the calculator for exact answers.
How many cubic yards is a rectangular prism?
Find the volume in cubic feet and divide by 27, since a cubic yard is 3 × 3 × 3 feet. A 20 × 12 × 8 ft room is 1,920 cubic feet, which is 71.11 cubic yards. If the edges are in yards the volume is already in cubic yards. Enter your own length, width and height in the calculator for exact answers.
How many litres is a rectangular prism?
Work in centimetres and divide cubic centimetres by 1,000, or work in metres and multiply cubic metres by 1,000. A box 120 × 80 × 60 cm is 576,000 cubic cm, which is 576 litres. The calculator converts from any unit. Enter your own length, width and height in the calculator for exact answers.
How many gallons does a box hold?
Convert the volume to cubic inches and divide by 231 for US gallons. A 24 × 18 × 18 inch box is 7,776 cubic inches, 33.7 US gallons. A tank 2 × 1.5 × 1 m holds 3,000 litres. Enter your own length, width and height in the calculator for exact answers.
Is 12 x 12 x 12 inches one cubic foot?
Yes. 12 × 12 × 12 = 1,728 cubic inches, which is exactly one cubic foot. It is also 28.317 litres and 7.481 US gallons. Its surface area is 864 square inches and its space diagonal 20.785 inches. Enter your own length, width and height in the calculator for exact answers.
What is the difference between a cube and a rectangular prism?
A cube is a rectangular prism with three equal edges. For edge a, the volume is a3, the surface area 6 a2 and the space diagonal a x √(3). A cube of edge 4 has volume 64, surface area 96 and diagonal 6.928. Enter your own length, width and height in the calculator for exact answers.
How do I find the volume of a triangular prism?
Multiply the triangle's area by the prism length: V = (b x t / 2) x L. This page covers the rectangular box, so for a triangular prism find the triangle area first. A triangle with base 6 and height 4 and a length of 10 gives 120 cubic units. Enter your own length, width and height in the calculator for exact answers.
How do I solve it with steps?
Write the formula, substitute, then multiply. For 6 × 4 × 3: V = 6 × 4 × 3 = 72. Surface: 2 × (24 + 18 + 12) = 108. Diagonal: √(61) = 7.810. The worked examples on this page follow that pattern. Enter your own length, width and height in the calculator for exact answers.
What units does the answer use?
Volume is in cubic units of your length unit, area is in square units and the diagonal is in the length unit. The calculator also shows cubic feet, cubic yards, cubic metres, litres and US gallons so you can read the result in the unit you need. Enter your own length, width and height in the calculator for exact answers.
How do I find the volume of an open box?
Use the outside edges for the outside volume and the inside edges for what it holds. An open box also has no top, so its surface is S minus l x w. For 4 × 3 × 2 the open surface is 40 instead of 52. Enter your own length, width and height in the calculator for exact answers.
How much paint or wrap covers a box?
The surface area tells you the covering. A 4 × 3 × 2 ft box has 52 square feet of surface, or 28 without the top and bottom. Add extra for overlaps and waste, and check the coverage on the product label. Enter your own length, width and height in the calculator for exact answers.
How accurate is the rectangular prism calculator?
The arithmetic is exact for a perfect box. Real objects have rounded corners, wall thickness and uneven sides. Measure each edge twice, use inside edges for capacity, and note that an error in each edge multiplies into the volume. Enter your own length, width and height in the calculator for exact answers.
References
- [1] Wikipedia contributors. “Cuboid.” Wikipedia. Accessed 2026-10-07.
- [2] Wikipedia contributors. “Cubic foot.” Wikipedia. Accessed 2026-10-07.
- [3] Wikipedia contributors. “Cubic yard.” Wikipedia. Accessed 2026-10-07.
- [4] Wikipedia contributors. “Gallon.” Wikipedia. Accessed 2026-10-07.
Related calculators
- Amps to Kilowatts CalculatorConvert amps to kilowatts for DC, single-phase and three-phase circuits, with power factor, kVA, kWh per day or month and an optional energy cost.Open
- Binomial Distribution CalculatorBinomial distribution calculator. Enter trials, success probability and successes for exact, at most, at least and between probabilities, plus mean.Open
- Box Plot CalculatorBox plot calculator with steps: get Q1, median, Q3, whiskers, fences and outliers from data or five numbers, with a text box and whisker plot.Open
- Boyle's Law CalculatorBoyle's law calculator: solve P1 V1 = P2 V2 for pressure or volume in atm, kPa, bar, mmHg, psi, L, mL or m3, with gauge pressure and examples.Open
