Audited 05 Aug 2026·Last updated 28 Oct 2026·3 citations·Tier 2·0 uses

Rectangular Prism Calculator

Enter the length, width and height of a box to get its volume, its total surface area and the space diagonal from one corner to the opposite corner.

Rectangular Prism Calculator

Volume
144
The space the box encloses, length × width × height, in cubic units of the length you entered.
Surface area
192
Space diagonal
13

Background.

Most of the boxes in daily life are rectangular prisms: a shipping carton, a fish tank, a brick, a shoebox, a room. Three measurements describe each of them completely — length, width and height, meeting at right angles — and from those three come the answers people usually need: how much it holds, how much material covers it, and the longest straight line that fits inside.

Volume is the product of the three edges, so it is the number for capacity: how much water a tank takes, how much soil fills a raised bed, how much air a room holds. Measure in centimetres and the volume is in cubic centimetres, and every 1,000 of those is a litre. A 60 × 30 × 36 cm tank holds 64,800 cm³, or 64.8 litres, filled to the brim.

Surface area adds up the six faces, which come in three matching pairs. It answers covering questions — cardboard for a box, paint for a crate, insulation for a tank. Real jobs rarely need all six faces: a room's walls get painted but not its floor, a raised bed has no lid. Treat the figure as the total and subtract whatever you will not cover.

The space diagonal runs from one corner to the opposite corner through the middle of the box. It is the longest rod, pole or umbrella that will lie inside, and it comes from applying Pythagoras twice. The default 3 × 4 × 12 box shows this neatly: its base diagonal is 5 and its diagonal through the box is 13.

The shape is treated as solid, with exact right angles. No wall thickness is subtracted, so an inside capacity needs inside measurements.

What is rectangular prism calculator?

A rectangular prism, also called a cuboid or simply a box, is a solid with six rectangular faces in which every corner is a right angle. Opposite faces are identical, so the whole shape is fixed by three edge lengths: length, width and height. A cube is the special case with all three equal. Volume, surface area and the space diagonal all follow from those three numbers, in whatever unit the edges were measured.

How to use this calculator.

  1. Measure the three edges that meet at one corner and enter them as length, width and height. The order makes no difference to any of the results.
  2. Use the same unit for all three edges. The volume comes out in that unit cubed and the surface area in that unit squared, so centimetres give cm³ and cm².
  3. For capacity, measure the inside of the container rather than the outside, because no wall thickness is subtracted.
  4. To check whether a long item fits, compare its length with the space diagonal; if it is shorter and reasonably thin, it can lie corner to corner.

The formula.

V=lwh; SA=2(lw+lh+wh); d=√(l²+w²+h²)

Volume V = l × w × h. Surface area SA = 2(lw + lh + wh): the three products are the areas of the three different faces, and each face has an identical partner opposite it. The space diagonal d = √(l² + w² + h²) comes from Pythagoras applied twice — first across the base to get √(l² + w²), then from that base diagonal up to the far top corner. The three results respond differently to scale. Doubling every edge multiplies the volume by 8, the surface area by 4 and the diagonal by 2, which is why a large tank needs less surface per litre than a small one of the same proportions. For a fixed volume, the cube has the smallest surface area of any rectangular box. Each edge must be greater than zero and no more than 1,000,000 units.

A worked example.

Example

The default box measures 3 × 4 × 12. Its volume is 3 × 4 × 12 = 144 cubic units. For the surface area, the three different faces are 3 × 4 = 12, 3 × 12 = 36 and 4 × 12 = 48 square units; together they make 96, and doubling for the matching opposite faces gives 192 square units. The diagonal takes two Pythagorean steps: across the 3 × 4 base, √(9 + 16) = 5, then up the 12-unit height, √(25 + 144) = √169 = 13. In feet, that is 144 cubic feet of storage clad in 192 square feet of panel, and a 13-foot pole would just fit corner to corner. Double every edge and the volume jumps to 1,152 while the surface area only reaches 768.

length3
width4
height12

Frequently asked questions.

How do I convert the volume of a box to litres or gallons?
From cubic centimetres, divide by 1,000 for litres: 64,800 cm³ is 64.8 litres. From cubic metres, multiply by 1,000. For US gallons, divide cubic inches by 231, the exact definition of the gallon, or multiply cubic feet by about 7.48.
How much wall area does a room have for painting?
The surface area here includes the floor and ceiling, so for walls alone use 2 × (length + width) × height. A 4 × 3 m room with a 2.5 m ceiling has 59 m² of total surface but only 35 m² of wall, before subtracting doors and windows.
Will a long object fit inside the box?
Compare its length with the space diagonal, the longest straight line inside. A 3 × 4 × 12 box has a diagonal of 13, so a 13-unit rod just fits corner to corner. A thick object needs some margin, because the diagonal assumes a line with no width.
Why does doubling the size of a box multiply its volume by eight?
Volume depends on all three edges, so doubling each one multiplies it by 2 × 2 × 2 = 8. Surface area depends on pairs of edges and rises fourfold, while the diagonal only doubles. The 3 × 4 × 12 box grows from 144 to 1,152 cubic units when every edge doubles.
What box shape holds the most for the least material?
For any fixed volume, the cube needs the least surface. A 1,000 cm³ cube of 10 cm sides has 600 cm² of surface, while a 5 × 10 × 20 cm box of the same volume needs 700 cm². Packaging departs from the cube for other reasons, such as stacking and handling.

How this page was produced

Published by
Quanta Calculator
Primary sources
3 cited below
Method
V=lwh; SA=2(lw+lh+wh); d=√(l²+w²+h²)
Published
Last verified

Built with AI assistance and verified by automated tests against the cited sources — every worked example on this page is computed by the same code that runs the calculator. How we build and check calculators.

In this category

Embed

Quanta Pro

Paid features are coming later.

  • All 1560 calculators remain free
  • No billing is enabled
Coming soon