HomeGeometry › Rectangular Prism Calculator

Rectangular Prism Calculator

Computes the volume, total surface area, space diagonal and total edge length of a rectangular prism (cuboid or box) from its length, width and height.

When to use

You need the capacity, surface or longest internal dimension of a box, room, aquarium, container or any cuboid.

Do not use when: The base is not a rectangle (use cylinder or pyramid) or you only need the floor area (use rectangle).

Formula

volume = length · width · height; surface_area = 2 · (length·width + length·height + width·height); space_diagonal = √(length² + width² + height²); total_edge_length = 4 · (length + width + height)

Inputs

ParameterTypeUnitRequiredDescription
lengthnumberunitsyesLength of the base. Range: > 0
widthnumberunitsyesWidth of the base. Range: > 0
heightnumberunitsyesHeight of the prism. Range: > 0

Outputs

OutputTypeUnitDescription
volumenumberunits³length × width × height.
surface_areanumberunits²2 × (length×width + length×height + width×height).
space_diagonalnumberunits√(length² + width² + height²), the longest straight line inside the box.
total_edge_lengthnumberunits4 × (length + width + height).

Example

3 × 4 × 12: {"length":3,"width":4,"height":12}{"volume":144,"surface_area":192,"space_diagonal":13,"total_edge_length":76}

2 × 3 × 4: {"length":2,"width":3,"height":4}{"volume":24,"surface_area":52,"space_diagonal":5.3852,"total_edge_length":36}

GET https://tttkmbb.com/api/v1/calculate/rectangular-prism?length=3&width=4&height=12

Machine access

Sources

FAQ

How do I use it for a cube?

Enter the same value for all three sides: volume = side³, surface area = 6 × side², space diagonal = side × √3.

Will a rod of a given length fit in the box?

Only if it is no longer than the space diagonal (ignoring the rod's thickness).

Related calculators