How to calculate trench volume
A trench is one cross-section repeated along a length. Get the section right and the rest is multiplication.
Last updated 29 September 2026The formula
Volume = Width × Depth × Length
All in feet, giving cubic feet. Convert the width from inches first: 24 inches is 2 feet.
Section = Depth × (Bottom width + Slope × Depth)
Slope is the horizontal distance per foot of depth on each side, the same on both sides. The top of the trench is then Bottom width + 2 × Slope × Depth wide.
A worked example, vertical walls
Suppose a run of 250 ft, 24 inches (2 ft) wide and 5 ft deep.
| Step | Working | Result |
|---|---|---|
| Section | 2 ft × 5 ft | 10.0 sq ft |
| Volume | 10.0 sq ft × 250 ft | 2,500 cu ft |
| Cubic yards | 2,500 ÷ 27 | 92.6 cu yd |
What laying the walls back does
The slope term is multiplied by the depth twice, so the volume grows quickly as the walls are laid back. The same trench as above, at different side slopes:
| Side slope (horizontal per foot of depth) | Top width | Section | Volume for the run | Times the vertical trench |
|---|---|---|---|---|
| Vertical | 2.0 ft | 10.0 sq ft | 92.6 cu yd | 1.00× |
| 0.5 | 7.0 ft | 22.5 sq ft | 208.3 cu yd | 2.25× |
| 0.75 | 9.5 ft | 28.8 sq ft | 266.2 cu yd | 2.88× |
| 1 | 12.0 ft | 35.0 sq ft | 324.1 cu yd | 3.50× |
| 1.5 | 17.0 ft | 47.5 sq ft | 439.8 cu yd | 4.75× |
At a slope of 1, the section is 35.0 sq ft against 10.0 for the vertical trench, and the run comes to 324.1 cubic yards instead of 92.6. Those slopes are inputs to show the effect. Which slope, or whether the walls must be sloped, benched or supported at all, depends on the soil and the depth and is a safety decision for the competent person on site. OSHA’s excavation standard, 29 CFR 1926 Subpart P, is where that is set out; this page does not say which slope to use.
Spoil, backfill and the excavation are different numbers
- Excavation: the trench volume, measured in the ground (a bank volume).
- Spoil: what comes out, once it is loose. It is the excavation expanded by the swell factor. The factor belongs to your soil and moisture; bank vs loose cubic yards explains why.
- Backfill: what has to go back in, which is the excavation less the pipe and any imported bedding, in place.
For the vertical trench above, with a 12-inch pipe, a 6-inch bedding layer across the bottom width, and a swell of 25% (all three are example inputs):
| Quantity | Working | Result |
|---|---|---|
| Pipe | π × 1² ÷ 4 × 250 ft | 196 cu ft |
| Bedding | 2 ft × 0.5 ft × 250 ft | 250 cu ft |
| Backfill | 2,500 − 196 − 250 | 2,054 cu ft = 76.1 cu yd |
| Spoil | 92.6 cu yd × 1.25 | 115.7 cu yd |
Bedding is imported material, so it is bought as well as dug. The spoil is what the trucks carry away if none of it is reused.
When the depth changes along the run
For vertical walls the section is proportional to depth, so an average depth gives the right volume. With sloped walls it does not, because the section grows with the square of the depth. Take 100 ft at 4 ft deep followed by 100 ft at 6 ft deep, both 2 ft wide at the bottom with a slope of 1:
| Method | Working | Volume |
|---|---|---|
| Each length on its own | (24.0 + 48.0) sq ft × 100 ft | 7,200 cu ft |
| One average depth (5 ft) | 35.0 sq ft × 200 ft | 7,000 cu ft |
The average depth understates the volume by 200 cu ft here (2.8%). Split a run into lengths of similar depth and add them; the trench volume calculator does not model a continuously varying depth for the same reason.
What this leaves out
- Manholes, chambers, thrust blocks and bell holes, which are extra excavation.
- Ground that is not level along the run: the depth changes, so split the run.
- Over-excavation for shoring, working space, or a trench box: measure the actual width dug.
- Any price. The calculators here take the rate from you.
- 29 CFR 1926 Subpart P — Excavations — Occupational Safety and Health Administration
- Trench section, pipe, bedding, spoil and backfill are defined by the formulas above — Arithmetic — verifiable by hand; recomputed from the trench calculator’s own section function
Put it to work
All earthwork calculators →Enter your own section, slope, pipe and swell and get the excavation, spoil and backfill separately.