March 27, 20265 min read

Slope Calculator — Find Slope, Distance, and Equation from Two Points

Calculate slope (gradient) between two points, find the equation of a line, and understand rise over run. Covers positive, negative, zero, and undefined slopes.

slope calculator gradient calculator rise over run line equation calchub
Ad 336x280

Slope measures how steep a line is — it's one of the most fundamental concepts in algebra and appears in everything from road grades to stock charts to physics. The CalcHub Slope Calculator computes slope, distance, midpoint, and line equation from any two points.

The Slope Formula

m = (y₂ − y₁) / (x₂ − x₁)

Where m = slope, (x₁, y₁) and (x₂, y₂) are two points on the line.

Also written as: m = rise / run = Δy / Δx

Quick Examples

Point 1Point 2Rise (Δy)Run (Δx)Slope (m)
(1, 2)(3, 6)422
(0, 0)(4, 4)441
(2, 5)(6, 3)−24−0.5
(1, 3)(5, 3)040 (horizontal)
(3, 1)(3, 7)60undefined (vertical)
(−2, −3)(4, 9)1262

Types of Slope

Slope ValueDirectionLine Looks Like
Positive (m > 0)Rises left to right/
Negative (m < 0)Falls left to right\
Zero (m = 0)Horizontal
Undefined (Δx = 0)Vertical\
m = 145° angle upward/ at 45°
m = −145° angle downward\ at 45°

Finding the Line Equation

Once you have the slope, use point-slope form:

y − y₁ = m(x − x₁)

Or convert to slope-intercept form:

y = mx + b

Where b = y-intercept (where the line crosses the y-axis).

Example: Points (2, 3) and (4, 7)
  1. Slope: m = (7−3)/(4−2) = 4/2 = 2
  2. Using point (2, 3): y − 3 = 2(x − 2) → y = 2x − 1
  3. Equation: y = 2x − 1 (slope = 2, y-intercept = −1)

Slope in Real Life

Road Grades

Road grade is slope expressed as a percentage:
GradeSlopeWhat It Means
5%0.05Gentle hill (most highway ramps)
10%0.10Steep road (warning signs posted)
15%0.15Very steep (mountain roads)
25%0.25Extremely steep (San Francisco hills)
100%1.045° angle (not drivable)
A 10% grade means the road rises 10 feet for every 100 feet of horizontal distance.

Roof Pitch

Roof pitch is expressed as rise:12 (rise per 12 inches of run):
PitchSlopeAngleDescription
2:120.1679.5°Nearly flat
4:120.33318.4°Low slope
6:120.50026.6°Standard residential
8:120.66733.7°Steep
12:121.00045.0°Very steep

Wheelchair Ramps (ADA)

Maximum slope: 1:12 (8.33% grade or 4.76° angle). For every 1 inch of rise, you need 12 inches of ramp length. A 30-inch rise needs a minimum 30-foot ramp.

Distance Between Two Points

d = √((x₂−x₁)² + (y₂−y₁)²)

Midpoint

M = ((x₁+x₂)/2, (y₁+y₂)/2)

Parallel and Perpendicular Lines

  • Parallel lines have equal slopes (m₁ = m₂)
  • Perpendicular lines have negative reciprocal slopes (m₁ × m₂ = −1)
If a line has slope 3, a parallel line also has slope 3, and a perpendicular line has slope −1/3.

How to Use the Calculator

  1. Open the CalcHub Slope Calculator
  2. Enter Point 1 (x₁, y₁)
  3. Enter Point 2 (x₂, y₂)
  4. See: slope, distance, midpoint, angle, and line equation (both forms)

What does a slope of 0.5 mean?

For every 1 unit you move right (along x-axis), you move up 0.5 units (along y-axis). It's a gentle upward slope. In percentage terms, it's a 50% grade.

Can slope be a fraction or decimal?

Yes. Slope of 2/3 means "rise 2, run 3." It can also be written as 0.667. Fractions are often cleaner for exact work; decimals are easier to compare.

What's the slope of a circle?

A circle doesn't have a single slope — the slope changes at every point. At any given point on a circle, the slope equals the slope of the tangent line at that point, which involves calculus (derivatives).


Ad 728x90