How to Use DEM Data for Slope Analysis (October 2026)

Slope analysis turns a digital elevation model into a raster where every cell holds how steep the ground is at that point, in degrees or percent grade. Learning how to use DEM data for slope analysis takes about 30 minutes once you know the workflow, and the whole thing runs in QGIS, ArcGIS Pro or a GDAL command. The hard part is not the tool. It is setting the Z factor correctly and picking a DEM whose resolution matches the decision you are trying to make.

Walk through the process below and you will end up with a classified slope map, a per-feature average slope table if you need one, and a validation checklist you can defend in front of a reviewer.

Table of Contents
  1. 1What You Need for DEM Slope Analysis
  2. 2The DEM itself
  3. 3Software
  4. 4A projected coordinate system
  5. 5A slope unit decision
  6. 6Step-by-Step: How to Use DEM Data for Slope Analysis
  7. 7Step 1: Prepare and Inspect the DEM
  8. 8Step 2: Choose the Correct Spatial Resolution
  9. 9Step 3: Calculate the Slope Raster from DEM Data
  10. 10Step 4: Select Degrees or Percent Grade
  11. 11Step 5: Classify and Interpret the Results
  12. 12Step 6: Validate and Export the Slope Map
  13. 13Common Mistakes and How to Fix Them
  14. 14Frequently Asked Questions
  15. 15What is the best software for DEM slope analysis?
  16. 16Should slope be calculated in degrees or percent?
  17. 17What DEM resolution is suitable for slope analysis?
  18. 18Why does my slope map show zero values in areas that are not flat?
  19. 19Can DEM data calculate slope in areas with missing elevation values?
  20. 20What is the difference between slope and aspect in GIS?
  21. 21Conclusion

What You Need for DEM Slope Analysis

What You Need for DEM Slope Analysis

You need four things: a DEM, a GIS that can run terrain derivatives, a projected coordinate system in metres, and a decision about which slope unit you are reporting in. That is the whole list.

The DEM itself

For most regional work, a public DEM will do: SRTM at roughly 30 m, or Copernicus GLO-30 at about 30 m, both downloadable from USGS and ESA sources. For site-scale work you want a LiDAR-derived DTM at 1 to 2 m from your local survey or open data portal.

Check the metadata before anything else, because the same dataset can behave very differently depending on whether you have a bare-earth DTM or a DSM that still includes tree canopy and rooftops. A DSM produces false steep edges around every building and every stand of trees, and those artefacts will dominate your slope output at fine resolution.

Software

QGIS and ArcGIS Pro both ship a slope tool out of the box. GDAL, the library underneath most open-source GIS, has gdaldem slope for anyone who prefers a terminal or wants to batch-process hundreds of tiles. Google Earth Engine can do it too, but through a different API.

A projected coordinate system

Slope is a ratio of rise to run, and run only makes sense in linear ground units. If your DEM is in geographic coordinates such as EPSG:4326, one degree of longitude is not the same distance as one degree of latitude, so you must reproject to a projected CRS with metre units before you calculate anything. A local UTM zone is the usual choice.

A slope unit decision

Decide now whether the deliverable is in degrees or percent grade. Degrees describe terrain angle for mapping and hazard screening. Percent grade is what road designers, drainage plans and accessibility rules use. Changing later means reinterpreting every threshold you picked, so settle it before the calculation, not after.

Step-by-Step: How to Use DEM Data for Slope Analysis

Step-by-Step: How to Use DEM Data for Slope Analysis

The full workflow has six stages. Inspect the DEM, match its resolution to your decision, run the slope tool, pick the output unit, classify the values into bands, then validate and export. Every stage below says what to do and how to tell it worked.

  1. Load the DEM and check its CRS, cell size, elevation range and voids.
  2. Reproject and resample to a projected CRS at a cell size your decision can actually resolve.
  3. Run the slope tool with a correct Z factor to produce a new raster.
  4. Choose degrees or percent grade as the output unit.
  5. Classify the raster into usable bands, then polygonize or run zonal statistics.
  6. Validate the output against known terrain, then export with a legend and metadata.

A good slope raster has a value in every valid cell, a sensible histogram, and steep pixels exactly where the land is steep. If your output is uniform black, uniform white, or striped with gaps, stop and read the mistakes section rather than pushing the file into a report.

Step 1: Prepare and Inspect the DEM

Load the raster into QGIS with Layer and then Add Raster Layer, or in ArcGIS Pro use Map and then Add Data. Before touching any tool, open Layer Properties and read four fields.

First, the coordinate reference system. If it is geographic rather than projected, that is your first fix. Second, the source cell size, shown under Source in the properties panel. Third, the elevation range, found by opening the Layer Properties histogram or by running raster statistics. A range of zero to a few hundred metres is normal; a range near zero usually means the file failed to load properly.

Fourth, the voids. Zoom to the raster edges and look for black or transparent blocks, especially if your data came from SRTM, which is assembled from scene strips and can leave gaps where scenes do not overlap. Those voids become NoData in the slope output and will not show up in the histogram unless you exclude NoData from the statistics.

Also decide whether you are holding a DTM or a DSM. Bare earth is what you want for almost every slope decision. At 30 m resolution the difference barely matters. At 1 to 2 m from LiDAR it matters enormously.

Step 2: Choose the Correct Spatial Resolution

Resolution sets the smallest landform your slope raster can possibly show, and it changes the numbers. Coarsening cells smooths detail, which pushes mean and maximum slope downward. Comparing slope values derived from two different resolution DEMs is not a valid comparison, which is the single most overlooked trap in this kind of work.

Decision you are makingLandform scaleSuggested cell sizeTypical source
Continental hazard screening, regional suitability10 km and larger90 to 1000 mASTER GDEM, SRTM at coarse resampling
Catchment planning, agricultural plot productivity100 m to 2 km10 to 30 mSRTM, Copernicus GLO-30
Road alignment, parcel-level development siting5 to 50 m2 to 5 mCopernicus GLO-30 resampled, regional LiDAR
Site engineering, slope stability screeningUnder 5 m0.5 to 1 mLiDAR-derived bare-earth DTM

Resample only when you must, and choose the method deliberately. Bilinear or average aggregation is right when you are smoothing an existing DEM down. Nearest neighbour is right when your cell values are classes rather than continuous measurements. Running a slope tool on a nearest-neighbour resampled DEM produces blocky stair-stepped results that look wrong because the elevation surface itself is now stepped.

Step 3: Calculate the Slope Raster from DEM Data

The slope tool reads the elevation difference between each cell and its eight neighbours, converts that rise over run into an angle, and writes one slope value per cell into a new raster. QGIS, ArcGIS Pro and GDAL all do exactly this, and their settings differ only in wording.

Workflow stepQGIS 3.xArcGIS ProGDAL command line
Find the toolProcessing Toolbox, then Raster terrain analysis, then SlopeAnalysis and then Raster surface, then Slopegdaldem slope
InputElevation layerInput rasterInput DEM filename
Z factorScale and Z factor parameter, set to 1 for metre-based projected CRSZ factor, set to 1 for metre-based projected CRS-z 1
UnitsOutput as Degrees or as Horizontal PercentageOutput measure, Degrees or Percent-p for percent, omit for degrees
OutputOutput raster path, GeoTIFFOutput raster, GeoTIFF to a folderOutput GeoTIFF filename

In QGIS, the equivalent command line reads roughly gdaldem slope input_dem.tif slope.tif -p -z 1 -of GTiff. In ArcGIS Pro the tool lives under Analysis, then Raster surface, then Slope, where you set the input raster, the output measure and the cell size.

You can tell it worked by checking three things. The output range should top out below 90 degrees, because slopes beyond 90 degrees are not physically possible on a land surface and usually indicate bad input. The histogram should be right-skewed, with most cells at low values. And the steepest pixels should sit along valley walls, escarpments and cut banks, which you can confirm by putting a hillshade underneath as a semi-transparent layer.

One community answer worth knowing: on Reddit r/QGIS the practical path beginners get told repeatedly is hillshade first for orientation, then the GDAL slope algorithm from the Processing Toolbox. Both produce a usable result, so pick whichever you can repeat reliably across every tile in your project.

Step 4: Select Degrees or Percent Grade

Degrees and percent grade describe the same slope in different maths. Degrees is the angle of the incline from horizontal. Percent grade is that rise as a ratio to horizontal distance, so 100 percent is 45 degrees and 5 percent is about 2.86 degrees.

Use degrees for terrain description, hazard screening and most thematic maps. Use percent grade whenever a limit is written as a ratio, because road grades, drainage rules and accessibility standards are all phrased that way.

Percent gradeDegreesTypical use
2%1.15Drainage falls on paved surfaces
5%2.86Accessibility ramp maximum running slope
6 to 8%3.43 to 4.57Main road and highway grade limits
10%5.71Residential street grade
12 to 15%6.84 to 8.53Mountainous road stretches
25%14.04Rough upper limit for construction without major earthworks
45%24.23Very steep, erosion and mass movement likely

Converting between them is straightforward: percent equals the tangent of the degree angle, multiplied by 100. The reverse uses the arctangent. Set the unit in the slope tool itself rather than converting the raster afterwards, so the Z factor and units stay consistent with the source data.

Step 5: Classify and Interpret the Results

A continuous slope raster is hard to read on a map and hard to threshold in a rule. Reclassify it into named bands first. In QGIS use Raster and then Reclassify by table, or Process and then Raster calculator; in ArcGIS Pro use the Reclassify tool on the Classification menu.

Pick break values that match the decision rather than round numbers. A typical suitability classification looks like this: 0 to 5 percent as flat, 5 to 15 percent as gentle, 15 to 30 percent as moderate, 30 to 45 percent as steep, and above 45 percent as very steep. For a road or accessibility study, tighten those breaks around the regulatory limits instead, so the classes straddle the thresholds that actually matter.

Then check the raster statistics before you trust the picture. Look at mean, standard deviation, minimum and maximum. A standard deviation near zero means your slope surface has almost no variation, which usually points back to a resolution or Z factor problem rather than genuinely flat terrain.

Two cleanup steps make the output much more usable. Run Sieve to drop single-cell speckle, the small isolated steep pixels that come from noise or from DSM artefacts around buildings. Then run Polygonize to convert the classified raster into vector polygons, one polygon per class, which is what you need for area summaries, map production or a table you can join to parcel data.

If you already have polygons and you want a single number for each one, zonal statistics answers that directly. The most common practitioner question on GIS StackExchange is exactly this: someone downloads a NASA DEM for a study area, converts it to slope, and then wants the slope of each farm polygon rather than a raster. Use Zonal Statistics as Table in QGIS, or Zonal Statistics in ArcGIS Pro, with the slope raster as the value field and your polygons as the zone data. Add mean, maximum and minimum as statistics so you can see whether a parcel is uniformly gentle or sharply broken.

Step 6: Validate and Export the Slope Map

Validation is what separates a slope map you can defend from one you cannot. Run these checks before exporting anything.

  • Confirm the maximum value is under 90 degrees and the minimum is zero or above.
  • Check that the CRS is projected and in metres, and that the Z factor you entered matches those units.
  • Compare a handful of known slopes. Sample a steep riverbank, a flat valley floor and a known road cut, and check that the values make sense.
  • Overlay a hillshade at 40 to 50 percent transparency to confirm the steep zones align with visible relief.
  • Confirm that NoData gaps are intentional rather than the leftovers of scene seams.
  • Record the DEM source, version, date, vertical datum and Z factor in the map metadata.

Export the slope raster as GeoTIFF so it stays georeferenced, and export your map layout as PDF with a legend, units and a north arrow. Keep the unclassified raster alongside the classified version, because someone will always ask for the raw values later.

One honest limit: slope derived from a DEM is a screening proxy. It describes terrain gradient, not shear strength, pore pressure or factor of safety. Landslide susceptibility work needs geotechnical inputs on top of the slope layer, and no amount of DEM resolution replaces them.

Common Mistakes and How to Fix Them

Most of the time, how to use DEM data for slope analysis goes wrong at the setup stage rather than inside the slope tool itself. Almost every wrong slope map traces back to one of a handful of causes, and the table below maps what you see to what is actually wrong and what to change.

SymptomLikely causeFix
Everything looks flat, values near zeroDEM is in geographic degrees, so Z factor 1 treats one degree as one unit of riseReproject to a projected CRS in metres, then rerun with Z factor 1
Slope looks far too steepZ factor left at 1 while the CRS is geographic, or vertical units are feetSet Z factor to 1 for metre units, about 3.28084 for feet
Entire raster is uniform black or emptyNoData across the whole extent, or an elevation band was not recognisedCheck the histogram with NoData excluded, then fill voids or clip to valid extent
Striped gaps across the outputSRTM scene seams carried through as NoDataMosaic tiles before analysis, or use a different DEM source such as Copernicus GLO-30
Spiky isolated cells everywhereSingle-cell noise or DSM artefacts from canopy and buildingsRun Sieve to remove speckle, or switch to a bare-earth DTM
Slope values inconsistent between two study areasThe two DEMs have different cell sizes or vertical datumsResample both to the same resolution and common vertical datum before comparing
Map looks blocky or steppedNearest-neighbour resampling applied to continuous elevation valuesResample with bilinear or average aggregation instead
Confusing steepness with directionSlope and aspect mixed up in the output legendSlope gives steepness in degrees or percent, aspect gives compass direction
Zeros in areas that are clearly not flatFlattened voids filled with a constant elevation, or a zonal statistic averaging over filled cellsRestore true elevation values, or report mean slope excluding NoData cells

As a general habit, check the histogram before you style the map. Most of these problems are obvious in the distribution of values and invisible in the colour ramp.

Frequently Asked Questions

What is the best software for DEM slope analysis?

QGIS is the strongest default because it is free, its Processing Toolbox includes both the GDAL slope algorithm and a native raster slope tool, and it runs on Windows, macOS and Linux. ArcGIS Pro does the same job with a licence and better integration with Esri geodatabases. GDAL command line suits batch work across many tiles. All three produce the same slope values from the same DEM if the Z factor and units match, so choose on cost, licensing and how many tiles you need to process.

Should slope be calculated in degrees or percent?

Use degrees for terrain description, hazard screening and thematic maps, because that is how slope is normally reported in the literature. Use percent grade when your decision is written as a ratio, such as road grade limits, drainage falls or accessibility ramp rules. Set the unit inside the slope tool rather than converting the raster afterwards. A 10 percent grade is 5.71 degrees, and 100 percent is exactly 45 degrees.

What DEM resolution is suitable for slope analysis?

Match the cell size to the smallest landform your decision depends on. Around 30 m suits catchment and agricultural work, 2 to 5 m suits road alignment and parcel siting, and 0.5 to 1 m suits site engineering. Resolution changes the computed value, so mean and maximum slope fall as cells coarsen, and slope from two different resolution DEMs should never be compared directly without resampling first.

Why does my slope map show zero values in areas that are not flat?

Zero usually means the tool had no valid elevation to work from. Common causes are NoData gaps at the raster edges or SRTM scene seams, voids filled with a constant value, or a polygon whose cells were all excluded during a zonal statistic. Check the histogram with NoData excluded, zoom to the zero cluster at full raster resolution, and inspect the source DEM at that location. Flat terrain that genuinely measures zero is rare in real elevation data.

Can DEM data calculate slope in areas with missing elevation values?

Not from the missing area itself. A slope cell needs valid elevations in its neighbourhood, so cells surrounded by NoData come out as NoData rather than a slope value. Most DEM sources ship free gap-filled products, and merging tiles before analysis removes the striped gaps that scene boundaries leave behind. Where no public DEM covers your area, you can build one from contour lines or surveyed elevation points with a TIN interpolation, then run the same slope tool on the result.

What is the difference between slope and aspect in GIS?

Slope measures how steep the ground is, expressed in degrees or percent grade, with zero meaning flat. Aspect measures which direction the slope faces, expressed as a compass bearing from zero to 360 degrees. They are separate derivatives of the same DEM and answer different questions. Slope decides whether a site is buildable and how water will shed; aspect decides solar exposure, which matters for vegetation, snow melt and building orientation.

Conclusion

Start by opening your DEM’s properties and checking two things: whether the CRS is projected in metres, and whether you hold a DTM or a DSM. Everything downstream depends on those two answers.

Once the slope raster exists, classify it against thresholds you can justify, overlay a hillshade to check the result against the real terrain, and record your DEM source and Z factor in the metadata. If you need a single number per parcel rather than a map, run zonal statistics on the polygons next. That is the step most projects are missing when a client asks why they have a raster but no answer per field.

Leave a Comment

Practical guides to statistics, surveys and research data

Read the latest guides