Ad Space — Top Banner

Slope Formula

Calculate the slope of a line between two points using m = (y2-y1)/(x2-x1).
Covers positive, negative, zero, and undefined slopes with real-world examples.

The Formula

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

The slope formula measures how steep a line is.

It tells you how much y changes for every one-unit change in x.

Variables

SymbolMeaning
mThe slope of the line (rise over run)
(x₁, y₁)Coordinates of the first point
(x₂, y₂)Coordinates of the second point

Understanding Slope Values

  • Positive slope → line goes uphill (left to right)
  • Negative slope → line goes downhill (left to right)
  • Zero slope → horizontal line
  • Undefined slope → vertical line (x₂ - x₁ = 0)

Example 1

Find the slope between (1, 3) and (5, 11)

x₁ = 1, y₁ = 3, x₂ = 5, y₂ = 11

m = (11 - 3) / (5 - 1)

m = 8 / 4

m = 2 (the line rises 2 units for every 1 unit to the right)

Example 2

Find the slope between (2, 9) and (6, 1)

x₁ = 2, y₁ = 9, x₂ = 6, y₂ = 1

m = (1 - 9) / (6 - 2)

m = -8 / 4

m = -2 (the line falls 2 units for every 1 unit to the right)

When to Use It

Use the slope formula when:

  • Determining the steepness or direction of a line
  • Writing the equation of a line (slope-intercept form: y = mx + b)
  • Checking if two lines are parallel (same slope) or perpendicular (negative reciprocal slopes)
  • Calculating rate of change in real-world problems (speed, cost per unit, etc.)

Key Notes

  • Formula: m = (y₂ − y₁) / (x₂ − x₁) = rise / run: The slope measures the steepness and direction of a line. Positive slope: rises left to right. Negative slope: falls left to right. The same slope results regardless of which point is labeled 1 or 2.
  • Parallel and perpendicular lines: Parallel lines have equal slopes (m₁ = m₂). Perpendicular lines have slopes that are negative reciprocals: m₁ × m₂ = −1, or m₂ = −1/m₁. A horizontal line (slope 0) is perpendicular to a vertical line (undefined slope).
  • Undefined vs zero slope: A vertical line (x = constant) has undefined slope — the denominator (x₂ − x₁) is zero. A horizontal line (y = constant) has slope = 0 — a defined value. These are fundamentally different cases, not interchangeable.
  • Slope as rate of change: Slope is the rate of change of y with respect to x. In physics, position vs time slope = velocity; velocity vs time slope = acceleration. In economics, total cost vs quantity slope = marginal cost. In calculus, slope generalizes to the derivative.
  • Applications: Slope calculations are used in road grade design (grade = rise/run as a percentage), roof pitch, linear regression (best-fit slope), physics kinematics graphs, engineering tolerances for drainage, and economic analysis of linear cost/revenue models.

Ad Space — Bottom Banner

Embed This Calculator

Copy the code below and paste it into your website or blog.
The calculator will work directly on your page.