Calculate the average slope between two points, convert grade percent and angle, solve for rise or run, or find a second point from slope and distance.

Slope is change in y per unit change in x. Angle, grade and distance assume both axes use the same length unit and scale.

Optional settings

Calculator Functions

FunctionWhat it doesWhat it requires
Slope between two pointsFinds the average slope of the line through two points, with its equation and lengthRequires the coordinates x₁, y₁, x₂ and y₂
Grade from rise and runFinds slope, grade percentage and angle from a measured rise and runRequires the vertical rise and the horizontal run
Convert grade percentageConverts a grade percentage to slope, angle and rise-to-run ratioRequires the grade percentage
Convert inclination angleConverts an angle in degrees to slope, grade percentage and rise-to-run ratioRequires the inclination from −90° to 90°
Rise from run and gradeFinds the vertical rise over a horizontal run at a given gradeRequires the horizontal run and the grade percentage
Run from rise and gradeFinds the horizontal run needed to gain a rise at a given gradeRequires the vertical rise and the grade percentage
Rise from run and angleFinds the vertical rise over a horizontal run at a given angleRequires the horizontal run and the inclination in degrees
Run from rise and angleFinds the horizontal run needed to gain a rise at a given angleRequires the vertical rise and the inclination in degrees
Second point from slopeFinds the point a set distance along a line of known slopeRequires the first point, the straight-line distance, the direction and the slope
Second point from angleFinds the point a set distance along a line of known inclinationRequires the first point, the straight-line distance, the direction and the angle

Rise and run are accepted in m, ft, in, cm or yd and can use different units, because both are converted before dividing. Values are signed: a negative rise is a drop. Every result lists the slope, grade percentage, inclination, rise-to-run ratio and, where both rise and run are known, the straight-line distance.

Average Slope Formulas

m = (y₂ − y₁) ÷ (x₂ − x₁) [1]
mAverage slope: rise divided by run
y₂ − y₁Rise, the vertical change between the two points
x₂ − x₁Run, the horizontal change between the two points

The same slope can be written three ways. Grade percentage is 100 × rise ÷ run, and the inclination angle is the inverse tangent of rise ÷ run [1]. A slope of 1 is a 100% grade and a 45° angle.

Slope between two points

For the points (2, 3) and (8, 15), the slope is (15 − 3) ÷ (8 − 2) = 12 ÷ 6 = 2. That is a 200% grade and an inclination of 63.43°, and the line is y − 3 = 2 × (x − 2). The straight-line distance between the points is √(6² + 12²) = 13.42. Two points with the same x value make a vertical line, which has no finite slope, and two identical points do not define a line at all.

Over several segments, the average slope is the total rise divided by the total run. It is not the average of the individual segment slopes unless every segment has the same run.

Grade from rise and run

grade % = 100 ×
rise ÷ run [1]

A rise of 6 over a run of 8 is a slope of 0.75, a 75% grade and an angle of 36.87°. The straight-line distance is √(8² + 6²) = 10 [1]. Run is the horizontal distance, not the distance measured along the slope.

Convert grade percentage

angle =
arctan(grade % ÷ 100) [1]

A 60% grade is a slope of 0.6 and an angle of arctan(0.6) = 30.96°, or 1 unit of rise for every 1.667 units of run.

Convert inclination angle

m = tan(angle)

A 45° inclination is a slope of tan(45°) = 1, or a 100% grade. At 90° or −90° the line is vertical and has no finite slope or grade.

Rise from run and grade

rise = run × grade % ÷ 100

A 20% grade over a 40 m run rises 40 × 20 ÷ 100 = 8 m.

Run from rise and grade

run = rise × 100 ÷
grade % [1]

Gaining 15 m at an 8% grade takes a run of 15 × 100 ÷ 8 = 187.5 m. A 0% grade never gains height, so it cannot be paired with a rise.

Rise from run and angle

rise = run × tan(angle)

A 30° incline over a 100 m run rises 100 × tan(30°) = 57.74 m. A vertical angle is rejected because it has no horizontal run.

Run from rise and angle

run = rise ÷ tan(angle)

Gaining 10 m on a 30° incline takes a run of 10 ÷ tan(30°) = 17.32 m, and the distance along the slope is 20 m.

Second point from slope

Δx = d ÷ √(1 + m²)
Δy = m × Δx

d is the straight-line distance along the line. The second point is (x₁ + Δx, y₁ + Δy) going forward, which increases x, and (x₁ − Δx, y₁ − Δy) going backward. From (0, 0) with a slope of 0.75 and a distance of 5, Δx = 5 ÷ √(1 + 0.75²) = 4 and Δy = 0.75 × 4 = 3, so the point is (4, 3) forward or (−4, −3) backward.

Second point from angle

Δx = d × cos(angle)
Δy = d × sin(angle)

From (1, 1), a distance of 10 at 30° forward gives Δx = 10 × cos(30°) = 8.66 and Δy = 10 × sin(30°) = 5, so the second point is (9.66, 6). At 90° forward the point moves straight up, and at −90° straight down.

Limits of This Estimate

  • The slope between two points is in units of y per unit of x. Its grade percentage, angle and distance only mean something physical when both axes use the same length unit and scale.
  • An average slope describes the straight line between the end points. The ground or curve in between can be steeper or flatter at any spot.
  • Grade uses horizontal run. Dividing rise by a distance measured along the slope gives the sine of the angle, not the grade, and the gap grows on steep slopes.
  • The angle is the inclination of the line above or below horizontal, not a compass bearing.

Sources

  1. National Wildfire Coordinating Group, Firefighter Math, Section 4.5 Slope: slope as rise divided by run, slope percent, the angle as the inverse tangent, run from rise and percent, and slope distance