1What slope actually is (start from zero)

Stand at the bottom of a hill and look up. Some hills are gentle — you barely notice the climb. Others are brutal — every step is a fight. Slope is the number that captures that difference. It measures steepness: how much height you gain (or lose) for each step forward.

In math, slope is defined with two delightfully plain words: rise over run. Rise is the vertical change — how far up (or down) you go. Run is the horizontal change — how far forward you move. Divide the first by the second and you have the slope:

slope m = rise ÷ run = (y₂ − y₁) ÷ (x₂ − x₁)

That formula just says: pick two points on the line, subtract their y-coordinates for the rise, subtract their x-coordinates for the run, and divide. A slope of 0.5 means the line rises 1 unit for every 2 units it runs — gentle. A slope of 3 means it rockets up 3 units for every 1 forward — steep. The bigger the number, the steeper the climb.

Here's why slope deserves a whole guide: it's not just about hills. Slope is the universal language of "how fast does one thing change when another changes." Economists use it for supply curves, engineers for road grades, doctors for drug dose responses, and phone designers for screen brightness curves. Anywhere one quantity changes with another, slope is sitting underneath, quantifying the rate.

2Finding slope from two points (with a worked example)

The formula needs two points — call them (x₁, y₁) and (x₂, y₂). The order you pick them doesn't matter, as long as you're consistent: the point you call "2" goes on top in both subtractions.

Points (1, 2) and (5, 10): rise = 10 − 2 = 8 · run = 5 − 1 = 4 · slope = 8 ÷ 4 = 2. The line climbs 2 units for every 1 it moves right — steep.
Swap the order to check: (2 − 10) ÷ (1 − 5) = (−8) ÷ (−4) = 2. Same answer — the two negatives cancel. Consistency is all that matters.

Now a negative one, because the sign carries meaning: points (0, 8) and (4, 2). Rise = 2 − 8 = −6, run = 4 − 0 = 4, slope = −6 ÷ 4 = −1.5. The negative sign means the line falls as you move right — downhill. Positive slope climbs left-to-right; negative slope descends. That sign is doing real work: on a sales chart, positive slope is growth and negative slope is decline.

Our calculator does this instantly — type the two points and it returns the slope, the intercept, the full line equation and even the distance between the points. But doing it by hand a few times builds the intuition that makes the tool trustworthy rather than mysterious.

x y (1, 2)(5, 10) run = 5 − 1 = 4 rise = 10 − 2 = 8 slope = rise ÷ run = 8 ÷ 4 = 2
Rise over run, drawn: the vertical leg divided by the horizontal leg is the slope.

3The four personalities: positive, negative, zero, undefined

Every straight line on Earth falls into one of four slope families. Learn to recognize them at a glance:

Positivem = 2, climbs Negativem = −1.5, falls Zerom = 0, flat (y = 5) Undefinedvertical (x = 1) Zero slope is a number (flat). Undefined slope is not a number at all (vertical).
The four slope families — the zero-vs-undefined distinction is the one tests love to probe.
Slope (m)Angle above horizontalWhat it feels like
00°Dead flat — a calm lake
0.27≈ 15°Gentle wheelchair ramp
0.58≈ 30°Steep road, trucks downshift
145°Diagonal — rise equals run
1.73≈ 60°Black-diamond ski pitch
3.73≈ 75°Ladder against a wall
undefined90°Vertical — a wall

The angle comes from the inverse tangent: angle = arctan(m). A slope of 1 is exactly 45° because tan(45°) = 1 — the point where rise catches up with run.

The zero-vs-undefined pair is the classic exam trap, so nail it: zero slope = horizontal line = a real number (0). Undefined slope = vertical line = not a number at all (you can't divide by zero). "The slope is zero" and "the slope is undefined" sound similar and mean opposite things. One is flat; the other is a wall.

4From slope to full equation: y = mx + b

Slope tells you the steepness, but a line also needs a position. That's the y-intercept (b) — where the line crosses the y-axis. Together they make the most famous equation in algebra:

y = mx + b

Finding b from two points is a two-step dance. First compute m, then plug one point back in and solve for b. With our earlier points (1, 2) and (5, 10), m = 2. Using point (1, 2): 2 = 2(1) + b, so b = 0. The full equation: y = 2x — a line through the origin, which makes sense given the points.

A non-zero intercept: points (0, 3) and (4, 11). Slope m = (11 − 3) ÷ (4 − 0) = 8 ÷ 4 = 2. Plug in (0, 3): 3 = 2(0) + b → b = 3. Equation: y = 2x + 3. Check with the other point: 2(4) + 3 = 11 ✓. Always verify with the point you didn't use — it catches arithmetic slips instantly.

Why bother with the full equation? Because it turns the line into a prediction machine. y = 2x + 3 tells you y for any x: at x = 10, y = 23. Phone plans (monthly fee + per-GB rate), taxi fares (flag drop + per-mile), and sales forecasts are all y = mx + b in disguise — m is the rate, b is the starting fee.

5Reading slope straight off a graph

Sometimes there's no neat pair of points handed to you — just a line on grid paper. The move: pick any two points on the line where the coordinates are easy to read (grid intersections are ideal), count the rise and run between them, and divide.

Say the line passes through grid corners, going up 2 squares while moving right 4. Slope = 2 ÷ 4 = 0.5. It doesn't matter which two points you pick — any pair on the same straight line gives the same slope. That's not a coincidence; it's the definition of straightness. If different pairs gave different slopes, the line would be curving.

Fraction or decimal? Both are fine — slope is any real number. 2/4, 1/2 and 0.5 are the same slope. Fractions keep exact values (1/3 stays 1/3 instead of 0.333…), decimals are friendlier for real-world measurements. Our calculator shows both.

Pro tip for messy graphs: choose points far apart. Counting rise and run over a long stretch averages out your reading errors — the same reason surveyors measure long baselines. Two adjacent grid points give a noisier answer than two points ten squares apart.

6Slope in real life: roads, roofs, ramps and runs

Slope left the classroom long ago. Here's where it does real work:

SituationSlopeAs a ratio / percentFeels like
Wheelchair ramp (standard)0.0831:12Gentle, accessible
Road warning sign0.066% gradeTrucks gear down
Typical house roof0.334-in-12 pitchWalkable with care
Building-code stairs0.647:11 rise:runNormal staircase
Steep ski run1.045°Experts only
A wallundefined—Vertical
6% Road grade sign slope = 0.06 Wheelchair ramp 1:12 · slope ≈ 0.083 rise 1 run 12 Percent, ratio, decimal — three dialects of the same slope.
6% grade and 1:12 ramp: slope expressed as a percent and as a ratio.

7Parallel and perpendicular lines

Slope also controls how lines relate to each other — and the rules are beautifully simple:

Quick check: are y = 3x + 2 and y = 3x − 7 parallel? Same slope (3) → yes, they'll never touch. Is y = 3x + 2 perpendicular to y = −(1/3)x + 4? 3 × (−1/3) = −1 → yes, they meet at a perfect right angle. Architects and game developers use the perpendicular rule constantly — walls meet floors at 90°, and the math has to agree.

The edge cases: a horizontal line (m = 0) is perpendicular to a vertical line (undefined slope) — the negative-reciprocal rule can't express it because you'd divide by zero, but geometry doesn't care. Flat meets wall at 90°, always.

8Bonus: the distance between your two points

While you're holding two points, there's a free extra: the straight-line distance between them, from the Pythagorean theorem. The rise and run are the legs of a right triangle; the distance is the hypotenuse:

distance = √(rise² + run²) = √((x₂−x₁)² + (y₂−y₁)²)
Points (1, 2) and (5, 10): rise = 8, run = 4. Distance = √(64 + 16) = √80 ≈ 8.94. Our calculator shows this alongside the slope — handy for map work, game development and anything where "how far apart" matters as much as "how steep between."

Notice the family resemblance: slope, intercept and distance all come from the same two subtractions. Two points are a surprisingly rich starting point — steepness, position, equation and separation, all from four numbers.

Slope, intercept and equation — free

Enter two points and get the slope, y-intercept, full line equation and distance instantly. Show your work — or check it.

📈 Open the Slope Calculator

100% free · No account · Private by design

9Frequently asked questions

What is the slope of a line?

The slope of a line is a number that describes how steep it is — the ratio of vertical change (rise) to horizontal change (run) between two points. For points (x1, y1) and (x2, y2), slope m = (y2 − y1) / (x2 − x1). A slope of 0.5 means the line rises 1 unit for every 2 units it runs.

What is the difference between zero slope and undefined slope?

Zero slope means a perfectly horizontal line (rise = 0), e.g. points (−2, 5) and (4, 5) give m = 0 and the equation y = 5. Undefined slope means a perfectly vertical line (run = 0), e.g. points (1, −2) and (1, 5) — division by zero is impossible, so the slope is undefined and the equation is x = 1.

Can slope be a fraction or a decimal?

Yes. Slope is any real number. The points (0, 0) and (4, 2) give a slope of 2/4 = 1/2 = 0.5. Negative slopes like −2/3 are common too — the sign tells you whether the line rises or falls as you move right.

How do you find the slope from a graph?

Pick any two points on the line where the coordinates are easy to read. Count the vertical change (rise) and the horizontal change (run) between them, then divide rise by run. For example, if the line goes up 2 grid units while moving right 4, the slope is 2 ÷ 4 = 0.5. Our calculator accepts the two points directly.

What is the slope of a vertical line?

A vertical line has an undefined slope, because the horizontal change (run) is zero and you cannot divide by zero. Its equation is written as x = c, where c is the constant x-coordinate of every point on the line.

How is slope used in real life?

Slope shows up everywhere: roof pitch (rise over run), road grades on warning signs (a 6% grade is a slope of 0.06), wheelchair ramp ratios (1:12), ski-run difficulty, stair design, and even economics (a supply curve's steepness). Anywhere one quantity changes with another, slope quantifies the rate.

Keep exploring

Slope is one member of the geometry family. Meet the rest:

Related guides

More step-by-step guides on this topic: