Rectangular Prism Calculator: Volume, Surface Area, and Diagonal for Boxes and Tanks
A rectangular prism calculator lets you find the volume, surface area, and space diagonal of any box-shaped object in seconds. Whether you're sizing a fish tank, estimating soil for a raised garden bed, or figuring out how much wrapping paper you need for a gift box, this tool does the math so you don't have to. Below, we break down every formula with real-world examples you can apply right away.

What Is a Rectangular Prism?
A rectangular prism is a 3D shape with six flat rectangular faces, eight vertices, and twelve edges. Every opposite face is identical. You probably know it as a "box" or "cuboid." Shipping containers, rooms, aquariums, storage totes, and raised garden beds are all rectangular prisms. A cube is a special case where length, width, and height are all equal.
The three key measurements are length (L), width (W), and height (H). Once you know these three numbers, you can calculate volume, surface area, and the longest diagonal inside the box.
Volume Formula and Worked Examples
The volume of a rectangular prism is the simplest 3D formula:
V = Length × Width × Height
Example 1 — Raised garden bed:You're building an 8 × 4 × 1.5 foot raised bed. The volume is 8 × 4 × 1.5 = 48 cubic feet. Divide by 27 to get 1.78 cubic yards — that's how much soil to order. At $35-50 per cubic yard for garden soil, expect to spend $62-89.
Example 2 — Fish tank:A 55-gallon aquarium measures 48 × 13 × 20 inches. Volume = 48 × 13 × 20 = 12,480 cubic inches. Divide by 1,728 to get 7.22 cubic feet, then multiply by 7.48 to confirm approximately 54 gallons of water capacity.
Example 3 — Shipping container:A standard 20-foot container is 19.3 × 7.7 × 7.8 feet inside. Volume = 19.3 × 7.7 × 7.8 = 1,159 cubic feet (about 43 cubic yards). For a general volume calculator that handles multiple 3D shapes, try our volume calculator.
Surface Area Formula Step by Step
Surface area is the total material needed to cover every face of the box:
SA = 2(LW + LH + WH)
This adds the area of all three unique face pairs and doubles the sum. For a 4 × 3 × 2 foot box:
- Top & bottom: 4 × 3 = 12 ft² each (24 ft² pair)
- Front & back: 4 × 2 = 8 ft² each (16 ft² pair)
- Left & right: 3 × 2 = 6 ft² each (12 ft² pair)
- Total: 24 + 16 + 12 = 52 ft²
Surface area matters for wrapping, painting, insulating, or lining the inside of a container. A 12 × 8 × 4 inch gift box has a surface area of 352 square inches — add 10-15% for overlap when cutting wrapping paper.
Space Diagonal Formula
The space diagonal is the longest straight line inside the box, running from one corner to the opposite corner:
d = √(L² + W² + H²)
For a 4 × 3 × 2 foot box: d = √(16 + 9 + 4) = √29 ≈ 5.39 feet. This tells you the longest object (like a rod, pipe, or pool cue) that fits diagonally inside. A 48 × 13 × 20 inch aquarium stand has a diagonal of about 54.2 inches — useful when checking if it fits through doorways at an angle.
Common Rectangular Prism Sizes
| Object | Typical Dimensions | Volume | Surface Area |
|---|---|---|---|
| Shoe box | 13 × 8 × 5 in | 520 in³ | 418 in² |
| Small moving box | 16 × 12 × 12 in | 2,304 in³ | 1,056 in² |
| Large moving box | 18 × 18 × 24 in | 7,776 in³ | 2,592 in² |
| Raised bed (4×8) | 8 × 4 × 1 ft | 32 ft³ | 88 ft² |
| 55-gal aquarium | 48 × 13 × 20 in | 7.22 ft³ | 4,688 in² |
| 20-ft shipping container | 19.3 × 7.7 × 7.8 ft | 1,159 ft³ | 719 ft² |
Volume Unit Conversions for Rectangular Prisms
Once you have volume in cubic feet, these conversion factors get you to any other unit:
| From | To | Multiply by |
|---|---|---|
| Cubic feet | Cubic inches | 1,728 |
| Cubic feet | Cubic yards | 0.03704 (or ÷ 27) |
| Cubic feet | US gallons | 7.48052 |
| Cubic feet | Liters | 28.3168 |
| Cubic feet | Cubic meters | 0.0283168 |
| Cubic inches | Cubic feet | 0.000579 (or ÷ 1,728) |
For quick cubic yard conversions — especially when ordering concrete, gravel, or mulch — use our cubic yard calculator.
Practical Applications: Tanks, Boxes, and Garden Beds
Water tanks and aquariums:Multiply volume in cubic feet by 7.48 to get US gallons. A 3 × 2 × 2 foot rectangular tank holds 12 cubic feet or about 89.8 gallons. Always subtract 10% for equipment displacement inside the tank.
Raised garden beds:A 4 × 8 × 1 foot bed needs 32 cubic feet (1.19 cubic yards) of soil mix. Add 15% extra because soil compacts over the first few weeks, bringing the real order to about 1.37 cubic yards.
Shipping and moving:A standard large moving box (18 × 18 × 24 inches) holds 4.5 cubic feet. A 10-foot moving truck has roughly 400 cubic feet of cargo space — so you can fit about 88 large boxes if stacked perfectly. In practice, plan for 60-70% packing efficiency (about 55-60 boxes) due to irregular items.
Concrete and fill: A rectangular footer trench 20 feet long, 2 feet wide, and 1 foot deep needs 40 cubic feet of concrete (1.48 cubic yards). For converting different units, try our cubic feet calculator for boxes, rooms, and material estimates.
Common Mistakes to Avoid
- Mixing units:Entering length in feet and width in inches is the most common error. A 4-foot × 36-inch × 2-foot box is NOT 288 cubic feet — convert 36 inches to 3 feet first for 4 × 3 × 2 = 24 cubic feet. The wrong calculation is off by 12×.
- Confusing surface area with volume:Surface area (ft²) measures the outside skin of the box. Volume (ft³) measures the space inside. Ordering 52 cubic feet of paint for a 52-square-foot surface would be a very expensive mistake.
- Forgetting wall thickness:Tank and container interior dimensions are smaller than exterior measurements. A tank with 0.25-inch walls loses half an inch on each dimension. For a 48 × 13 × 20 inch tank with 0.25-inch glass, the true interior is 47.5 × 12.5 × 19.75 inches — about 3% less volume.
- Not accounting for soil compaction: Fresh garden soil compacts 10-20% within weeks. Always order 15% more than the calculated volume to compensate.
Tips for Accurate Measurements
- Measure inside dimensions for capacity (how much a container holds) and outside dimensions for material coverage (how much paint or wrapping paper you need).
- Measure in the smallest unit available(inches rather than feet) for small objects. Converting 18.5 inches to feet is more accurate than guessing "about 1.5 feet."
- Take three measurementsand average them if the object isn't perfectly rectangular. Many real-world containers have slight tapering or rounded corners.
- Add waste factors to material orders: 10-15% for soil (compaction), 10% for concrete (spillage and overfill), 15% for wrapping or liner material (overlaps and cutting waste).
- Double-check unit consistency — all three dimensions must be in the same unit before you multiply.
When to Use This Calculator
- Sizing a water tank or aquarium — enter interior dimensions to find exact gallon capacity before buying.
- Ordering soil, mulch, or gravel for a raised garden bed — calculate cubic yards needed to avoid over- or under-ordering.
- Estimating moving truck space — compare box volumes against truck capacity to plan how many trips you need.
- Calculating wrapping or lining material — use the surface area result to know exactly how much material to buy.
- Checking if a long item fits inside a box — the space diagonal tells you the longest object that fits diagonally.
