Rectangular prism calculator

Calculate volume, surface area, space diagonal, face areas, and edge length for a rectangular prism or cuboid.

⚑ Report error
Volume
—
l × w × h
Surface area
—
2(lw + lh + wh)
Space diagonal
—
√(l² + w² + h²)

Live rectangular prism

The proportions update with your dimensions
Live
Length · width · height · diagonalUpdates with every input

Face-area distribution

Three rectangular face pairs
Live
lw · lh · wh100% of surface area

How volume changes with height

Length and width stay fixed; height changes live
Live
V = l × w × hCurrent height marked
LIVE GEOMETRY CHECK

What the dimensions are telling you

Updates live
Total edge length—4(l + w + h)
Surface / volume—surface area ÷ volume
Largest face pair—among lw, lh and wh
Base diagonal—√(l² + w²)
Change an edge to see how the prism responds.

Rectangular prism properties

3 edges
PropertyFormulaResult

Prism dimensions

cm
cm
cm
Use the same unit for all three edges. Results use square or cubic versions of that unit where appropriate.
GEOMETRY FUNDAMENTALS

What is a rectangular prism?

A rectangular prism, also called a cuboid, is a three-dimensional solid made from six rectangular faces. Three perpendicular dimensions — length l, width w, and height h — determine its size completely.

This is one of the most useful solids in elementary and applied geometry because so many everyday objects can be modeled as boxes: shipping cartons, bricks, storage containers, books, rooms, aquariums and concrete blocks. The same three measurements let you calculate capacity, covering area and the longest straight segment that fits inside the solid.

length l height h width w space diagonal d 8 vertices
At each corner, one length, one width and one height meet at right angles. Opposite faces are equal and parallel.
Faces63 pairs of congruent rectangles
Edges124 edges for each dimension
Vertices8corner points where edges meet
READ THE SHAPE

Length, width and height: what do they mean?

The labels are conventions rather than three different kinds of mathematics. Any three mutually perpendicular edges can define the prism. What matters is that you use the same three dimensions consistently.

DimensionMeaningWhere it appears
Length lOne edge of the chosen base rectanglelw, lh
Width wThe perpendicular edge across the baselw, wh
Height hThe perpendicular distance between the base and toplh, wh
i

Important: the formulas assume a right rectangular prism. Adjacent edges meet at 90°. A slanted prism is a different solid and does not use these formulas in the same way.

THE MATHEMATICS

Rectangular prism formulas

Once the three perpendicular dimensions are known, the main properties follow directly from multiplication and the Pythagorean theorem.

V = l × w × h
V
volume — the three-dimensional space inside
l × w
base area
h
perpendicular height
SA = 2(lw + lh + wh)
SA
total surface area of all six faces
lw
top and bottom pair
lh
front and back pair
wh
left and right pair
LSA = 2h(l + w)
LSA
lateral surface area — the four side faces only
d = √(l² + w² + h²)
d
space diagonal between opposite vertices
Base areaAbase = lw
Total edge lengthE = 4(l+w+h)
Face diagonal√(l²+w²)
SEE VOLUME

Why volume is l × w × h

Start with the base rectangle. Its area is l × w. Imagine stacking identical layers of that rectangle from the floor to the top. Multiplying the base area by the perpendicular height gives the total number of cubic units inside.

1 layer = lw layers stack through h V = lw × h cubic units l × w base
Volume can be visualized as identical rectangular layers stacked through the height. This is why the result is measured in cubic units such as cm³ or m³.
CLASSROOM EXAMPLE

8 cm × 5 cm × 3 cm

V = 8 × 5 × 3 = 120 cm³

There are 120 cubic centimeters of space inside the prism.

Volume = 120 cm³
ROOM EXAMPLE

4 m × 3 m × 2.5 m

V = 4 × 3 × 2.5 = 30 m³

If a room is modeled as a simple rectangular prism, its geometric volume is 30 cubic meters.

Volume = 30 m³
SEE THE SIX FACES

How surface area is built from the faces

A rectangular prism has three unique face sizes. Each occurs twice, so the six-face total is twice the sum of those three areas.

lw lh wh lw lh wh SA = 2(lw + lh + wh)
Each colored pair represents two congruent opposite faces. Surface area is the area of the complete outer skin of the prism.
Top / bottomlw × 2
Front / backlh × 2
Left / rightwh × 2

For a paint, wrapping or sheet-material estimate, first decide whether you need the full surface area or only the four side faces. The lateral surface area excludes the two base faces.

3D PYTHAGOREAN THEOREM

Understanding the space diagonal

The space diagonal is the straight-line distance through the interior from one corner to the opposite corner. It is longer than every individual edge and is often useful when checking whether a long rigid object can fit inside a box.

l h w Step 1 — face diagonal b = √(l² + h²) Step 2 — use the width d = √(b² + w²) Combine d = √(l² + w² + h²)
The three-dimensional formula is a direct extension of the Pythagorean theorem: first find a diagonal across one face, then combine it with the remaining perpendicular dimension.
↗

Fit check: if the longest straight object you need to place in a box is longer than the space diagonal, it cannot fit as a straight rigid segment, regardless of its orientation.

STRUCTURE

Faces, edges and vertices

These counts are fixed for every rectangular prism, no matter how long, wide or tall it is.

6faces3 pairs of equal rectangles
12edges4 of length l, 4 of w, 4 of h
8verticeseach vertex joins 3 edges
8 vertices 12 edges 6 faces all faces are rectangles
The vertices are the eight corners. Four parallel edges share each dimension, giving 12 edges in total.
LEARN BY EXAMPLE

Worked rectangular prism examples

EXAMPLE 1 · CLASSROOM BLOCK

8 × 5 × 3 cm

V = 8 × 5 × 3 = 120 cm³
SA = 2(40 + 24 + 15) = 158 cm²
d = √98 ≈ 9.899 cm
120 cm³ · 158 cm² · 9.899 cm
EXAMPLE 2 · SHIPPING CARTON

18 × 12 × 10 in

V = 18 × 12 × 10 = 2,160 in³
SA = 2(216 + 180 + 120) = 1,032 in²
d = √628 ≈ 25.060 in
Volume = 2,160 in³
EXAMPLE 3 · FIND A MISSING HEIGHT

Known volume and base

V = 240 cm³, l = 10 cm, w = 6 cm
h = V ÷ (l × w) = 240 ÷ 60 = 4 cm
Height = 4 cm
EXAMPLE 4 · CONCRETE PAD

4 m × 2.5 m × 0.15 m

V = 4 × 2.5 × 0.15 = 1.5 m³

The geometric model gives the pad's rectangular volume before practical allowances, slopes or irregularities are considered.

Volume = 1.5 m³
REAL-WORLD GEOMETRY

Where are rectangular prisms used?

The rectangular prism is not just a classroom shape. It is a useful approximation for many objects and spaces where three perpendicular dimensions control capacity, material coverage or fit.

Cardboard shipping boxes stacked in a warehouse
Packaging & logisticsCarton volume helps estimate capacity and packing space. Surface area helps when estimating the material needed to cover a box. Photo: warehouse cartons.
Rectangular glass aquarium tank
Aquariums & tanksA rectangular tank can be modeled from its internal length, width and water depth. Volume then describes the available geometric capacity.
Rectangular clay brick
Construction materialsBricks and blocks are commonly close to rectangular-prism shapes, making volume useful for estimating material quantities.
ApplicationWhat the prism model helps calculateTypical quantity
Shipping cartonInternal capacity and outer coveringVolume, surface area
RoomEnclosed space and wall/ceiling/floor areaVolume, surface area
TankGeometric capacity at a given fill heightVolume
Brick / blockMaterial volume and dimensional fitVolume, diagonal
Storage cabinetAvailable storage space and exterior coverageVolume, surface area

Real objects are often more complicated than an ideal rectangular prism: walls have thickness, corners can be rounded, tanks can have fittings, and rooms can contain recesses. The prism model is most useful when the object is reasonably close to a box or when a first-order estimate is appropriate.

SPECIAL CASE

Rectangular prism vs. cube

A cube is a special rectangular prism in which all three dimensions are equal: l = w = h = a. Substituting that condition into the general formulas gives the familiar cube formulas.

aaa V = a³ SA = 6a² d = a√3
Every edge has the same length in a cube. That symmetry makes the rectangular-prism formulas collapse into three simple expressions.
CHECK YOUR WORK

Common rectangular prism mistakes

Common mistakeWhy it is wrongCorrect check
Adding l + w + h for volumeVolume is three-dimensionalMultiply: V = lwh
Using 2(l+w+h) for surface areaThat is not the sum of six face areasUse SA = 2(lw+lh+wh)
Mixing cm and mThe units are not directly compatibleConvert to one unit first
Calling √(l²+w²) the space diagonalThat is only a diagonal of the base faceUse √(l²+w²+h²)
Forgetting squared/cubed unitsArea and volume have different dimensionscm² for area, cm³ for volume
QUESTIONS STUDENTS ASK

Rectangular prism calculator FAQ

What is a rectangular prism?

It is a three-dimensional solid with six rectangular faces, 12 edges and 8 vertices. A right rectangular prism is commonly called a cuboid.

How do I calculate the volume?

Multiply the three perpendicular dimensions: V = l × w × h. The result uses cubic units.

How do I calculate total surface area?

Use SA = 2(lw + lh + wh), which adds all six rectangular faces.

What is the lateral surface area?

It is the area of the four side faces, excluding the two chosen base faces: LSA = 2h(l + w).

What is the space diagonal?

It is the straight-line distance through the interior between opposite vertices: d = √(l² + w² + h²).

Is a cube a rectangular prism?

Yes. A cube is the special case where l = w = h.

Can I use different units for each edge?

Convert them to the same unit before entering them. The formulas assume a consistent unit system.