How to use the trench calculator calculator
- 1
Arrange utility location first
Before any digging, follow the utility-location procedure that applies where you are. Marking buried services is a legal and safety step in most places, and it is not something a calculator can do for you.
- 2
Measure the run length
Measure along the centerline of the trench. Where the run turns a corner, measure each straight leg and treat them as separate trenches or add the lengths.
- 3
Enter the width and depth in their own units
Trench width is commonly given in inches while length is in feet, so each field has its own unit selector. Take the depth from your plan or the applicable requirements.
- 4
Set the trench count
If you are digging several identical runs, enter the count and the per-trench volume is multiplied for you.
- 5
Add an allowance and any pricing
Trench walls rarely stay vertical and soil bulks up once loosened, so add a percentage of your own. Enter a price per cubic yard for backfill material or haulage if you want a cost.
Formula
Trench cubic feet = length(ft) x width(ft) x depth(ft) x trench count
Convert inches to feet by dividing by 12. Divide the total cubic feet by 27 for cubic yards.
Worked example
A trench 100 feet long, 18 inches wide, and 30 inches deep
- 1Convert the width: 18 in / 12 = 1.5 ft.
- 2Convert the depth: 30 in / 12 = 2.5 ft.
- 3Find the volume: 100 ft x 1.5 ft x 2.5 ft = 375 cubic feet.
- 4Convert to cubic yards: 375 / 27 = 13.89 cubic yards.
The trench is about 13.89 cubic yards, or 375 cubic feet, of in-place material.
Worked examples
Two trenches at once
Two identical 50 foot runs, 24 inches wide and 36 inches deep
- 1One trench: 50 x 2 ft x 3 ft = 300 cubic feet.
- 2Two trenches: 300 x 2 = 600 cubic feet.
- 3Convert: 600 / 27 = 22.22 cubic yards.
The pair comes to 22.22 cubic yards. Entering the count is quicker and less error-prone than adding runs by hand.
Backfill is less than the excavation
The 375 cubic foot trench with a 6 inch bedding layer and a 4 inch pipe
- 1Trench volume: 375 cubic feet.
- 2Bedding layer: 100 ft x 1.5 ft x 0.5 ft = 75 cubic feet.
- 3Pipe displacement: pi x (0.1667 ft)^2 x 100 ft = 8.73 cubic feet.
- 4Backfill needed: 375 - 75 - 8.73 = 291 cubic feet, or 10.79 cubic yards.
The backfill is about 22 percent less than the excavation, because the bedding and the pipe already occupy part of the trench. The layer and pipe sizes here are figures entered for this example.
Excavation volume and backfill volume are different numbers
It is easy to assume one trench figure covers everything, but three related quantities come out of the same trench and they are all different.
The excavation volume is the geometric volume of the opening, which is what this calculator returns. The spoil volume, meaning the loose material that comes out and has to be stockpiled or hauled, is larger, because soil bulks up once it is disturbed. The backfill volume, meaning what goes back in, is smaller than the excavation, because the pipe, conduit, or cable in the trench occupies space, and so does any bedding or surround material placed around it.
The worked example above shows a trench where the backfill is about 22 percent less than the excavation once bedding and a pipe are accounted for. On a long run that difference is worth calculating rather than absorbing.
Why the width often costs more than expected
Trench volume scales with all three dimensions equally, but width is the one most often underestimated in practice, because the trench as dug is usually wider than the trench as planned.
A machine bucket has a fixed width, and the trench ends up at least that wide whatever the drawing says. Walls slough in loose soil. On a long run, a few extra inches of width across the whole length is a significant volume: adding 3 inches to a 100 foot trench 30 inches deep adds 62.5 cubic feet, over 2 cubic yards.
That is what the allowance field is for. Measure the trench as dug where you can, and where you cannot, be honest about the bucket width rather than the specification.
Trenches that change depth or turn corners
A drainage trench that falls along its length has a different depth at each end, so a single depth figure describes neither. Using the average of the two end depths gives the correct volume for a uniform slope, which is a useful shortcut worth knowing.
Where the depth changes in steps rather than smoothly, treat each stretch as its own trench and add the results. The count field handles identical runs, but different runs need separate calculations.
At corners, measuring each leg along the centerline avoids both double counting the corner and leaving it out. The same rule that applies to continuous footings applies here.
Common mistakes
Where trench estimates go wrong:
- Entering the width in feet when it was measured in inches, or vice versa.
- Using a single depth on a trench that falls along its length, instead of the average.
- Treating the excavation volume as the backfill volume, ignoring the pipe and bedding.
- Forgetting that loose spoil is bulkier than the in-place volume when arranging haulage.
- Working from the specified width rather than the width the bucket will actually cut.
- Measuring around the outside of a corner instead of along the centerline.
- Digging before arranging utility location.
Sources and methodology
Every figure on this page comes from geometry, not from a product or materials database. Areas use the standard area formulas, volumes are area multiplied by depth, cylinders use pi times the radius squared times the height, and unit conversions use exact factors: 12 inches to a foot, 27 cubic feet to a cubic yard, and 9 square feet to a square yard.
YardCalc publishes no material density, coverage rate, product dimension, soil swell factor, compaction factor, or price. Those vary by product, by supplier, by soil, and by region, and a figure that is right in one case is wrong in another, so the calculator asks you for the values that apply to your job. Weight estimates appear only when you supply a density.
Nothing here is engineering, safety, or code guidance. Results are planning estimates. Read how every value on the site is derived and checked in the YardCalc calculation methodology.
Trench volume examples by size
In-place volume for a range of trench dimensions. These sizes demonstrate the arithmetic and are not recommended dimensions: trench width and depth come from your plan and the applicable requirements.
| Trench size (L x W x D) | Cubic feet | Cubic yards |
|---|---|---|
| 50 ft x 12 in x 18 in | 75 | 2.78 |
| 50 ft x 18 in x 24 in | 150 | 5.56 |
| 100 ft x 12 in x 24 in | 200 | 7.41 |
| 100 ft x 18 in x 30 in | 375 | 13.89 |
| 100 ft x 24 in x 36 in | 600 | 22.22 |
| 200 ft x 18 in x 36 in | 900 | 33.33 |
| 200 ft x 24 in x 48 in | 1,600 | 59.26 |
Frequently asked questions
- How do I calculate trench volume?
- Multiply length by width by depth with every dimension in feet, then divide by 27 for cubic yards. A trench 100 feet long, 18 inches wide, and 30 inches deep is 375 cubic feet, or 13.89 cubic yards.
- How many cubic yards is a 100 foot trench?
- It depends on the cross-section. At 12 inches wide and 24 inches deep it is 7.41 cubic yards. At 18 by 30 inches it is 13.89 cubic yards, and at 24 by 36 inches it is 22.22 cubic yards.
- Is backfill the same volume as the excavation?
- No, it is less. The pipe or cable in the trench takes up space, and so does any bedding material placed around it. Subtract both from the trench volume to get the backfill.
- How much extra should I allow?
- There is no standard figure. Trenches are usually dug wider than specified because of the bucket width, walls slough in loose soil, and spoil bulks up once loosened. Choose a percentage that reflects your ground and your equipment.
- How do I handle a trench that gets deeper along its length?
- For a uniform slope, use the average of the depths at the two ends, which gives the correct volume. Where the depth changes in steps, calculate each stretch separately and add them.
- Does this tell me how to dig safely?
- No. This page calculates volume only. Utility location, trench walls, access, and every safety and regulatory requirement must come from the appropriate authority or a qualified contractor.
Trench volume is length times width times depth from the dimensions you enter, converted at exactly 27 cubic feet per cubic yard. No trench width, depth, over-dig allowance, or soil swell factor is assumed, and this page provides no excavation safety or regulatory guidance. Quantities come from exact geometry using the dimensions you enter. Confirm product dimensions, installation requirements, local codes, site conditions, safety requirements, and final order quantities with the appropriate manufacturer, supplier, contractor, or professional.
Results are planning estimates. Last reviewed 2026-07-28.