Category

Slope & Line Equations Calculator

Formula

Enter your values

Enter your values and press Calculate — your answer, visual and step-by-step solution appear here.

What Is Slope? (The Short Answer)

Slope measures the steepness and direction of a line. It tells you how much y changes for every one-unit increase in x. A positive slope rises left to right; a negative slope falls; a zero slope is flat; an undefined slope is vertical.

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

The variables x₁, y₁ and x₂, y₂ are the coordinates of any two points on the line. It doesn't matter which point you call "1" or "2" — the result is always the same.

The Slope Formula

The formula m = (y₂ − y₁) / (x₂ − x₁) calculates the rise (vertical change) divided by the run (horizontal change). Rise goes in the numerator, run goes in the denominator — a detail students frequently mix up.

SymbolWhat It MeansExample (points (2,3) and (6,7))
y₂ − y₁Rise — vertical change7 − 3 = 4
x₂ − x₁Run — horizontal change6 − 2 = 4
mSlope4 / 4 = 1

A slope of 1 means the line rises 1 unit for every 1 unit it moves right — a 45° angle.

How to Find Slope From Two Points (Step by Step)

Use the points (1, 2) and (5, 10) as a worked example:

  1. Label your points. Call (1, 2) point 1 and (5, 10) point 2. So x₁ = 1, y₁ = 2, x₂ = 5, y₂ = 10.
  2. Find the rise. y₂ − y₁ = 10 − 2 = 8.
  3. Find the run. x₂ − x₁ = 5 − 1 = 4.
  4. Divide rise by run. m = 8 / 4 = 2.
  5. Interpret the result. A slope of 2 means the line rises 2 units for every 1 unit it moves to the right.
Why this works: Slope measures the ratio of vertical change to horizontal change between any two points on the same line. The ratio is always constant for a straight line — that's what makes it a line.

Types of Slope — Positive, Negative, Zero, and Undefined

TypeValueWhat the Line Looks LikeExample Points
Positivem > 0Rises left to right(0,0) and (3,6) → m = 2
Negativem < 0Falls left to right(0,4) and (2,0) → m = −2
Zerom = 0Perfectly horizontal(1,5) and (4,5) → m = 0
Undefinedm = ∞Perfectly vertical(3,1) and (3,7) → division by zero

For an undefined slope, the formula produces division by zero (x₂ − x₁ = 0). This isn't a calculation error — it's telling you the line is vertical, which has no defined slope.

Slope and Line Equations

Once you have the slope, you can write the equation of the line in several forms. Each form is useful in different situations.

Slope-Intercept Form: y = mx + b

This is the most common form. m is the slope and b is the y-intercept (where the line crosses the y-axis). If you know the slope and any point on the line, you can find b by substituting: b = y − mx.

Example: Slope m = 2, point (1, 5). Then b = 5 − 2(1) = 3. The equation is y = 2x + 3.

Point-Slope Form: y − y₁ = m(x − x₁)

Use this form when you have a slope and one point but haven't found the y-intercept yet. It's faster than converting to slope-intercept form first, especially on exams. Just substitute m, x₁, and y₁ directly.

Parallel and Perpendicular Lines

Parallel lines have the same slope. If one line has slope 3, any parallel line also has slope 3.

Perpendicular lines have slopes that are negative reciprocals of each other. In plain English: flip the fraction and change the sign. A line with slope 2/3 is perpendicular to a line with slope −3/2.

RelationshipRuleExample
ParallelSame slope: m₂ = m₁m₁ = 4 → m₂ = 4
PerpendicularNegative reciprocal: m₂ = −1/m₁m₁ = 2/3 → m₂ = −3/2

Common Mistakes to Avoid

Mistake 1 — Flipping rise and runRise (y change) always goes in the numerator; run (x change) always goes in the denominator. The formula is Δy/Δx, not Δx/Δy.
Mistake 2 — Inconsistent point orderingYou must subtract in the same order for both coordinates. If you do y₂ − y₁, you must also do x₂ − x₁. Mixing the order flips the sign of the slope.
Mistake 3 — Confusing zero slope with undefined slopeA horizontal line has slope 0 (the numerator is zero). A vertical line has undefined slope (the denominator is zero — you can't divide by zero).
Mistake 4 — Sign errors when both coordinates are negativeWhen subtracting negative numbers, use parentheses: y₂ − y₁ = −3 − (−7) = −3 + 7 = 4. Write it out rather than doing it mentally.
Mistake 5 — Forgetting that slope is a ratio, not just a numberm = 3 means the line rises 3 units for every 1 unit of run. Understanding the ratio helps you spot unreasonable answers immediately.

Frequently Asked Questions