The volume of a rectangle is really the volume of a rectangular prism (a box), because a flat rectangle has area, not volume. Multiply length x width x height, using one unit: V = L x W x H. For example, a 5 cm x 3 cm x 4 cm box holds 60 cubic centimeters, or 60 mL.

Many people search for this formula when they actually have a box, a tank, a room or a raised bed in front of them. So this guide treats the question the way a math teacher would. First, it explains why a 2D rectangle cannot hold anything. Next, it shows the rectangular prism formula, works through real examples in inches, feet and centimeters, and finally converts the answer into gallons and liters.
In short: a rectangle has two dimensions, so you measure its area in square units. Add a third dimension (height or depth) and the shape becomes a box. That box has volume, measured in cubic units.
The formula itself comes straight from geometry. For instance, Wolfram MathWorld defines a cuboid as a closed box with three pairs of rectangular faces at right angles, with volume V = abc. Similarly, NIST lists the exact factors for turning cubic inches and cubic feet into metric units in its SI guide (Appendix B.9), which this page uses for every conversion.
If you need cubic feet for a real project, such as a moving truck or a pile of mulch, our guide on how to calculate cubic volume in feet goes deeper into practical jobs. This page, by contrast, stays on the rectangular prism formula itself.
Convert Your Box Volume to Liters and Gallons
First multiply your three measurements in centimeters. Then type the result (in cubic centimeters) below. The converter shows the same volume in milliliters, liters, US gallons, quarts and cups. Because 1 cubic centimeter equals exactly 1 mL, the first two rows always match.
Working in inches instead? Then multiply length x width x height to get cubic inches and divide by 231, since one US gallon is defined as exactly 231 cubic inches.
Recommended Tools for Measuring a Box or Tank
Above all, good measurements matter more than the math. A tape measure covers rooms, beds and tanks, while a laser measure helps with long or awkward spans. For small boxes and parts, a steel ruler or a digital caliper reads to a fraction of a millimeter. These picks come from established brands and are based on manufacturer specs and buyer reports.
As an Amazon Associate, Measuring Expert earns from qualifying purchases.
Key Takeaways
- A flat rectangle has area (L x W) in square units; it has no volume.
- A rectangular prism, or box, has volume: V = L x W x H in cubic units.
- All three measurements must use the same unit before you multiply.
- 1 cm3 = 1 mL, 1,000 cm3 = 1 L, and 231 in3 = 1 US gallon exactly.
- 1 cubic foot = 1,728 cubic inches, which is about 7.48 US gallons.
- Doubling every side multiplies the volume by 8, not by 2.
- Measure inside dimensions for capacity and outside dimensions for shipping.
Why a Flat Rectangle Has No Volume
A rectangle is a flat, two-dimensional shape. It has four right angles, and its opposite sides are equal and parallel. Because it only has length and width, it covers a surface but encloses no space. As a result, the right question for a flat rectangle is “what is its area?” The answer is length x width, given in square units such as square inches or square meters.
A rectangular prism, on the other hand, is a solid with six rectangular faces. For example, shoe boxes, bricks, fish tanks, rooms and shipping cartons are all rectangular prisms. Mathematicians also call this shape a cuboid or a rectangular parallelepiped. When someone asks for the volume of a rectangle, this 3D box is almost always what they mean.
| Feature | Rectangle (2D) | Rectangular prism (3D) |
|---|---|---|
| Dimensions | Length, width | Length, width, height |
| What you can calculate | Area and perimeter | Volume and surface area |
| Formula | A = L x W | V = L x W x H |
| Units | Square (in2, ft2, cm2, m2) | Cubic (in3, ft3, cm3, m3) |
| 5 x 3 cm example | 15 cm2 of area | Needs a height: x 4 cm = 60 cm3 |
| Real-life examples | Sheet of paper, floor plan, door face | Box, brick, aquarium, room |
The Volume of a Rectangle Formula (Rectangular Prism)
V = L x W x H
Here, L is the length, W is the width, and H is the height (or depth). Another way to read the formula is “base area x height.” The bottom face is a rectangle with area L x W. Next, you stack that layer up through the height H. So the formula simply counts how many unit cubes fit inside the box.
For example, a box that is 5 cm long and 3 cm wide has a base of 15 square centimeters. In other words, one layer holds 15 one-centimeter cubes. If the box is 4 cm tall, it holds four layers, so 4 x 15 = 60 cubes, or 60 cubic centimeters. In addition, the order of multiplication does not matter: 3 x 4 x 5 gives the same 60.
A cube is the special case where all three sides are equal, so V = s x s x s. For instance, a cube with 1-foot sides holds 12 x 12 x 12 = 1,728 cubic inches.
How to Calculate the Volume of a Rectangle Step by Step
- Confirm the shape. Check that every corner is a right angle and that opposite faces match. If the sides taper or curve, this formula does not apply.
- Measure the length. Run the tape along the longest side and note the reading.
- Find the width. Measure across the base at a right angle to the length.
- Measure the height. Go straight up from the base to the top, or to the fill line for a tank.
- Convert to one unit. Change feet to inches, or millimeters to centimeters, before you multiply.
- Multiply the three numbers. Work out L x W x H, or enter the result in the converter above.
- Label the answer in cubic units. Write in3, ft3, cm3 or m3, then convert to gallons or liters if you need capacity.
Volume of a Rectangle Examples, Worked Out
Next, the examples below use real objects. Each one shows the multiplication first and then a useful conversion.
Volume of a rectangle in centimeters
A box measures 5 cm x 3 cm x 4 cm. So V = 5 x 3 x 4 = 60 cm3. Because 1 cm3 equals 1 mL, the box holds 60 mL, about 2 US fluid ounces.
Volume of a rectangle in inches: an aquarium
A tank is 24 in long, 12 in wide and 16 in tall. First, 24 x 12 x 16 = 4,608 in3. Next, divide by 231 to get about 19.95 US gallons, or about 75.5 liters. That is why this size is sold as a “20-gallon” tank, even though you fill it a little below the rim.
Room in feet
A bedroom is 12 ft x 10 ft with an 8 ft ceiling. Thus V = 12 x 10 x 8 = 960 ft3, which is about 27.2 cubic meters. As a result, heating and air-flow sizing often starts from this number.
Mixed units: feet and inches
A planter box is 2 ft long, 18 in wide and 6 in deep. Instead of mixing units, change 2 ft to 24 in. Then 24 x 18 x 6 = 2,592 in3. Finally, divide by 1,728 to get 1.5 cubic feet of soil.
Thin slab
A concrete pad is 10 ft x 10 ft and 4 in thick. Since 4 in is 1/3 ft, V = 10 x 10 x 1/3, or about 33.3 ft3. Dividing by 27 gives about 1.23 cubic yards. Our guide to the volume of a solid covers irregular objects that do not fit a box formula.
Cubic Units for the Volume of a Rectangle
A volume answer is only useful in the unit you need. Below are the exact relationships, rounded where noted. The cubic inch, foot and yard factors follow from 1 inch = 2.54 cm exactly.
| Cubic unit | Equals | Liquid equivalent |
|---|---|---|
| 1 cm3 | 1,000 mm3 | 1 mL exactly |
| 1,000 cm3 | 1 dm3 | 1 L exactly |
| 1 m3 | 1,000,000 cm3 | 1,000 L |
| 1 in3 | 16.387064 cm3 (exact) | about 16.39 mL |
| 231 in3 | about 3,785.41 cm3 | 1 US gallon exactly |
| 1 ft3 | 1,728 in3 | about 7.48 US gallons, 28.32 L |
| 1 yd3 | 27 ft3 | about 764.6 L |
For a wider tour of liters, gallons and cubic meters, see our explainer on why we measure volume in cubic units.
Finding a Missing Side From the Volume
Sometimes you know the volume and need one dimension instead. In that case, rearrange the formula: H = V / (L x W). Likewise, L = V / (W x H) and W = V / (L x H).
Suppose you want a 20-gallon tank with a 30 in x 12 in footprint. First, convert the target: 20 x 231 = 4,620 in3. Then divide by the base area of 360 in2. As a result, you need a water depth of about 12.8 inches.
Scaling works in a similar way. If you double every side of a box, the volume grows by 2 x 2 x 2 = 8. Doubling only one side, however, just doubles the volume. Consequently, the difference matters when you compare storage bins or shipping cartons that look only “a bit bigger.”
| Quantity | Formula | 24 x 12 x 16 in tank |
|---|---|---|
| Volume | L x W x H | 4,608 in3 |
| Surface area | 2(LW + WH + LH) | 1,728 in2 |
| Space diagonal | square root of (L2 + W2 + H2) | about 31.24 in |
| Base area | L x W | 288 in2 |
Do and Don’t for Box Volume
Do
- Convert all sides to one unit first.
- Measure inside walls when you need capacity.
- Write the result in cubic units.
- Check that corners are square.
- Round only at the very end.
Don’t
- Call a flat shape’s area its volume.
- Multiply feet by inches without converting.
- Use outside sizes for how much a tank holds.
- Apply a length factor to cubic units.
- Expect the formula to fit tapered bins.
Honest Limits of the Box Formula
The formula is exact for a perfect box, but real objects are rarely perfect. For one thing, walls have thickness. For instance, a glass tank with 1/4 in panes holds noticeably less than its outside size suggests. Moreover, few people fill a tank to the brim, and substrate or decorations take up space. Rounded corners on plastic bins also shave off a little volume.
Measurement error grows, too. Because you multiply three numbers, a small error in each side adds up. For example, if every side reads 1% long, the volume comes out about 3% high. In short, use the formula for a reliable estimate, and add a margin when you order materials.
When to Call a Professional
For homework, storage and hobby projects, this formula is all you need. Still, some jobs deserve an expert. If you are ordering ready-mix concrete, sizing a heating or cooling system, or calculating fuel or chemical tank capacity, ask a contractor, HVAC technician or engineer. Similarly, legal-for-trade volume measurements and tank calibration charts come from certified services.
Frequently Asked Questions
Does a rectangle have volume?
No. A rectangle is flat, so it only has area (length x width). A rectangular prism, or box, adds height and therefore has volume.
What is the formula for the volume of a rectangle?
For a rectangular prism, V = length x width x height. Use the same unit for all three sides and give the answer in cubic units.
What is the area of a rectangle?
Area equals length x width. For example, a 5 cm by 3 cm rectangle covers 15 square centimeters.
Is a rectangular prism the same as a cuboid?
Yes. Cuboid, rectangular prism, rectangular box and rectangular parallelepiped all name the same six-faced solid with right-angled corners.
How do I find the volume of a rectangle in gallons?
Measure the box in inches, multiply length x width x height, and divide by 231. For instance, 24 x 12 x 16 in is 4,608 cubic inches, or about 19.95 US gallons.
How do I convert cubic centimeters to liters?
Divide by 1,000. One liter is exactly 1,000 cubic centimeters, and 1 cubic centimeter is exactly 1 mL.
How many cubic inches are in a cubic foot?
There are 1,728 cubic inches in a cubic foot, because 12 x 12 x 12 = 1,728.
Can the volume of a rectangle use mixed units?
Not directly. Convert every side to the same unit first, such as all inches or all feet, and then multiply.
What happens to volume if I double each side?
The volume becomes 8 times larger, because 2 x 2 x 2 = 8. Doubling only one side doubles the volume.
How do I find the height if I know the volume?
Divide the volume by the base area: H = V / (L x W). For example, 4,620 cubic inches over a 30 x 12 in base gives about 12.8 inches.
Volume of a Rectangle: The Bottom Line
To sum up, a flat rectangle has area, while a box made of rectangles has volume. Multiply length x width x height in one unit, label the answer in cubic units, and then convert it to liters or gallons if you need capacity.
Finally, measure carefully, because errors in three sides compound. For irregular objects, switch to water displacement, and for big practical jobs in cubic feet or yards, use our cubic volume guide linked above.
