📈 Slope Calculator

Slope Formula: m = (y₂ − y₁) / (x₂ − x₁) — Enter any two points on the line.
📍 Point 1 (x₁, y₁)
📍 Point 2 (x₂, y₂)
Slope (m)

Understanding Slope

The slope (also called gradient) of a line measures its steepness — how much the line rises or falls vertically for every unit it moves horizontally. It is often described as "rise over run."

Slope m = (y₂ − y₁) / (x₂ − x₁) = Rise / Run
Line equation: y = mx + b (slope-intercept form)
y-intercept: b = y₁ − m × x₁

Types of Slope

Slope ValueDirectionMeaningExample
m > 0 (positive)Rising ↗Goes up left to rightm = 2: rises 2 for every 1 right
m < 0 (negative)Falling ↘Goes down left to rightm = −3: falls 3 for every 1 right
m = 0Horizontal →No rise or fally = 5 (constant)
m = undefinedVertical ↕x does not changex = 3 (vertical line)

Worked Examples

Example 1 – Basic Slope

Find the slope between (1, 2) and (5, 10).

m = (10−2)/(5−1) = 8/4 = 2
Line equation: b = 2 − 2×1 = 0, so y = 2x

Example 2 – Negative Slope

A road descends from point (0, 100) to point (500, 50). What is the gradient?

m = (50−100)/(500−0) = −50/500 = −0.1
This means a 10% downhill grade — quite steep for a road!

Example 3 – Parallel and Perpendicular Lines

Parallel lines: same slope (m₁ = m₂)
Perpendicular lines: slopes are negative reciprocals
If line 1 has slope m, perpendicular line has slope −1/m
Example: m=3 → perpendicular slope = −1/3

Slope in Real Life

  • Road gradients: A "10% grade" means the road rises 10 m for every 100 m horizontal distance (slope = 0.10)
  • Ramps & accessibility: ADA standard requires wheelchair ramps to have maximum slope of 1:12 (m = 1/12 ≈ 0.083)
  • Roof pitch: A "4/12 pitch" means 4 inches rise for every 12 inches run (m = 1/3)
  • Economics: The slope of a demand curve tells you how much quantity changes per unit price change
  • Physics: Slope of a distance-time graph = speed; slope of velocity-time graph = acceleration
  • Data science: Linear regression finds the best-fit slope through data points

Frequently Asked Questions – Slope Calculator

What is the slope between (2,3) and (6,11)?
m = (11−3)/(6−2) = 8/4 = 2. The line rises 2 units for every 1 unit to the right.
What does a slope of 0 mean?
A slope of 0 means the line is perfectly horizontal — it has no rise. The line equation is y = b (a constant). Example: y = 7 is a horizontal line with slope 0.
How do you find the slope from the equation y = 3x + 5?
In y = mx + b (slope-intercept form), m is the slope. For y=3x+5, slope m = 3 and y-intercept b = 5.
What is a 1-in-10 slope as a percentage?
1-in-10 means rise of 1 for run of 10, so slope = 1/10 = 0.1 = 10%. Slopes can be expressed as a ratio (1:10), decimal (0.1), or percentage (10%).

Related Calculators

All Tools →