Skip to content
Terrainly Open viewer

Guide · 6 min read

How to estimate cut and fill volumes from two DEMs

If you have two elevation models of the same place (before and after, or ground and design), you can see exactly where earth was removed or added, and roughly how much. Here is how it works, how to do it in your browser, and how far to trust the numbers.

Short version: open the existing ground in the viewer, open Cut & fill, choose the second file (or type a flat elevation), and read the cut, fill and net volumes. Your files are never uploaded.

What cut and fill mean

Cut is ground that has to be removed to reach the design. Fill is ground that has to be added. For every cell in the grid, the difference is:

change = design − existing ground

A positive change means fill (the surface goes up). A negative change means cut (the surface goes down). Multiply each change by the area of the cell, add them up separately for cut and for fill, and you have the two volumes. The net is fill minus cut: if it is zero, the job balances on site.

What you need

  • The existing ground as a GeoTIFF DEM. This can be a lidar download, a drone survey, or any elevation model. See where to download free DEMs.
  • The second surface, either another GeoTIFF (a proposed grading model, or a later survey), or just a single elevation for a flat pad, pond or foundation.
  • Both files should use the same vertical reference (see the accuracy section below). They do not have to use the same coordinate system or resolution: the viewer lines them up by their real-world coordinates.

Step 1: Open the existing ground

No elevation file? Open No file? Get free lidar for a site at the top of the panel, search for a place or zoom the map, click to place a square (250 m, 500 m or 1 km) and press Get elevation data. In Canada this loads Natural Resources Canada’s 1 m lidar mosaic and in the United States the USGS 3D Elevation Program, usually at 1 m, so a pond, pad or driveway shows up properly. The viewer then opens Draw a job for you. Where only coarse data exists (10 m, 30 m or worse, which is common outside North America) it says so, and such data is not suitable for small jobs. Only the square’s coordinates are sent to those services; see the privacy page.

Open the viewer and drop in the existing-ground file. It must be a file the viewer can place on the map, because the comparison is done in real-world coordinates.

Don't have two files yet? Open the cut & fill example. It loads real lidar from Gatineau Park plus an invented grading plan (a pond and a building pad) so you can see how everything works.

Step 2: Add the design

Open Cut & fill in the panel and pick one of three modes. Choose metric or feet at the top: with feet, volumes show in cubic yards first and areas in acres.

  • Another DEM. Choose the later survey or the design file. The viewer samples it at the center of every cell of the existing ground (using bilinear interpolation when the grids differ) and subtracts. Only the part where the files overlap is compared, and the panel tells you how much of the first file is covered. The second file is always the "after": if cut and fill come out the wrong way round, use Swap the two files.
  • Flat level. Type one elevation. The change is that elevation minus the ground, over the whole file.
  • Draw a job. You don't need a second file at all. Choose Dig down by, Raise by or Level to elevation, type a number, and outline the area on the map. Inside the outline the ground changes by that amount; outside it nothing changes. This is how most small jobs are described: "a pond 2 m deep here", "raise this yard 30 cm", "level this lot to 120 m". The sides are straight, with no slopes, so a pond with sloped banks will come out a little larger in real life. You can add several outlines and the totals are added together.

The map switches to a Cut/fill view: red where ground is cut, blue where it is filled, and neutral grey where nothing changes. The existing ground’s relief still shows faintly through the colors.

Step 3: Set the tolerance and outline the area

Ignore changes smaller than removes the measurement noise. Two surveys of the same unchanged ground never agree perfectly, and thousands of tiny differences add up to a real-looking volume. The default for two DEMs is 5 cm; a flat level starts at 0. Raise it if the map shows speckle over ground that should not have changed.

Use Draw area to outline just the part you care about: click the corners on the map, then press Finish (or Enter, or double-click). Undo last corner (or Backspace) removes a misplaced corner, and Escape cancels. You can add more than one area and the totals are added together. The totals count only cells whose centers fall inside your outlines. Whole map goes back to everything the two files cover.

Match heights on unchanged ground

Two surveys of the same ground often disagree by a constant height, and that difference turns into false volume. If you know a stretch of ground that did not change (a road, a parking lot, bare rock), click Match heights on unchanged ground and outline it. The viewer takes the median change over that area and removes it everywhere. Average change should then be close to zero over ground that really did not change. Undo matching returns to the raw numbers, and the report records how much was removed.

Hauling and truck loads

Open Hauling & cost to turn the volumes into a trucking plan. Soil in the ground (the bank volume) takes up more room once it is dug, and fill takes up less room once it is compacted, so the numbers on a truck are not the numbers on the map. The viewer uses these standard rules:

  • Swell. One cubic metre of cut becomes (1 + swell) cubic metres on a truck. The presets are typical values only: roughly 12% for sand, 20% for gravel, 25% for topsoil, 35% for clay and 50% for rock. Use your soil report when you have one.
  • Shrink. To make 1 cubic metre of compacted fill you need 1 ÷ (1 − shrink) cubic metres of ground. The default is 10%.
  • Balance. The site balances when the cut equals the soil the fill needs. Any cut left over is a surplus to haul away; any shortfall is soil to bring in. Both are counted as loose soil, the way trucks carry it.
  • Truck loads. The loose volume divided by the truck size, rounded up. Type a price per load to get a haul cost.

Step 4: Read and export the result

The panel shows cut, fill, net, the area compared and the average change, in cubic metres and cubic yards. Copy results puts a short text summary on your clipboard, and Download CSV saves the numbers for a spreadsheet. Press Download map (PNG) to get a labelled image with the legend, scale bar, north arrow, the outlines you drew and a results table.

The PDF report

Once you have a result, open Report (PDF) in the Cut & fill panel. Type a project name, who it is for and who prepared it, add notes, and optionally a logo (PNG or JPG). Press Download report (PDF). Page one has the map with the outlined areas and the cut, fill and net figures; the following page has hauling and cost, how the numbers were calculated, the data sources, your notes and the limits. It is a normal PDF with real, searchable text, in A4 for metric and Letter for feet. It is built on your device: your logo and notes are not uploaded. The report is free while we test it.

How accurate is it?

The arithmetic is exact for the grids it is given. The volume is only as good as the data, and these are the things that matter most:

What goes wrongEffect
Height offset between the filesA constant 10 cm error across 1 hectare (10,000 m²) is 1,000 m³ of false volume. Watch the Average change figure: on ground that should not have changed, it should be near zero. Match heights on unchanged ground removes a constant offset.
Different vertical referencesHeights measured from the ellipsoid and heights measured from a geoid (sea level) can differ by tens of metres. The viewer cannot always tell which one a file uses. Both files must match.
Surface typeA surface model (DSM) includes trees and buildings. A bare-earth model (DTM) does not. Comparing one with the other counts vegetation as fill.
Coarse gridsA 10 m grid cannot see a ditch that is 2 m wide. When you download data for a site, the viewer tells you the cell size it got. Lidar data also shows the ground as it was on the survey date, which may be years ago.
Large filesFiles above about 16 million cells are shown as a reduced preview (the cells are averaged), so the volumes are approximate. The panel says so.
Map projectionCells in a projected grid are not exactly the size they say on the ground (Canada’s Lambert grid stretches the ground by about 3%, Web Mercator by far more). The viewer measures the true ground area of every cell, so this is corrected.
Edges of an outlineCells are counted whole when their center is inside. With small cells this is a minor effect.

Treat the result as an estimate. It is useful for planning, comparing options and spotting mistakes. It is not a survey, and it should not be the only basis for payment, bidding or construction. Have a qualified professional check any quantity that matters. See the terms and disclaimer.

What it does not do (yet)

  • Sloped sides or sloped design planes. A drawn job has straight sides, and anything more complicated needs a second DEM.
  • Stockpile volumes with an estimated base surface.
  • Soil layers, rock excavation costs, or different swell factors for different parts of the site. The hauling figures use one set of factors for the whole job.

Try it now

Open the built-in example (real lidar plus a pond and a building pad) to see how the colors and totals look, then try it with your own ground.

Open the example →