Aspect and Slope Angle Calculator
Our geomorphology & mapping calculator computes aspect slope angle accurately. Enter measurements for results with formulas and error analysis.
Reviewed by Daniel Agrici, Founder & Lead Developer
Formula
Slope = atan(sqrt((dz/dx)^2 + (dz/dy)^2)); Aspect = atan2(-dz/dy, dz/dx)
Where dz/dx and dz/dy are the east-west and north-south elevation gradients computed from neighboring cell elevations divided by twice the cell spacing.
Worked Examples
Example 1: Mountain Ridge Analysis
Problem:Calculate slope and aspect for a DEM cell with 30 m resolution where N=520, S=480, E=500, W=510 m elevation.
Solution:dz/dx = (500-510)/(2*30) = -0.1667\ndz/dy = (520-480)/(2*30) = 0.6667\nSlope = atan(sqrt(0.1667^2 + 0.6667^2)) = atan(0.6872) = 34.48 deg\nSlope% = 0.6872 * 100 = 68.72%\nAspect = 90 - atan2(-0.6667, -0.1667)*180/pi
Result:Slope: 34.48 deg (68.72%) | Aspect: 194.04 deg (SSW)
Example 2: Gentle Agricultural Terrain
Problem:A 10 m resolution cell with N=102, S=100, E=101.5, W=100.5 m elevation.
Solution:dz/dx = (101.5-100.5)/(2*10) = 0.05\ndz/dy = (102-100)/(2*10) = 0.1\nSlope = atan(sqrt(0.05^2+0.1^2)) = atan(0.1118) = 6.38 deg\nSlope% = 11.18%
Result:Slope: 6.38 deg (11.18%) | Aspect: 26.57 deg (NNE)
Frequently Asked Questions
What is slope angle and how is it calculated from elevation data?
Slope angle measures the steepness of terrain expressed in degrees from horizontal or as a percentage grade. It is calculated from a digital elevation model by computing the rate of elevation change in both the east-west and north-south directions using neighboring cell elevations. The gradient in each direction uses the centered difference formula dividing the elevation difference between opposite neighbors by twice the cell spacing. The overall slope magnitude is the square root of the sum of squared partial derivatives converted to degrees using the arctangent function. Slope values range from 0 degrees for perfectly flat terrain to 90 degrees for vertical cliffs.
What is aspect and what does it represent?
Aspect is the compass direction that a slope faces measured in degrees clockwise from north ranging from 0 to 360 degrees. A slope with 180 degrees aspect faces south and receives maximum solar radiation in the Northern Hemisphere while a north-facing slope at 0 or 360 degrees receives minimum direct sunlight. Aspect is calculated from the same partial derivatives as slope using the arctangent of the negative north-south gradient divided by the east-west gradient. It is one of the most important terrain parameters for ecological studies vegetation distribution snow accumulation patterns and solar energy potential. Flat areas with zero slope have undefined aspect typically assigned a value of negative one in GIS software.
How are slope and aspect used in terrain analysis?
Slope and aspect are fundamental terrain derivatives used across earth science engineering and environmental applications. In hydrology slope controls surface water flow velocity and drainage pattern development. In ecology south-facing slopes in the Northern Hemisphere are warmer and drier supporting different vegetation than cooler north-facing slopes creating aspect-driven biodiversity patterns. Geotechnical engineers use slope angle to assess landslide susceptibility with steeper slopes having greater failure potential. Urban planners consider slope for building site suitability road design and stormwater management. Agriculture uses slope to plan terracing contour farming and irrigation system layouts.
What is the difference between slope in degrees and percent?
Slope in degrees measures the angle between the terrain surface and the horizontal plane ranging from 0 to 90 degrees. Slope as a percentage represents the ratio of vertical rise to horizontal run multiplied by 100 and can exceed 100 percent for steep terrain. A 45-degree slope equals exactly 100 percent because the rise equals the run. A 100 percent slope does not mean vertical as is commonly misunderstood. The relationship between the two is nonlinear with small degree values closely approximating percent values but diverging significantly above about 30 degrees. Road grades are typically expressed in percent while scientific applications more commonly use degrees.
References
Reviewed by Daniel Agrici, Founder & Lead Developer ยท Editorial policy