Skip to content

Slope Calculator

Calculate slope, angle, distance, and line equation from two points or a point and slope. Includes 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)

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

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 Calculators

Frequently Asked Questions

What is slope?

Slope measures the steepness and direction of a line. It is the ratio of vertical change (rise) to horizontal change (run) between two points: m = (y2 - y1) / (x2 - x1).

What does a negative slope mean?

A negative slope means the line goes downward from left to right. A positive slope goes upward, zero slope is horizontal, and undefined slope is vertical.

How do I find the equation of a line?

Use slope-intercept form: y = mx + b, where m is the slope and b is the y-intercept. Calculate m from two points, then solve for b by substituting one point.

What is percent grade?

Percent grade is slope expressed as a percentage: grade = slope × 100. A 6% grade means the surface rises 6 feet for every 100 feet of horizontal distance.