Slope Formula Explained With Examples: Rise Over Run

By Toolinga Editorial Team · Updated · 7 min read

Slope is one of those maths ideas that sounds abstract until you see it in action — and then you notice it everywhere. Stairs, ramps, roads, roofs and graphs all have slope. This guide gives you the slope formula explained with examples, in plain language, so you can work out any slope confidently, whether it appears in a textbook, on a graph, or on a building site.

In short, slope measures steepness: how much something rises or falls for every step it moves horizontally.

Rise Over Run in Plain English

Imagine walking up a hill. For every 8 metres you walk forward, you climb 6 metres higher. The slope of that hill is 6 divided by 8, or 0.75. That is the whole idea: slope compares vertical change to horizontal change.

The two words to remember are rise and run. Rise is the vertical change — how far up or down something goes. Run is the horizontal change — how far along it travels. Slope is simply rise divided by run. It does not matter whether you are looking at a roof, a road, or a line on a graph: the same comparison applies.

One common mistake is mixing the two up. Always put the vertical change on top of the fraction and the horizontal change underneath; swapping them gives the reciprocal, a different steepness. Remember the sign too: a line that rises as you move right has a positive slope, while one that falls has a negative slope.

The Slope Formula Explained With Examples

The slope formula is:

slope (m) = rise / run = (y2 − y1) / (x2 − x1)

Here, (x1, y1) and (x2, y2) are any two points on the line. You subtract the y-values to find the rise, subtract the x-values to find the run, and then divide. The order matters: use the same point first in both subtractions, or the sign of your answer will flip.

Worked example 1 — rise and run given. A ramp rises 6 metres over a horizontal run of 8 metres. Slope = 6 / 8 = 0.75. So the ramp rises 0.75 metres for every 1 metre of run. As a fraction, that is 3/4, and as a percentage grade it is 75% — a very steep ramp, steeper than anything you would want for wheelchair access, but a clear illustration of the maths.

Worked example 2 — two points on a graph. Find the slope of the line through (2, 3) and (6, 11). First, rise = 11 − 3 = 8. Next, run = 6 − 2 = 4. Then slope = 8 / 4 = 2. Check it: starting at (2, 3), moving 4 units right and 8 units up lands exactly on (6, 11), and 8 divided by 4 is 2. A slope of 2 means the line is steep — it climbs 2 units for every 1 unit it moves right.

Worked example 3 — a negative slope. Find the slope through (1, 9) and (5, 1). Rise = 1 − 9 = −8. Run = 5 − 1 = 4. Slope = −8 / 4 = −2. The negative sign tells you the line falls as you move right, dropping 2 units for every 1 unit of run.

If your numbers do not divide neatly, leave the answer as a simplified fraction or round the decimal sensibly — two or three decimal places is usually enough for homework and practical work. And if you want to skip the hand arithmetic, Toolinga's slope calculator works out the slope from two points or from rise and run in seconds.

Positive, Negative, Zero, Undefined Slopes

Every straight line falls into one of four slope types, and recognising them at a glance saves a lot of time on graphs.

  • Positive slope: the line rises as you move right, like climbing a hill. Example: slope 2, or 0.75. The steeper the climb, the larger the number.
  • Negative slope: the line falls as you move right, like walking downhill. Example: slope −2. The steeper the fall, the more negative the number.
  • Zero slope: the line is perfectly flat. Rise is 0, so slope = 0 / run = 0, whatever the run is. A horizontal line such as y = 4 has slope 0.
  • Undefined slope: the line is perfectly vertical. Run is 0, and division by zero is undefined, so the slope is undefined — not zero, and not infinite. A vertical line such as x = 3 has undefined slope.

The zero-versus-undefined pair trips up many students, so here is a memory aid: a flat road has no slope at all (zero), while a vertical wall is so steep it cannot be measured as a number (undefined).

Slope in Real Life: Roads and Roofs

Slope is not just a classroom topic. Engineers, builders and designers use it every day, and the same rise-over-run idea keeps structures safe and usable.

Roads. Road gradients are usually given as percentages. A 6% gradient means the road rises 6 metres for every 100 metres of horizontal distance — a slope of 0.06. That sounds small, but on a long hill it adds up: over 1 kilometre of run, a 6% gradient climbs 60 metres. Gradient signs warn drivers because steep descents need longer braking distances, and heavy vehicles struggle on steep climbs. Next time you see a gradient sign, you are looking at slope in disguise.

Roofs. Roofers describe pitch as rise over run, often as "6 in 12" — a roof that rises 6 inches for every 12 inches of horizontal run, a slope of 0.5. Steeper pitches shed rain and snow faster but need more material and are harder to work on. Shallower pitches are cheaper to build but drain more slowly. The pitch is chosen to suit the local climate and the building's design, which is why snowy regions tend to have steeper roofs than dry ones.

Ramps and stairs. Accessibility ramps use gentle slopes so wheelchair users can climb comfortably — a common guideline is a slope of 1 in 12, or about 0.083. Stairs, by contrast, are steep by design: a typical step rises about 17 cm over a going of about 25 cm, giving a slope of roughly 0.68.

Calculate Any Slope Instantly: Slope Formula Explained With Examples in Practice

Once the method clicks, most slope questions take under a minute. The routine is always the same: identify two points or a rise and run, subtract carefully, divide, and check the sign against the picture. If the line goes up to the right, your answer should be positive; if it goes down, negative; if it is flat, zero.

For speed and accuracy, try the free slope calculator: enter two points or a rise and run, and it returns the slope, the angle, and the line equation. It is a good way to check homework answers or to double-check a gradient before you rely on it in a practical project.

If your algebra work moves from straight lines to curves, Toolinga's quadratic equation solver can help with the next step, solving equations of the form ax² + bx + c = 0. Together, the two tools cover much of the algebra you meet in school and early college courses.

What is the slope formula?

The slope formula is m = (y2 − y1) / (x2 − x1). It finds the steepness of a line from any two points on it by dividing the vertical change (rise) by the horizontal change (run).

What does a slope of 0.75 mean?

A slope of 0.75 means the line rises 0.75 units for every 1 unit of run. As a fraction that is 3/4, and as a percentage grade it is 75%. For example, a ramp rising 6 metres over an 8-metre run has slope 6 / 8 = 0.75.

What is the difference between zero and undefined slope?

Zero slope belongs to a horizontal line: rise is 0, so 0 divided by any run is 0. Undefined slope belongs to a vertical line: run is 0, and division by zero is undefined. Flat means zero; vertical means undefined.

How do you find slope from two points?

Subtract the y-values for the rise, subtract the x-values for the run (using the same point first in both), then divide rise by run. For (2, 3) and (6, 11), rise is 8, run is 4, and slope is 8 / 4 = 2.

Slope is simply rise over run, and once you can spot the rise and the run, every slope question follows the same pattern. With the slope formula explained with examples above — a ramp at 0.75, a line through (2, 3) and (6, 11) at slope 2, and a falling line at −2 — you have checked models for the common cases. Practise on a few of your own points and the method will soon feel automatic.

Related guides

How to Write Scientific Notation: Easy Guide

Learn how to write scientific notation step by step — convert huge and tiny numbers with worked examples, clear rules, and a free…

November 6, 2026

How to Check If a Number Is Prime: Easy Hand Method

Learn how to check if a number is prime by hand with trial division, smart shortcuts, and worked examples — plus a free instant…

November 3, 2026

Significant Figures Rules Examples: A Clear Guide

Learn significant figures rules examples with clear rules, zeros explained, and worked rounding examples for homework and lab…

October 28, 2026

How to Calculate Probability Basics: Formulas & Examples

Learn how to calculate probability basics with one formula, worked coin-flip and dice examples, and the "and" vs. "or" rules —…

October 24, 2026