Skip to content

Slope Calculator

Calculate slope, angle, distance, and line equation from two points or a point and slope — with the full step-by-step solution and a visual graph.

Slope (m) = 1
y = x - 1
Δx
4
Δy
4
Angle (θ)
45°
Distance
5.6569
Y-Intercept
-1
Grade (%)
100%
(3, 2)(7, 6)

Step-by-Step Solution

  1. Δx = x₂ − x₁ = 7 − 3 = 4
  2. Δy = y₂ − y₁ = 6 − 2 = 4
  3. m = Δy / Δx = 4 / 4 = 1
  4. Angle θ = atan2(Δy, Δx) = atan2(4, 4) = 45°
  5. Distance d = √(Δx² + Δy²) = √(16 + 16) = 5.6569
  6. y-intercept b = y₁ − m·x₁ = 2 − 1 × 3 = -1
  7. Equation: y = x - 1

Something wrong or missing? Tell us — we read every report and fix issues fast.

Slope Formula

The slope of a line through two points (x1, y1) and (x2, y2) is:

m = (y2 - y1) / (x2 - x1) = Δy / Δx

Slope is also equal to the tangent of the angle of incline: m = tan(θ)

Types of Slope

  • Positive slope: Line rises from left to right (m > 0)
  • Negative slope: Line falls from left to right (m < 0)
  • Zero slope: Horizontal line (m = 0)
  • Undefined slope: Vertical line (Δx = 0)

Slope-Intercept Form

The equation of a line in slope-intercept form is y = mx + b, where:

  • m = slope of the line
  • b = y-intercept (where the line crosses the y-axis)

Given slope m and a point (x1, y1), find b: b = y1 - m · x1

Point-Slope Form

An alternative form using a known point and slope:

y - y1 = m(x - x1)

Distance Between Two Points

The distance between (x1, y1) and (x2, y2) uses the Pythagorean theorem:

d = √(Δx² + Δy²)

Percent Grade

Grade is slope expressed as a percentage, commonly used for roads, ramps, and construction:

Grade (%) = (rise / run) × 100 = slope × 100

  • A 5% grade rises 5 feet for every 100 feet horizontally
  • ADA-compliant ramps require a maximum 8.33% grade (1:12 ratio)
  • Steep roads are typically 6-10% grade

Working on a ramp, driveway, roof, or drainage grade? Our Slope Percentage Calculator converts between percent, degrees, and 1:N ratio and checks your slope against ADA and road standards.

Grade, Angle, and Ratio Conversion Table

Slope is expressed three ways in the real world: percent grade, angle in degrees, and the "1 in N" ratio. Common values:

Grade (%)AngleRatio (1:N)Typical Context
2%1.1°1:50Maximum cross slope for accessible paths
5%2.9°1:20Max walkway grade before a ramp is required
6%3.4°1:16.7Interstate highway maximum sustained grade
8.33%4.8°1:12Maximum ADA wheelchair ramp
10%5.7°1:10Steep hill, low gear for trucks
15%8.5°1:6.7Very steep driveway
20%11.3°1:5Steep ski run or hiking trail
100%45.0°1:1Rise equals run — a true 45 degree slope

The full conversion table covers 19 grades from 0.5% to 173%, including driveway, embankment, and ski-terrain values.

Understanding the Terms

Rise

The vertical change between two points — how far the line goes up or down. In the slope fraction it is the numerator, the change in y.

Run

The horizontal change between the same two points — how far the line travels sideways. It is the denominator of the slope, the change in x.

Gradient

Another name for slope, common in engineering and geography. A gradient can be stated as a decimal, a percent grade, or a ratio, but all describe rise over run.

Y-Intercept

The point where the line crosses the vertical axis, the b in y = mx + b. It is the value of y when x equals zero.

Percent Grade

Slope written as a percentage, found by multiplying rise over run by 100. Road signs and ramp codes use grade because it is easy to read at a glance.

Example

Find the slope between (3, 2) and (7, 6):

  • Δx = 7 - 3 = 4
  • Δy = 6 - 2 = 4
  • m = 4 / 4 = 1
  • θ = arctan(1) = 45°
  • d = √(16 + 16) = 5.6569
  • y-intercept: b = 2 - 1(3) = -1
  • Equation: y = x - 1

Related Math Calculators

Related Calculators

Frequently Asked Questions

How do you find the slope between two points?

Slope m = (y2 - y1) / (x2 - x1), the vertical change divided by the horizontal change. For the points (1, 2) and (3, 8), m = (8 - 2) / (3 - 1) = 6 / 2 = 3. With the slope known, substitute one point into y = mx + b to find the intercept: 2 = 3 + b, so b = -1.

What does a negative slope mean?

A negative slope means the line falls from left to right. A positive slope rises from left to right, a slope of 0 is a horizontal line because the rise is zero, and a vertical line has an undefined slope because the run is zero and division by zero is not possible. Steeper lines have larger absolute slopes.

What is the slope of a line perpendicular to a slope of 2?

The perpendicular slope is -1/2. Perpendicular lines have slopes that are negative reciprocals, so their product is -1: 2 × (-1/2) = -1. Parallel lines are different: they share the same slope with different intercepts, as y = 3x + 1 and y = 3x - 5 both have slope 3.

What is the slope of 3x + 4y = 12?

The slope is -3/4. Rearrange standard form into y = mx + b: subtract 3x from both sides to get 4y = -3x + 12, then divide by 4 to get y = (-3/4)x + 3. For any line Ax + By = C, the slope is -A/B and the y-intercept is C/B.

What is a 6% grade as a slope?

A 6% grade is a slope of 0.06, meaning the surface rises 6 feet for every 100 feet of horizontal distance. Percent grade is slope multiplied by 100, so a slope of 0.25 is a 25% grade. Grade is the common way to describe roads, ramps, roofs and driveways rather than writing the slope as a fraction.