Home › Geometry › 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
| Parameter | Type | Unit | Required | Description |
|---|---|---|---|---|
length | number | units | yes | Length of the base. Range: > 0 |
width | number | units | yes | Width of the base. Range: > 0 |
height | number | units | yes | Height of the prism. Range: > 0 |
Outputs
| Output | Type | Unit | Description |
|---|---|---|---|
volume | number | units³ | length × width × height. |
surface_area | number | units² | 2 × (length×width + length×height + width×height). |
space_diagonal | number | units | √(length² + width² + height²), the longest straight line inside the box. |
total_edge_length | number | units | 4 × (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
- API:
GET https://tttkmbb.com/api/v1/calculate/rectangular-prism(query parameters) orPOSTwith a JSON body{"inputs": {...}} - Schema: https://tttkmbb.com/api/v1/calculators/rectangular-prism · Markdown: https://tttkmbb.com/geometry/rectangular-prism.md · JSON definition: https://tttkmbb.com/geometry/rectangular-prism.json
- MCP: server
https://tttkmbb.com/mcp, toolrun_calculator with calculator_id="rectangular-prism" - OpenAPI operationId:
calculate_rectangular_prism_properties - Freshness:
static. Authentication: none. Rate limit: fair use (see rate limits).
Sources
- Wikipedia – Cuboid (reference)
- Wolfram MathWorld – Cuboid (reference)
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
- Rectangle Calculator — Area and diagonal of one face.
- Volume Converter — Convert the volume to litres, gallons or cubic feet.
- Concrete Slab Calculator — Concrete needed for a rectangular slab of these dimensions.