Boneyard Tools

Rectangular Prism Calculator

Enter the length, width and height of a rectangular prism (also called a box or cuboid) to get three results at once: volume from l times w times h, total surface area from 2 (lw + lh + wh), and the space diagonal from the square root of the squared sides. Decimals are welcome, and the numbers recalculate the instant you change any field.

How to use the rectangular prism calculator

  1. Enter the length of the box in the Length field; decimals such as 3.5 are fine.
  2. Fill in the Width and Height fields the same way.
  3. Read the Volume, Surface area and Space diagonal cards, which refresh as you type.
  4. Press Copy result to place all three values on your clipboard as plain text.
  5. If any dimension is left at zero or blank, a note reminds you that each side must be greater than zero.

Examples

Box of 3 by 4 by 5

length = 3, width = 4, height = 5
volume = 60, surface area = 94, space diagonal = 7.071068

Cube with side 2

length = 2, width = 2, height = 2
volume = 8, surface area = 24, space diagonal = 3.464102

Shipping carton 10 by 5 by 2

length = 10, width = 5, height = 2
volume = 100, surface area = 160, space diagonal = 11.357817

Frequently asked questions

What is a rectangular prism?

A rectangular prism, also called a cuboid or box, is a solid with six rectangular faces that meet at right angles. A cube is the special case where all three edges are equal.

What is the formula for the volume of a rectangular prism?

Volume equals length times width times height. For a box of 3 by 4 by 5 that is 3 times 4 times 5, which gives 60 cubic units.

How is the surface area calculated?

Surface area equals two times the sum of length times width, length times height, and width times height. For 3 by 4 by 5 that is 2 times (12 + 15 + 20), which is 94 square units, covering all six faces.

What is the space diagonal and how do I find it?

The space diagonal is the straight line from one corner to the opposite corner through the interior of the box. It equals the square root of length squared plus width squared plus height squared, so a 3 by 4 by 5 box has a diagonal of about 7.071068.

Does this work for a cube?

Yes. Set length, width and height to the same value and you get the cube results. A cube with side 2 returns a volume of 8, a surface area of 24 and a diagonal of about 3.464102.

What units does the calculator use?

It is unit-agnostic and just works with the numbers you type. If your sides are in centimeters, the volume is in cubic centimeters and the surface area in square centimeters; the diagonal comes out in the same linear unit as the sides.

Can I use decimals, and how are results rounded?

Yes, the fields accept decimals and step in tenths. Each result is rounded to at most six decimal places for display, which is why an irrational diagonal like the square root of 50 shows as 7.071068.

What happens if I enter zero or a negative dimension?

The calculator requires every side to be greater than zero. A zero, blank or negative value produces a short message that the dimension must be positive, since a real box cannot have a side of zero length.

Is anything I enter uploaded?

No. All three formulas run locally in your browser, so the dimensions you type stay on your device and the tool continues to work with no connection.

Learn more

Related tools