Trench Excavation Volume Calculator (Vertical or Sloped)

Enter a trench length, bottom width and depth, choose vertical walls or an OSHA soil classification, and this calculator returns the excavated volume in cubic yards, the top width you have to keep clear, the bedding stone under the pipe, the backfill that goes back in, the swelled volume of the spoil pile, and how many truckloads leave the site. Sloping the walls for safety is what makes trench quantities counterintuitive: at 8 ft deep in Type C soil, laying the walls back multiplies the dirt you move sevenfold.

Calculator

This calculator runs in your browser. Enable JavaScript for live results — the inputs, formula and worked example below remain fully readable without it.

Inputs this calculator takes, with typical values
InputWhat to enterExample
Trench lengthRun of the trench along its centreline, measured between the ends of the excavation.60 ft
Bottom widthWidth at the bottom of the cut — usually bucket width, or pipe outside diameter plus working room each side.24 in
DepthExisting grade down to the trench bottom, including the bedding thickness below the pipe.5 ft
Wall treatment / soil classMaximum allowable slopes from OSHA 1926 Subpart P Appendix B. A competent person classifies the soil on site.OSHA Type C soil — 1½ : 1 (34°)
Pipe outside diameterOutside diameter, not nominal size — the volume the pipe displaces in the backfill. Enter 0 for a plain trench.8 in
Bedding stone below pipeCompacted stone under the barrel of the pipe. Follow the pipe maker's installation detail or the plan.4 in
Swell (bulking) factorHow much the soil expands once dug. Sand runs low, clay high, blasted rock highest.25 %
Bedding stone densityWashed #57 stone runs about 2,700 lb/yd³. Use your quarry's figure if you have it.2700 lb/yd³
Truck body capacityStruck body volume in loose measure. Check the legal weight limit too — wet clay fills a truck by weight first.12 yd³ (loose)

It returns

  • Excavated volume (bank measure) — In-place volume of the cut, before the soil swells.
  • Width at the top of the cut
  • Bedding stone volume
  • Bedding stone
  • Backfill required (in place)
  • Spoil pile, loose measure
  • Surplus to haul off, loose
  • Truckloads off site

The formula

V=LD(W+SD)27
Wtop=W+2SD
Vloose=V(1+s)

In plain text: V = L · D · (W + S·D) / 27

  • VExcavated volume, bank (in-place) measure (yd³)
  • LTrench length (ft)
  • DTrench depth (ft)
  • WBottom width (ft)
  • SSlope ratio: horizontal run per unit of vertical rise (ratio)

The cross-section is a trapezoid of bottom width W and top width W + 2SD, so its average width is W + SD. With vertical walls S = 0 and the formula collapses to L·D·W/27.

Updated Category Site Work, Excavation & Bulk Materials Verified against published test cases Reading time 12 min

Why trench volume is not just length times width times depth

A trench with vertical walls is a box, and its volume is trivial. Almost no trench over 5 ft deep is legally allowed to be a box. Under OSHA 29 CFR 1926.652, any excavation 5 ft or deeper needs a protective system unless it is cut entirely in stable rock, and the cheapest protective system on open ground is to lay the walls back at a safe angle. The moment you do that, the cross-section becomes a trapezoid and the volume starts growing with the square of the depth rather than in proportion to it.

That is the number that surprises estimators. Take a 100 ft trench with a 2 ft bottom. At 4 ft deep with vertical walls you move 29.6 yd³. Slope it back at 1½:1 for Type C soil and go to 6 ft, and you move 244.4 yd³ — more than eight times the dirt for one and a half times the depth. The excavation cost, the spoil handling, the surface you disturb and the pavement you replace all scale with that number, not with the pipe length.

This calculator does the trapezoid properly, then follows the material through the rest of its life: how much of it goes back in, how much extra room the pile takes once the soil has bulked up, and how many truck trips the surplus becomes.

The trapezoid, the slope ratio and the swell factor

The cross-section of a sloped trench is a trapezoid with bottom width W and top width W + 2SD, where S is the horizontal run per unit of vertical rise and D is the depth. Each wall sets back SD horizontally over the full depth, and there are two walls. The area of a trapezoid is the average of the two parallel sides times the height, so the average width is simply W + SD, and the volume is length × depth × average width.

The slope ratio comes from the OSHA soil classification. Appendix B of Subpart P sets maximum allowable slopes: stable rock may be vertical, Type A soil ¾:1 (53° from horizontal), Type B 1:1 (45°), and Type C 1½:1 (34°). Type C is the fallback: cohesionless granular soil, submerged soil, soil from which water is freely seeping, or any soil a competent person cannot confidently classify better. Note the direction of the ratio — 1½:1 means one and a half feet of horizontal run for every foot of depth, so a 10 ft deep Type C trench sets back 15 ft on each side.

The swell factor handles what happens after the bucket. Soil in the ground is at bank measure: consolidated, with its natural void ratio. Dug, it fragments and gains void space, so the same mass occupies more volume — loose measure. A 25% swell means 1 yd³ in the ground becomes 1.25 yd³ in the truck. Swell is why the pile always looks bigger than the hole, and why truck counts must be figured in loose measure and never in bank measure.

Backfill runs the other way. The volume that goes back in is the excavation minus the space the pipe occupies and minus the bedding stone. That is an in-place figure; because backfill is compacted as it goes in, the loose spoil you draw from the pile shrinks back to roughly its original bank volume as it is placed. What is left over — the space the pipe and the imported stone now occupy — is the surplus, and it leaves the site in loose measure.

Worked example: 100 ft of 12 in pipe, 5 ft deep, shielded

A 100 ft run of pipe with a 12 in outside diameter, laid on 6 in of #57 bedding stone in a 24 in wide trench 5 ft deep, cut vertically inside a trench box, with 25% swell and a 12 yd³ truck.

  1. Bottom width in feet. 24 ÷ 12 = 2.00 ft.
  2. Average width. Vertical walls, so S = 0 and the average width is just 2.00 ft.
  3. Excavated volume. 100 × 5 × 2 = 1,000 ft³ ÷ 27 = 37.04 yd³.
  4. Bedding stone. 100 × 2.00 × (6 ÷ 12) = 100 ft³ ÷ 27 = 3.70 yd³, which at 2,700 lb/yd³ is 3.70 × 1.35 = 5.00 tons.
  5. Pipe displacement. π × (1.0 ft)² ÷ 4 × 100 = 78.54 ft³ ÷ 27 = 2.91 yd³.
  6. Backfill required. 1,000 − 100 − 78.54 = 821.46 ft³ ÷ 27 = 30.42 yd³ in place.
  7. Loose spoil from the whole cut. 37.04 × 1.25 = 46.30 yd³.
  8. Surplus to haul. (37.04 − 30.42) × 1.25 = 6.61 × 1.25 = 8.27 yd³ loose.
  9. Truckloads. 8.27 ÷ 12 = 0.69 → one load.

Now change one thing. Take the trench box out and slope the walls for Type C soil at 1½:1. The average width becomes 2 + (1.5 × 5) = 9.5 ft, the excavated volume becomes 100 × 5 × 9.5 ÷ 27 = 175.9 yd³, and the cut is 2 + 15 = 17 ft wide at grade. That is 4.7 times the excavation and a 17 ft swath of surface to restore, in exchange for not renting a box. On a street or a driveway, the box wins easily; in an open field, sloping is usually cheaper.

Reading the numbers: top width, spoil room and truck counts

Look at the top width before you look at the volume. It is the number that tells you whether the job is even possible on the site you have. A 10 ft deep Type C trench with a 3 ft bottom opens to 3 + 30 = 33 ft at grade. If the easement is 20 ft wide, sloping is off the table and you are renting shoring or a shield, which changes both the price and the excavation quantity.

Next, check the loose spoil against the space beside the trench. OSHA requires spoil to be kept at least 2 ft back from the edge, and the pile itself has a natural angle of repose, so a 46 yd³ pile occupies a strip several feet wide along the whole run. If there is nowhere to put it, you are hauling everything off and importing backfill — a completely different cost structure that the surplus figure alone will not reveal.

Finally, treat the truckload count as a lower bound. Trucks fill by volume or by weight, whichever comes first, and saturated clay or wet sand reaches the legal axle weight long before the body is full. If the spoil is wet or heavy, ask the hauler what they can legally carry rather than assuming the struck body volume. For bedding stone pricing and delivery, run the tonnage through the gravel tonnage calculator; for a footing trench that will be filled with concrete rather than backfilled, the concrete footing calculator is the right tool.

OSHA maximum allowable slopes and what they cost you in volume

Maximum allowable slopes from 29 CFR 1926 Subpart P, Appendix B, Table B-1, with the excavated volume for 100 ft of trench on a 2 ft bottom at 8 ft deep. Volume = 100 × 8 × (2 + 8S) ÷ 27.
Soil classMax slope (H:V)Angle from horizontalSetback each side at 8 ftTop widthVolume per 100 ft
Stable rockVertical90°0 ft2.0 ft59.3 yd³
Type A¾ : 153°6.0 ft14.0 ft237.0 yd³
Type B1 : 145°8.0 ft18.0 ft296.3 yd³
Type C1½ : 134°12.0 ft26.0 ft414.8 yd³

Soil classification is made on site by a competent person under Appendix A of Subpart P. Shoring or a trench shield lets you keep the walls vertical and is often cheaper than the extra excavation and surface restoration sloping demands.

This is a quantity tool, not a protective-system design

Trench collapse kills people, and a cubic yard of soil weighs on the order of a ton and a half. Nothing here classifies your soil, designs shoring, or substitutes for the competent person that 29 CFR 1926 Subpart P requires on site. Slopes in this calculator are the maximum allowable values from Appendix B for simple slopes in excavations less than 20 ft deep; layered soils, adjacent surcharge loads, vibration from traffic, and any water in the trench all require flatter slopes or an engineered system.

Excavations deeper than 20 ft must have a protective system designed by a registered professional engineer. Anyone entering a trench 4 ft or deeper needs a means of egress within 25 ft of lateral travel, and every underground utility has to be located before you break ground.

Where trench quantities go wrong

  • Pricing a sloped trench as a box. The most expensive mistake in the list. At 8 ft deep in Type C soil the volume is seven times the vertical figure.
  • Reading the slope ratio backwards. 1½:1 is one and a half horizontal to one vertical — the flatter slope, not the steeper one.
  • Counting trucks in bank measure. Soil swells when it is dug. A 25% swell factor means one extra truck for every four.
  • Forgetting the pipe and the bedding displace backfill. They are imported material occupying space native soil used to fill, and that surplus has to leave.
  • Using nominal pipe size instead of outside diameter. A nominal 12 in ductile iron pipe has an outside diameter well over 13 in, and the bell is larger again.
  • Ignoring bell holes and structure excavation. Manholes, valve boxes and pipe bells all add volume that a straight prismatic calculation misses.
  • Assuming backfill compacts back to bank volume for free. It does approximately, but only with proper lifts and compaction. Poorly compacted backfill settles and the surface fails.

Related methods and when to use them instead

A straight prismatic trench of constant depth is the simplest earthwork problem there is. Two things break it. If the ground surface or the trench invert changes grade along the run, the depth is not constant, and the correct method is average end area: compute the cross-sectional area at each station, average adjacent pairs, and multiply by the station interval. The cut and fill earthwork calculator does exactly that, and it is the right tool for a sewer laid on grade over rolling ground.

The second thing that breaks it is anything non-linear: manholes, thrust blocks, pits, and bell holes. Those are structure excavations, quantified separately as boxes or cylinders and added to the trench total.

For quantities of stone rather than soil, the gravel calculator converts the bedding volume to tons and truckloads at your supplier's density. If the trench crosses a driveway you will have to restore, the asphalt tonnage calculator and the paver base calculator cover the two most common surface types.

Frequently asked questions

How many cubic yards is a 100 ft trench 2 ft wide and 4 ft deep?

29.63 cubic yards with vertical walls: 100 × 2 × 4 = 800 ft³, divided by 27. That figure is only legal if the trench is shored, shielded, or cut in stable rock — at 4 ft it is under the 5 ft threshold at which OSHA requires a protective system, so vertical walls are permissible here provided a competent person sees no hazard. Sloped at 1½:1 for Type C soil the same trench becomes 100 × 4 × (2 + 6) ÷ 27 = 118.5 yd³.

What is a swell factor and what value should I use?

Swell is the volume increase when soil is excavated, because digging breaks up the natural packing and adds void space. It is expressed as a percentage of bank volume. Common working figures are around 10–15% for sand and gravel, 20–30% for common earth and loam, 30–40% for clay, and 50% or more for blasted rock. Use it to size truck counts and stockpile space; never use bank volume for hauling.

Is a 1½:1 slope steeper or flatter than 1:1?

Flatter. The ratio is horizontal run to vertical rise, so 1½:1 lays back one and a half feet for every foot of depth, giving a 34° face, while 1:1 gives 45°. The flatter slope is required for the weaker soil — Type C — which is why Type C trenches cost so much more to dig. If you read the ratio the other way round you will underestimate both the excavation and the working width.

How wide should the bottom of a pipe trench be?

Wide enough for the pipe plus room to place and compact bedding under the haunches — commonly the outside diameter plus 6 to 12 in on each side, but the pipe manufacturer's installation guide or the project specification governs. Too narrow and you cannot compact under the springline, which is where a flexible pipe gets most of its support; too wide and the trench load on a rigid pipe increases. This calculator warns you if the clearance drops below 6 in a side.

Do I have to slope every trench?

No. Sloping is one of three options OSHA accepts, alongside shoring and shielding, and it is only required at 5 ft or deeper — or shallower if a competent person finds a cave-in hazard. Excavations entirely in stable rock may be vertical at any depth. On a street, in a narrow easement, or wherever surface restoration is expensive, a trench box is usually cheaper than the extra excavation, spoil handling and repaving that sloping brings.

Why is the spoil pile bigger than the hole?

Because excavation adds void space. Soil in place is compacted by everything that has sat on it since it was deposited; a bucketful is fragmented and loosely piled. That is the swell factor, and at a typical 25% it means a 100 yd³ excavation produces a 125 yd³ pile. When the same soil is put back and compacted, it returns to roughly its bank volume — which is why you can backfill the hole and still have material left over exactly equal to the space the pipe and imported stone now occupy.

Does this calculator handle a trench that changes depth along its length?

Not directly. It assumes constant depth and constant bottom width. For a trench on grade, either split it into segments of roughly constant depth and add the results, or use the average end area method, which is the standard approach for varying cross-sections. A quick approximation for a uniformly deepening trench is to use the average of the two end depths — but only when the walls are vertical, because with sloped walls the volume is quadratic in depth and averaging under-reports it.

How much does a cubic yard of excavated soil weigh?

Roughly 2,000–3,000 lb per loose cubic yard for most soils, with dry sand at the lower end and wet clay at the upper. That range matters because a 12 yd³ truck body full of wet clay can exceed the legal axle weight before it is full. Ask the hauler for their weight limit and compare it against the volume figure; whichever runs out first sets the number of trips.

Where does the 2 ft spoil setback come from?

From OSHA 29 CFR 1926.651, which requires excavated material and equipment to be kept at least 2 ft from the edge of an excavation, or retained by a restraining device. The reason is mechanical: a spoil pile at the lip is a surcharge load acting exactly where the soil is least supported, and it is a common contributing factor in wall failures. Remember to add that setback, plus the pile's own footprint, when you check whether the work fits in the available width.

References