notAcalculator logo

Rectangular Prism Calculator

Enter a rectangular prism's length, width, and height to instantly calculate its volume, total surface area, and space diagonal with clear worked examples.

Rectangular Prism Calculator

Give us your feedback! Was this useful?

Introduction

A rectangular prism — also called a cuboid — is a box: a solid with six rectangular faces meeting at right angles. Every face is a rectangle, opposite faces are identical and parallel, and the three dimensions (length, width, and height) meet at each corner at 90°. It is the three-dimensional version of the rectangle, just as the cube is the three-dimensional version of the square.

The rectangular prism is the most common solid in daily life. Shipping boxes, rooms, bricks, aquariums, phone bodies, refrigerators, and books are all rectangular prisms or close approximations. It is also the easiest three-dimensional solid to reason about, because its volume is simply the product of its three dimensions — no π, no slant height, no cube roots. That simplicity is exactly why it is the first solid taught in school and the one used most often in logistics and construction.

[wolfram-cuboid]

Because a rectangular prism is defined by three independent lengths, it is more flexible than the cylinder or the cone, which are defined by two. That extra degree of freedom shows up in its properties: the volume is lwh, the surface area is 2(lw + lh + wh), and the space diagonal — the longest straight line inside the box, from one corner to the opposite corner — is √(l² + w² + h²). The space diagonal matters whenever a long object must fit inside a box, such as a ladder in a room or a rod in a shipping container.

This calculator returns five properties from the length, width, and height: volume, total surface area, space diagonal, base area, and base perimeter. Together they cover filling (volume), coating or wrapping (surface area), and fit (diagonal).

Why the Rectangular Prism Is Special

The rectangular prism is the shape of efficient packing. Because its faces are flat and meet at right angles, rectangular prisms tile space perfectly with no wasted gaps — which is exactly why boxes, bricks, cabinets, and shipping containers are rectangular. A cylinder or a sphere leaves unavoidable gaps when stacked, but boxes fit flush against one another and against walls. This packing efficiency is the reason global logistics runs on rectangular containers: the standard shipping container is a rectangular prism precisely because it uses the volume of a ship's hold almost completely. The rectangular prism is also the simplest solid to measure: three independent dimensions fully determine it, so its volume needs no constants, and its surface area is just twice the sum of three face areas. That simplicity makes it the reference solid against which other shapes are compared — the cube is the rectangular prism that minimizes surface area for a given volume, and every other box is a trade-off between packing and material.

How to Use

Enter the length, width, and height of the box. The order does not affect the volume or surface area — only the labeled dimension changes — but keep each value consistent with the dimension it represents. The calculator updates instantly.

Example 1: A shipping box. A carton measures 24 in × 18 in × 12 in. Volume = 24 × 18 × 12 = 5,184 cubic inches, which is exactly 3 cubic feet (since 12³ = 1,728 in³ per ft³). The surface area is 2(24×18 + 24×12 + 18×12) = 2(432 + 288 + 216) = 1,872 square inches, or 13 square feet of cardboard. The space diagonal is √(24² + 18² + 12²) = √(576 + 324 + 144) = √1,044 ≈ 32.3 inches — the longest item that fits corner to corner.

Example 2: A room. A room is 5 m long, 4 m wide, and 2.5 m tall. Volume = 5 × 4 × 2.5 = 50 cubic meters of air. The floor area (base) is 5 × 4 = 20 m², and the total surface area (all six faces, useful for estimating paint or insulation) is 2(20 + 12.5 + 10) = 85 m².

Example 3: An aquarium. A tank measures 60 cm × 30 cm × 35 cm. Volume = 60 × 30 × 35 = 63,000 cm³ = 63 liters. That is the water capacity before accounting for substrate and decorations, which typically displace 10-15%.

The Formula

All rectangular-prism properties derive from the length l, the width w, and the height h.

V=lwhV = l w h

The volume is the product of the three dimensions. It is the count of unit cubes that fill the box: a 2×3×4 box holds 24 unit cubes. Because it is a product, scaling any single dimension scales the volume proportionally; doubling all three multiplies the volume by eight.

SA=2(lw+lh+wh)SA = 2(lw + lh + wh)

The surface area is twice the sum of the three distinct face areas (lw, lh, and wh), since each face has an identical opposite. [khan-prism] It is the area of cardboard, paint, or insulation needed to cover the box completely.

d=l2+w2+h2d = \sqrt{l^{2} + w^{2} + h^{2}}

The space diagonal is the three-dimensional extension of the Pythagorean theorem: apply it twice, once across the base (giving √(l² + w²)) and once up the height. It is the longest straight line that fits inside the box.

Abase=lwA_{base} = l w

The base area is simply the floor of the box, and the base perimeter is 2(l + w) — the distance around the bottom edge.

hlw
A rectangular prism (cuboid) with length l, width w, and height h. The space diagonal runs from one corner to the opposite corner.

Reference Table

The table below shows how the dimensions, volume, surface area, and space diagonal relate for rectangular prisms of various sizes.

1111.006.001.73
23424.0052.005.39
33327.0054.005.20
54240.0076.006.71
1064240.00248.0012.33
201051,000.00700.0023.72
Rectangular-prism volume (cubic units) is the product of the three dimensions — a cube packs the most volume for a given surface area.

How the Rectangular Prism Compares to Other Solids

The rectangular prism is the reference solid for packing and for the comparison of surface efficiency. For a fixed volume, a cube — the rectangular prism with all sides equal — has the smallest possible surface area, and any other box exposes more material for the same capacity. A sphere does even better, enclosing the same volume with less surface than any box, but a sphere cannot be stacked without leaving gaps, so it loses on packing. That single trade-off explains most container design: bottles and cans are cylinders because they are cheap to make and strong under pressure, while cartons and shipping containers are rectangular prisms because they tile space efficiently with almost no wasted volume. The rectangular prism is also the solid against which every other shape's volume is intuitively measured, since its volume is just the count of unit cubes that fill it. A cylinder, a cone, and a sphere all require π because of their curved surfaces; the box needs no constant at all, which is why it is the first solid taught in school and the easiest to estimate by hand. [cuemath-cuboid]

Practical Tips

  • Order does not matter for volume. lwh = wlh = hwl. Label the dimensions for clarity, but any assignment gives the same volume and surface area.
  • Cubic conversion. 1 ft³ = 1,728 in³, 1 m³ = 1,000 L, and 1 L = 1,000 cm³. Convert the dimensions to a single unit before multiplying.
  • A cube minimizes surface area. Among all rectangular prisms of a given volume, the cube has the smallest surface area. This is why cube-shaped containers use less material per unit of capacity.
  • Diagonal for fit. Before buying a box for a long item, compare the item's length to the box's space diagonal, not just to its longest side.
  • Hollow vs solid. This calculator gives the outer solid volume. For a container's internal capacity, use the inner dimensions; for the material volume, subtract the inner from the outer.

Real-World Applications

Rectangular prisms appear wherever space is packed, stored, or shipped. [nist-measurement]

  • Shipping and packaging. Cartons, pallets, and containers are rectangular prisms because they tile space with almost no gaps. Volume sets the freight class and dimensional weight, while surface area sets the cardboard cost.
  • Construction and masonry. Bricks, concrete blocks, and pavers are rectangular prisms. Builders multiply the unit volume by the count to order material and estimate mortar.
  • Rooms and buildings. A room's air volume (length × width × height) drives HVAC sizing, and its wall area drives paint and insulation estimates.
  • Aquariums and tanks. The capacity of a rectangular tank is its inner volume, usually reported in liters or gallons; the glass area is its surface area.
  • Manufacturing and materials. Bars, ingots, and slabs are rectangular prisms whose volume converts to weight through the material's density, a standard step in quoting metal and lumber.

Limitations

The formulas assume a perfect rectangular prism with right angles at every corner and flat, rigid faces. Real boxes bulge, sag, and have flaps and seams that add material; a corrugated carton's true capacity is slightly less than the nominal inner dimensions suggest. The space diagonal is the theoretical longest line inside the box but ignores the thickness of the item; a rigid rod slightly shorter than the diagonal may still not fit through the opening. As always, unit conversion is manual: enter all three dimensions in the same unit.

Frequently Asked Questions

❓ How do I calculate the volume of a rectangular prism?
✅ Multiply the three dimensions: V = l × w × h. A box measuring 2 × 3 × 4 has a volume of 24 cubic units.
❓ What is the surface area of a rectangular prism?
✅ SA = 2(lw + lh + wh), which is twice the sum of the three distinct face areas. For a 2×3×4 box, SA = 2(6 + 8 + 12) = 52 square units.
❓ What is the space diagonal of a box?
✅ The space diagonal is the longest straight line inside the box, from one corner to the opposite: d = √(l² + w² + h²). For a 2×3×4 box, d = √29 ≈ 5.39.
❓ How do I convert the volume to gallons or liters?
✅ Compute the volume in consistent units first, then convert. 1 cubic foot ≈ 7.48 US gallons; 1 cubic meter = 1,000 liters; 1 liter = 1,000 cubic centimeters.
❓ What is the difference between a rectangular prism and a cube?
✅ A cube is a special rectangular prism in which all three dimensions are equal (l = w = h). Every cube is a rectangular prism, but most rectangular prisms are not cubes.
❓ Why does a cube use less material than a long box of the same volume?
✅ For a fixed volume, the surface area is smallest when the shape is as close to a cube as possible. A long thin box of the same volume exposes much more surface, so it needs more material.

References

  1. [1]Weisstein, Eric W. "Cuboid." From MathWorld--A Wolfram Web Resource. Retrieved from https://mathworld.wolfram.com/Cuboid.html.
  2. [2]Wikipedia. "Cuboid." Retrieved from https://en.wikipedia.org/wiki/Cuboid.
  3. [3]Khan Academy. "Volume of Rectangular Prisms." Retrieved from https://www.khanacademy.org/math/geometry.
  4. [4]National Institute of Standards and Technology. "Geometric Measurement." Retrieved from https://www.nist.gov/pml.
  5. [5]LibreTexts Mathematics. "Geometry." Retrieved from https://math.libretexts.org/Bookshelves/Geometry.
  6. [6]Cuemath. "Rectangular Prism." Retrieved from https://www.cuemath.com/geometry/rectangular-prism/.

Last updated: October 16, 2026

1b

UnByte — Independent Software Engineering

Every calculator references authoritative sources — Editorial policy