Rectangular Prism Calculator

Formulas Used

V = L × W × H

SA = 2(LW + LH + WH)

d = √(L² + W² + H²)

Volume

24ft³

Cubic Yards

0.89yd³

Cubic Meters

0.68

US Gallons

180 gal

Liters

680 L

Cubic Inches

41,472in³

Surface Area

52ft²

(4.83m²)

Space Diagonal

5.39 ft (64.6 in)

Dimension Proportions

Length
4 ft
Width
3 ft
Height
2 ft

Surface Area Breakdown by Face Pair

Face PairDimensionsEach FacePair Total% of SA
Top & Bottom4 × 3 ft12 ft²24 ft²46.2%
Front & Back4 × 2 ft8 ft²16 ft²30.8%
Left & Right3 × 2 ft6 ft²12 ft²23.1%
Total52 ft²100%
Top & BottomFront & BackLeft & Right

Common Rectangular Box & Tank Sizes

ItemL × W × HVolumeSurface Area
Shoe box13 × 8 × 5 in520 in³ (0.30 ft³)418 in²
Small moving box16 × 12 × 12 in2,304 in³ (1.33 ft³)1,056 in²
Large moving box18 × 18 × 24 in7,776 in³ (4.50 ft³)2,592 in²
10-gal fish tank20 × 10 × 12 in2,400 in³ (1.39 ft³)1,120 in²
55-gal fish tank48 × 13 × 20 in12,480 in³ (7.22 ft³)4,688 in²
Raised garden bed (4 × 8)8 × 4 × 1 ft32 ft³ (1.19 yd³)88 ft²
20-ft shipping container19.3 × 7.7 × 7.8 ft1,159 ft³ (42.9 yd³)719 ft²

How to Use This Calculator

  1. 1.Select your measurement unit (feet, inches, yards, meters, or centimeters) from the dropdown at the top.
  2. 2.Enter the lengthof your box, tank, or rectangular space — measure the longest horizontal edge.
  3. 3.Enter the width— measure the shorter horizontal edge perpendicular to the length.
  4. 4.Enter the height— measure the vertical distance from bottom to top.
  5. 5.Read the results instantly: volume in cubic feet, cubic yards, gallons, liters, and cubic inches, plus surface area and space diagonal.

Rate this calculator

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.

Rectangular prism calculator illustration showing a 3D box with labeled length, width, and height dimensions and unit conversion icons for cubic feet, gallons, and liters

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

ObjectTypical DimensionsVolumeSurface Area
Shoe box13 × 8 × 5 in520 in³418 in²
Small moving box16 × 12 × 12 in2,304 in³1,056 in²
Large moving box18 × 18 × 24 in7,776 in³2,592 in²
Raised bed (4×8)8 × 4 × 1 ft32 ft³88 ft²
55-gal aquarium48 × 13 × 20 in7.22 ft³4,688 in²
20-ft shipping container19.3 × 7.7 × 7.8 ft1,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:

FromToMultiply by
Cubic feetCubic inches1,728
Cubic feetCubic yards0.03704 (or ÷ 27)
Cubic feetUS gallons7.48052
Cubic feetLiters28.3168
Cubic feetCubic meters0.0283168
Cubic inchesCubic feet0.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.
Marko Šinko
Marko ŠinkoCo-Founder & Lead Developer

Croatian developer with a Computer Science degree from University of Zagreb and expertise in advanced algorithms. Co-founder of award-winning projects, Marko ensures precise mathematical computations and reliable calculator tools across HomeCalcHub.

Last updated: April 7, 2026LinkedIn

Frequently Asked Questions

Related Calculators