How to read the result
- Volume to dig (bank volume): the earth as it lies in the ground, before it is dug. It is the length times the width times the depth when the sides are vertical.
- Pipe and bedding: the pipe takes the place of soil, and so does the bedding sand or gravel around it. The bedding zone runs from the floor of the trench up to the top of the pipe plus the cover you enter. For the 100 ft trench the pipe is 1.29 yd³ and the bedding is 11.05 yd³ in place. Order a little more for waste and compaction.
- Native soil to put back: the rest of the trench above the bedding, 17.28 yd³ here. It is taken as the volume it came out of: the page makes no allowance for compaction or settling.
- Soil left over (loose volume): the pipe and the bedding together are 12.35 yd³ of soil that has no trench to go back to. Once dug, dry packed earth swells 25.0%, so it is 15.43 yd³ to haul, which is 2 loads in a 14 yd³ truck.
- Sloped sides: a side slope of 1 means the wall moves out 1 foot for each 1 foot of depth, so the trench is wider at the top than at the bottom. The page shows the width at the top and the extra volume that the slope adds.
- What this page does not decide: the page works out quantities only. It does not classify the soil, choose a safe side slope, or decide on shoring, a trench box or other protection, and it does not choose the pipe bedding. That is the job of the competent person on site, your engineer, the pipe maker and the rules that apply where you work. In the US the trench rules are OSHA 29 CFR 1926 Subpart P. The reference table below shows OSHA’s maximum slopes for orientation only. For a pit or a round hole, use the Excavation Calculator.
For a pit, a foundation or a round hole, or the truck loads of a whole dig, use the Excavation Calculator. To find how much the pipe itself holds, use the Pipe Volume Calculator. This page gives quantities only: the side slope, shoring, trench box and soil class for the trench come from the competent person on site and the rules that apply, and the bedding thickness comes from your pipe maker or engineer.
Worked example
A trench 100 ft long, 2 ft wide at the bottom and 4 ft deep, with 8 in pipe, 6 in of bedding under it and 6 in of cover over it, in dry packed earth, with a 14 yd³ truck (your own pipe, bedding and truck go here).
- Volume with vertical sides = 100 × 2 × 4 = 800 ft³ = 800 ÷ 27 = 29.63 yd³ (22.65 m³)
- Pipe = 100 ft × π ÷ 4 × (8 in ÷ 12)² = 1.29 yd³ (0.99 m³)
- Bedding zone = 6 in + 8 in + 6 in = 1.667 ft high. Bedding = the zone (100 × 2 × 1.667 ft) minus the pipe = 11.05 yd³ (8.45 m³)
- Native soil put back = the trench minus the bedding zone = 17.28 yd³ (13.21 m³)
- Soil left over = pipe + bedding = 12.35 yd³ in the ground. Loose volume = × (1 + 25.0% swell) = 15.43 yd³ (11.80 m³)
- Truck loads = 15.43 yd³ ÷ 14 yd³ = 2 loads (rounded up)
If the sides are cut back at 1 horizontal to 1 vertical, the top of the trench is 10.00 ft wide. The volume is L × (W·D + z·D²) = 100 × (2 × 4 + 1 × 4²) = 2,400 ft³ = 88.89 yd³ (67.96 m³).
With no pipe and no bedding the whole trench is dug and put back, and nothing is left over: 29.63 yd³ to dig and 29.63 yd³ of soil back, 0.00 yd³ to haul. In natural-bed clay (swell 22.0%) the leftover soil swells to 15.06 yd³ instead of 15.43 yd³.
These are the same numbers the calculator shows when it first loads (vertical sides).
Method and formulas
Cross-section area up to height h: A(h) = w·h + z·h² · Volume of the trench = L × A(D) · Width at the top = w + 2·z·D
Pipe = L × π/4 × OD² · Bedding zone height hb = bedding under + OD + cover over · Bedding in place = L × (A(hb) − π/4 × OD²) · Native soil put back = L × (A(D) − A(hb))
Soil left over (in the ground) = pipe + bedding · Loose volume = × (1 + swell) · Swell = 1 ÷ L.F. − 1 · Truck loads = loose volume ÷ truck load, rounded up · 1 yd³ = 27 ft³ = 0.7646 m³
- L, w, D
- Length of the run, width at the bottom, and depth
- z
- Side slope: horizontal distance for each 1 of depth (0 = vertical sides)
- OD
- Outside diameter of the pipe, including its wall
- L.F.
- Load factor: bank volume ÷ loose volume, from the Caterpillar table
Assumptions and limits
- A straight trench of one width, depth and side slope along the whole run, with a flat floor; you enter the size at the bottom.
- One pipe or duct laid on the centre line; bedding fills the trench from the floor up to the pipe top plus the cover you enter, across the full trench width at each height.
- Native soil goes back from the top of the bedding to the surface, and is taken as the same volume it came out of (no compaction or settling allowance).
- Soil left over to haul is the part of the trench taken up by the pipe and the bedding; swell comes from the handbook load factor of the chosen soil or your own percentage.
- A quantity helper, not a trench safety tool: it does not classify soil, choose a side slope, or decide on shoring, trench boxes or other protective systems. A competent person on site does that under the rules that apply (in the US, OSHA 29 CFR 1926 Subpart P).
- No pipe design: it does not size the pipe, choose the bedding class or thickness, or check cover for loads; use the pipe maker's installation guide or your engineer.
- One pipe, one bedding material, a straight run of constant size: no varying depth, benches, stepped sides, several pipes, manholes or pits, and no prices.
- Swell values are planning values; use your geotechnical report or hauler data when you have it. Compaction and settling of the native backfill are not included.
Reference tables
| Width at the bottom | 3 ft deep | 4 ft deep | 6 ft deep |
|---|---|---|---|
| 1 ft wide | 11.1 | 14.8 | 22.2 |
| 2 ft wide | 22.2 | 29.6 | 44.4 |
| 3 ft wide | 33.3 | 44.4 | 66.7 |
| 4 ft wide | 44.4 | 59.3 | 88.9 |
Source: Calculated with the EngiFormula trench engine (method v1.0). The area of a trench cross-section up to a height h is w·h + z·h² (a rectangle plus two triangles). 1 yd³ = 27 ft³, from the exact definitions 1 ft = 0.3048 m and 1 yd = 0.9144 m, NIST Special Publication 811 (2008 edition), Appendix B.
| Material | Load factor | Swell | Bank weight | Loose weight |
|---|---|---|---|---|
| Earth, Dry packed | 0.8 | 25.0% | 3,200 (1,900) | 2,550 (1,510) |
| Earth, Wet excavated | 0.79 | 26.6% | 3,400 (2,020) | 2,700 (1,600) |
| Earth, Loam | 0.81 | 23.5% | 2,600 (1,540) | 2,100 (1,250) |
| Clay, Natural bed | 0.82 | 22.0% | 3,400 (2,020) | 2,800 (1,660) |
| Clay and gravel, Dry | 0.85 | 17.6% | 2,800 (1,660) | 2,400 (1,420) |
| Sand and clay, Loose | 0.79 | 26.6% | 3,400 (2,020) | 2,700 (1,600) |
| Sand and gravel, Dry | 0.89 | 12.4% | 3,250 (1,930) | 2,900 (1,720) |
| Sand, Dry, loose | 0.89 | 12.4% | 2,700 (1,600) | 2,400 (1,420) |
Source: Caterpillar Performance Handbook, Edition 50 (form AEXQ3330, © 2021), Section 25 "Elements of Production", pages 25-2 and 25-3 (bank and loose volume, swell, load factor L.F. = 100% ÷ (100% + % swell)) and Tables section "Weight of Materials", page 27-6. Swell here is 1 ÷ L.F. − 1. The handbook says weight varies with moisture content, grain size, degree of compaction, etc.
| Soil or rock | Maximum slope (H : V) | Angle from horizontal |
|---|---|---|
| Stable rock | Vertical | 90° |
| Type A soil | 3/4 : 1 | 53° |
| Type B soil | 1 : 1 | 45° |
| Type C soil | 1 1/2 : 1 | 34° |
Source: U.S. Department of Labor, OSHA, 29 CFR Part 1926, Subpart P, Appendix B (sloping and benching), paragraphs B-1.1 to B-1.3, e-CFR current to 20 October 2026: maximum allowable slopes for simple slope excavations 20 feet or less in depth. Soil is classified by Appendix A. Reference only: this page does not classify soil or decide that a slope is allowed.
Common uses
A pipe, drain or sewer trench
Enter the length of the run, the bottom width and depth, then the pipe size and the bedding your pipe maker or engineer specifies. Read the bedding to order and the soil that goes back.
A cable or conduit trench
Enter the outside size of the duct as the pipe diameter, or set the pipe to 0 and use only the volume of the trench.
A footing trench
Set the pipe and bedding to 0 to get the volume to dig for a footing trench. For the concrete that goes in it, use the Concrete Footing Calculator.
Planning trucks and the spoil pile
The loose volume of the leftover soil is what the trucks carry away. Enter your truck size to see the loads.
Checking a quote
Compare the volume a contractor quotes with the bank volume here, and check whether their price is per bank yard or per loose yard.
Frequently asked questions
How do you calculate the volume of a trench?
Multiply the length of the run by the width at the bottom and the depth, then divide by 27 to get cubic yards. For a 100 ft trench 2 ft wide and 4 ft deep that is 800 ft³, or 29.63 yd³. If the sides slope, add the volume the slope adds, as shown in the Method section.
How do sloped sides change the trench volume?
Sloped sides make the trench wider at the top, so the volume is larger than the vertical-sided volume for the same bottom width. The average width is the bottom width plus the side slope times the depth. The 100 ft trench goes from 29.63 yd³ to 88.89 yd³ at 1 horizontal to 1 vertical, and the top becomes 10.00 ft wide.
What is the difference between bank and loose volume of a trench?
Bank volume is the earth in the ground. Loose volume is the same earth after it has been dug, when it takes more room. Use bank volume for the size of the trench and loose volume for trucks and the pile. Check whether a price is per bank yard or per loose yard.
How much bedding do I need for a pipe trench?
Work out the bedding zone from the floor of the trench up to the top of the pipe plus the cover, take away the pipe, and multiply by the length. For the example trench that is 11.05 yd³. How thick the bedding must be, and what it is made of, comes from your pipe maker’s installation guide or your engineer, not from this page.
How much soil is left over after laying a pipe?
The pipe and the bedding take the place of soil, so that volume is left over. In the example it is 12.35 yd³ in the ground, and 15.43 yd³ once it has swelled, which is 2 loads in a 14 yd³ truck. The page puts the native soil back at the volume it came out of, with no allowance for compaction.
How deep can a trench be before it needs shoring?
This page cannot say. In the US, OSHA 29 CFR 1926 Subpart P sets the rules, and the competent person on site decides on sloping, benching, shoring or a trench box for the soil and the depth. OSHA’s Appendix B maximum slopes for excavations 20 feet or less deep are Type A 3/4 to 1, Type B 1 to 1 and Type C 1 1/2 to 1 (see the table above), for orientation only.
How wide should a trench be for a pipe?
The width is the designer’s or the pipe maker’s choice, and the page works from the width you enter. As an example, widening the 100 ft trench from 2 ft to 3 ft at the same depth takes the volume from 29.63 yd³ to 44.44 yd³.
Sources and references
- Caterpillar Inc., Caterpillar Performance Handbook, Edition 50 (form AEXQ3330, © 2021), Section 25 pages 25-2 and 25-3 (bank and loose volume, swell, load factor) and Tables section page 27-6 (weight of materials and load factors).
- U.S. Department of Labor, Occupational Safety and Health Administration, Excavations, 29 CFR Part 1926, Subpart P, Appendix B (maximum allowable slopes B-1.1 to B-1.3), e-CFR current to 20 October 2026. Reference only.
- NIST Special Publication 811, Guide for the Use of the International System of Units (SI), 2008 edition, Appendix B (exact values for the inch, foot and yard).
- Area of a trapezoid and volume of a prism, and of a cylinder (the pipe): solid geometry, as set out in the Method section above.
About this calculator
Scope and disclaimer
The volume of a straight trench with vertical or uniformly sloped sides, with one pipe laid in bedding: the pipe, the bedding, the native soil that goes back, the leftover soil after swell and its truck loads. Not a safety, soil classification, shoring, pipe design or cost tool.
This calculator gives information and preliminary estimates only. It is not professional design advice and does not replace the governing code, product instructions or a qualified professional's judgement for your project.