Formula and worked example
A constant-section trench consists of a bottom rectangle and two side triangles. Let b be bottom width, D vertical depth, L horizontal length and sL/sR horizontal run per unit vertical rise. Top width T = b + (sL + sR)D. Cross-section area A = bD + (sL + sR)D²/2 = (b + T)D/2. Bank volume = A × L. Loose volume = bank × (1 + swell/100).
Example: L = 100 ft, b = 2 ft, D = 3 ft and both slopes = 1H:1V. Each side runs 3 ft horizontally; top width = 8 ft. The bottom rectangle is 6 ft² and the two triangles total 9 ft², so A = 15 ft². Bank volume = 1,500 ft³ = 55.556 yd³. An illustrative 20% swell gives 1,800 ft³ = 66.667 loose yd³. Swell does not change the hole dimensions.
Metric and unequal slopes
For a 20 m trench with bottom width 1 m, depth 2 m, left slope 0.5H:1V and right slope 1.5H:1V, the side runs are 1 m and 3 m. Top width is 5 m; area is 6 m² and bank volume is 120 m³. A 25% swell gives 150 m³ loose. A zero ratio models a vertical face; both zero ratios reduce the formula to b × D × L.
Measure the intended envelope
Use horizontal length along the trench axis, bottom width including any planned working space and uniform vertical depth below a level surface. Left and right labels refer to the cross-section; exchanging them does not change volume. End faces are vertical in this model. It does not add end flares, corner overlaps, intersections, benches, changing ground elevations, overdig or occupied-volume deductions. Variable sections require a separate surveyed takeoff.
Scope and input limits
Length, bottom width and depth must be positive, from 0.000001 to 1,000,000 ft after conversion. Each H:V ratio is 0–10 and swell is 0–100%, with at most four decimal places. Top width is capped at 1,000,000 ft and bank volume at 1,000,000 m³. These are software limits, not allowable excavation dimensions or safety limits. Calculations use exact decimal fractions before display rounding to three decimals. No purchase or truck-load rounding is applied.
The tool performs quantity geometry only. Enter slopes from a verified excavation plan. It does not classify soil, select safe slopes, design shoring or assess cave-in protection. It also does not calculate compacted backfill, pipe bedding, haul weight or project cost.
Sources and assumptions
OSHA Appendix B: sloping and benching defines the H:V slope convention and protective-system context. Caterpillar: swell and material states explains bank-to-loose expansion. These references support terminology; the trapezoid derivation and examples above are original geometric calculations. Neither source supplies a project-specific safe slope or swell value for this tool. Sources checked 4 November 2026.
Related calculators
For a rectangular pit with uniform clearance, use the Excavation Calculator. Convert quantities with the Cubic Yard Calculator, or estimate footing concrete separately with the Concrete Footing Calculator.