Trench Calculator: Calculate Excavation and Backfill for Trenches
Use our free trench calculator to determine trench volume, loose excavation volume, and backfill requirements for utility and foundation trenches. Built for excavation contractors, it accounts for soil swell so you know both how much material to haul away and how much you'll need to bring back for backfill.
How to use this calculator.
- Enter trench length. Measure the full run of the trench, in feet.
- Enter trench width. Measure the excavated width, in inches.
- Enter trench depth. Measure the excavated depth, in feet.
- Set the swell factor. Soil expands when excavated (default 25% for common earth). Clay runs 30–40%, sand 10–15%, rock 50–60%.
- Review your results. See bank volume (in-place), loose volume (for hauling), and backfill volume.
How do you calculate trench volume and backfill?
Bank volume is the trench's in-place volume before excavation. Once dug, that same soil expands (swells) into a larger loose volume for hauling. Backfill volume assumes roughly 70% of the bank volume returns to the trench, since the pipe or utility and compaction settlement take up the rest.
Bank Volume (cu yd) = Length × (Width ÷ 12) × Depth ÷ 27
Loose Volume (cu yd) = Bank Volume × (1 + Swell % ÷ 100)
Backfill Volume (cu yd) = Bank Volume × 0.7
Where:
- Width ÷ 12: Converts trench width from inches to feet so all three dimensions are in the same unit before multiplying.
- Swell Factor: The percentage a soil expands once excavated from its natural, compacted state. It determines how many truckloads you need to remove the spoil.
- 0.7 backfill factor: An industry rule of thumb assuming pipe, bedding, and compaction consume about 30% of the original bank volume, so only 70% of what came out goes back in.
Example calculation.
Let's estimate excavation and backfill for a water service line installation.
Scenario: A 100 ft trench, 18 inches wide, 4 ft deep, in common earth with a 25% swell factor.
- Convert width to feet: 18 in ÷ 12 = 1.5 ft
- Calculate bank volume: 100 ft × 1.5 ft × 4 ft ÷ 27 = 600 ÷ 27 = 22.22 cu yd
- Calculate loose volume: 22.22 cu yd × 1.25 = 27.78 cu yd
- Calculate backfill volume: 22.22 cu yd × 0.7 = 15.56 cu yd
Result: This trench yields 22.22 cu ydof bank-measure spoil, which expands to 27.78 cu yd for hauling, while only 15.56 cu yd returns to the trench as backfill — the remaining 6.66 cu yd (after swell) must be hauled off site.
Tips from the field.
- Call 811 before you dig. Every utility trench starts with a locate request; hitting a buried line is dangerous and can trigger significant repair and fine costs.
- OSHA requires protective systems at 5 ft. Trenches 5 feet deep or greater need shoring, shielding, or sloped/benched walls before anyone enters — this is a hard legal requirement, not a suggestion.
- Match swell factor to actual soil. Clay swells 30–45%, silt 25–35%, sand 10–20%. Guessing low means you'll run out of truck capacity mid-haul.
- Depth targets vary by utility. Electric and gas typically run 18–24 inches, water lines go 24–48 inches (below the local frost line), and sewer depends on required slope.
- Budget $5–$15 per linear foot for excavation alone.Rock or difficult soil can double that; backfill and compaction are separate line items on top.
Disclaimer: This calculator provides estimates for planning purposes only. Trench safety — shoring, sloping, and benching per OSHA requirements — is the contractor's responsibility. PavementCalculator.com assumes no liability for material overages, shortages, or safety compliance decisions.
Cost, price, and density figures on this page reflect approximate U.S. averages as of August 2026 and vary by region, supplier, and material availability.
Frequently asked questions.
How do I calculate trench volume?
Multiply trench length (ft) × width (ft, convert inches ÷ 12) × depth (ft), then divide by 27 to get cubic yards. For a 100 ft × 18 inch × 4 ft trench: 100 × 1.5 × 4 ÷ 27 = 22.2 cubic yards bank volume. Add the swell factor (typically 25%) for loose volume needed for removal: 22.2 × 1.25 = 27.8 loose cubic yards.
How deep should a trench be?
Utility trenches: electric 18-24 inches, gas 18-24 inches, water 24-48 inches (below frost line), sewer 24-36+ inches depending on slope. Always call 811 before digging: hitting utility lines is dangerous and expensive. OSHA requires protective systems (shoring, shielding) for trenches 5 feet or deeper.
What is a swell factor in trenching?
Swell factor is the percentage increase in soil volume when excavated from its natural (bank) state. Clay swells 30-45%, silt swells 25-35%, sand swells 10-20%. You must account for swell when calculating how much material to haul away. 22 bank cubic yards of clay becomes 29-32 loose cubic yards.
How much does trenching cost?
Trenching costs $5 to $15 per linear foot for standard utility trenches (18-24 inches wide, 3-4 feet deep). This includes excavation: backfill and compaction are extra. Rock or difficult soil can double costs. A 100-foot utility trench typically costs $500-$1,500 for excavation alone.
How do I calculate backfill volume?
Backfill volume is approximately 70% of the excavated bank volume, since the pipe or utility takes up space and soil compacts when replaced. For 22.2 cubic yards of bank excavation: backfill = 22.2 × 0.7 = 15.5 cubic yards. The remaining 6.7 cubic yards of soil (after swell) must be hauled away.