Formula
Volume = length × width × depth for a rectangle, or π × (diameter ÷ 2)² × depth for a round area. The calculator converts every dimension to feet first (1 in = 1/12 ft, 1 yd = 3 ft, 1 m = 1 ÷ 0.3048 ft), so you can enter the area in feet and the depth in inches.
Cubic yards = cubic feet ÷ 27, because a cubic yard is 3 ft × 3 ft × 3 ft = 27 ft³ exactly. Several areas are added together, each multiplied by its quantity, and an optional percentage is added for waste or settling.
Worked example
A 10 ft × 10 ft bed filled 4 in deep: 10 × 10 × (4 ÷ 12) = 33.33 ft³, and 33.33 ÷ 27 = 1.23 yd³ (0.94 m³). At $45 per cubic yard that is about $55.56.
Bagged product is usually labeled in cubic feet. With 2 ft³ bags you need 33.33 ÷ 2 = 16.7, so buy 17 bags.
Ordering tips
Loose materials settle and compact, and ground is rarely perfectly level, so many suppliers suggest adding 5–10%. Bulk suppliers often sell in half- or quarter-yard steps, so round up to what they deliver.
For concrete, the concrete calculator also estimates bags from a mix's stated yield; for gravel, the gravel calculator converts volume to weight using the supplier's density.