Skip to main content
Science & Math

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.

Created by Muhammad Asif Zaheer
Reviewed by CalculatorPlanet Editorial Team

Published

Last updated

Volume
24.000 cubic units
Total surface area
52.000 square units
Lateral surface area (four sides)
28.000 square units
Space diagonal
5.385 units
Height used
2.000 units
Top and bottom face (length x width)
12.000 square units
Front and back face (length x height)
8.000 square units
End faces (width x height)
6.000 square units
Base diagonal
5.000 units
Total length of all 12 edges
36.000 units
Volume in cubic feet
24.000 ft3
Volume in cubic yards
0.889 yd3
Volume in cubic metres
0.6796 m3
Volume in litres
679.60 litres
Volume in US gallons
179.53 US gal

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)
What goes in, what comes out
  • 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
Volume
24
Values shown are from the worked example 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

  1. Enter length unit

    Choose from Millimetres, Centimetres, Metres, Inches, Feet, Yards.

  2. Enter i want to

    Choose from Find volume and area from all three sides, Find the height from the volume and base.

  3. Enter length (in your unit)

    Type the figure you already have, then press Calculate.

  4. Enter width (in your unit)

    Type the figure you already have, then press Calculate.

  5. Enter height (in your unit)

    Type the figure you already have, then press Calculate.

  6. Enter known volume (cubic units of your unit)

    Type the figure you already have, then press Calculate.

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

1
unit
ft
2
mode
dimensions
3
length
4
4
width
3
5
height
2
6
knownVolume
60
This calculator returns24volume52surfaceArea28lateralArea5.385spaceDiagonal2height12areaLW8areaLH6areaWH5faceDiagonal36edgeLength24cubicFeet0.889cubicYards0.6796cubicMetres679.6litres179.53usGallons

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.

unit: inmode: dimensionslength: 12width: 12height: 12knownVolume: 601728volume864surfaceArea576lateralArea20.785spaceDiagonal12height144areaLW144areaLH144areaWH16.971faceDiagonal144edgeLength1cubicFeet0.037cubicYards0.0283cubicMetres28.32litres7.48usGallons

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.

unit: mmode: dimensionslength: 2width: 1.5height: 1knownVolume: 603volume13surfaceArea7lateralArea2.693spaceDiagonal1height3areaLW2areaLH1.5areaWH2.5faceDiagonal18edgeLength105.944cubicFeet3.924cubicYards3cubicMetres3000litres792.52usGallons

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.

unit: cmmode: dimensionslength: 120width: 80height: 60knownVolume: 60576000volume43200surfaceArea24000lateralArea156.205spaceDiagonal60height9600areaLW7200areaLH4800areaWH144.222faceDiagonal1040edgeLength20.341cubicFeet0.753cubicYards0.576cubicMetres576litres152.16usGallons

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.

unit: ftmode: missinglength: 5width: 4height: 2knownVolume: 6060volume94surfaceArea54lateralArea7.071spaceDiagonal3height20areaLW15areaLH12areaWH6.403faceDiagonal48edgeLength60cubicFeet2.222cubicYards1.699cubicMetres1699.01litres448.83usGallons

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.

unit: ftmode: dimensionslength: 20width: 12height: 8knownVolume: 601920volume992surfaceArea512lateralArea24.658spaceDiagonal8height240areaLW160areaLH96areaWH23.324faceDiagonal160edgeLength1920cubicFeet71.111cubicYards54.3683cubicMetres54368.35litres14362.6usGallons

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.

Rectangular prism formula diagram: volume l times w times h, surface area 2(lw+lh+wh) and the space diagonal

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.

Worked example: a 4 by 3 by 2 foot box has volume 24 cubic feet, surface area 52 square feet and diagonal 5.385 feet

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.

Bar chart of the three pairs of faces of a 4 by 3 by 2 foot box that add up to 52 square feet of surface

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.

Bar chart showing doubling one, two or three edges of a box multiplies its volume by 2, 4 or 8

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

Space diagonal of a 4 by 3 by 2 box found with two steps of Pythagoras, giving 5.385

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.

Bar chart of the height that gives 60 cubic feet for six base sizes, using height equals volume over length times width

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.

Bar chart of cubic yards in five rooms and containers, from 10 by 10 by 8 feet to a 40 foot container

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.

Net of a rectangular prism: six rectangles with areas l times w, l times h and w times h that fold into a box

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.

Limits of the rectangular prism calculator: perfect boxes only, same unit for all edges, inside edges for 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

Rectangular prism formulas for edges l (length), w (width) and h (height)
QuantityFormulaNotes
VolumeV = l x w x hCubic units of the edge unit
Total surface areaS = 2 (lw + lh + wh)All six faces
Lateral surface area2 h (l + w)Four side faces, no top or bottom
Base (top or bottom) areal x wEach of two faces
Front or back facel x hTwo faces
Side facesw x hTwo 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 length4 (l + w + h)Twelve edges
Volume of a rectangular prism in cubic feet for common sizes in feet
Length (ft)Width (ft)Height 1 ftHeight 2 ftHeight 4 ftHeight 8 ft
224.08.016.032.0
326.012.024.048.0
4312.024.048.096.0
6424.048.096.0192.0
8432.064.0128.0256.0
10880.0160.0320.0640.0
1210120.0240.0480.0960.0
Surface area of a rectangular prism, with lateral area, for sizes in feet
l x w x h (ft)Volume (cu ft)Total surface area (sq ft)Lateral area (sq ft)Base area (sq ft)
1 × 1 × 11.06.04.01.0
2 × 1 × 12.010.06.02.0
3 × 2 × 212.032.020.06.0
4 × 3 × 224.052.028.012.0
5 × 4 × 360.094.054.020.0
8 × 4 × 4128.0160.096.032.0
10 × 8 × 6480.0376.0216.080.0
Space and face diagonals for common box sizes (same unit for all edges)
l x w x hBase diagonalSpace diagonalRatio to longest edge
1 × 1 × 11.4141.7321.732
3 × 4 × 125.00013.0001.083
2 × 3 × 63.6067.0001.167
4 × 3 × 25.0005.3851.346
10 × 8 × 612.80614.1421.414
12 × 12 × 1216.97120.7851.732
40 × 30 × 2050.00053.8521.346
One cubic unit of each length unit in other volume units
1 cubic ...Cubic feetCubic yardsCubic metresLitresUS gallons
inch0.000580.0000210.0000160.0160.004
foot1.000000.0370370.02831728.3177.481
yard27.000001.0000000.764555764.555201.974
centimetre0.000040.0000010.0000010.0010.000
metre35.314671.3079511.0000001,000.000264.172
Capacity of common box sizes in inches, in cubic feet and litres
Box (in)Cubic inchesCubic feetLitresUS gallons
6 × 6 × 62160.1253.540.94
10 × 8 × 64800.2787.872.08
12 × 12 × 121,7281.00028.327.48
16 × 12 × 122,3041.33337.769.97
18 × 18 × 165,1843.00084.9522.44
24 × 18 × 187,7764.500127.4333.66
48 × 40 × 4076,80044.4441,258.53332.47
Room and container volumes in cubic feet and cubic yards
Space (ft)Cubic feetCubic yardsCubic metresSurface area (sq ft)
10 × 10 × 880029.6322.65520
12 × 12 × 81,15242.6732.62672
20 × 12 × 81,92071.1154.37992
24 × 24 × 95,184192.00146.792,016
20 × 8 × 8.51,36050.3738.51796
40 × 8 × 8.52,720100.7477.021,456
Volume and surface formulas for prisms (base area B, perimeter P, length L)
PrismBase area BVolumeLateral area
Rectangular (l x w base, height h)l wl w h2 h (l + w)
Triangular (base b, triangle height t, length L)b t / 2b t L / 2(sum of triangle sides) x L
Cube (edge a)a2a34 a2
Any right prismBB x heightP x height
Rectangular prism terms
TermMeaning
Rectangular prismA solid with six rectangular faces, also called a cuboid or a box
FaceOne flat rectangular side; there are six
EdgeA line where two faces meet; there are twelve
VertexA corner where three edges meet; there are eight
Lateral areaArea of the four side faces, without top and bottom
Space diagonalLongest straight line inside the box, corner to opposite corner
NetA flat pattern of six rectangles that folds into the box
Common rectangular prism mistakes
MistakeEffectFix
Mixing inches and feetVolume wrong by 12 or 1,728 timesUse one unit for all three edges
Using area units for volumeSquare units reported where cubic units belongVolume is length x width x height
Counting only three facesSurface area half the true valueDouble the sum lw + lh + wh
Adding the lateral area and calling it totalTop and bottom missingAdd 2 l w to the lateral area
Converting cubic feet to yards by 3Off by a factor of 9Divide cubic feet by 27
Measuring outside size for capacityCapacity too highUse 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. [1] Wikipedia contributors. “Cuboid.” Wikipedia. Accessed 2026-10-07.
  2. [2] Wikipedia contributors. “Cubic foot.” Wikipedia. Accessed 2026-10-07.
  3. [3] Wikipedia contributors. “Cubic yard.” Wikipedia. Accessed 2026-10-07.
  4. [4] Wikipedia contributors. “Gallon.” Wikipedia. Accessed 2026-10-07.