A little help goes a long way. Find a tool/

Math FIELD NOTES · 4 MIN READ

Slope Explained: Rise over Run, Angles, and Line Equations

From two points to slope, angle, intercept, and length: the rise-over-run fraction, the arctangent bridge, and why vertical lines have no slope.

Two points pin down a line completely — and hidden inside them is a single number that says everything about how steep it is. That number is the slope, and once you can read it, you can also read off the line's angle, its y-intercept, and its equation. Every one of those falls out of one small fraction.

The slope formula: rise over run

Given two points (x₁, y₁) and (x₂, y₂), the slope m is the change in y divided by the change in x:

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

Take the points (1, 2) and (5, 10). The rise is 10 − 2 = 8 and the run is 5 − 1 = 4, so m = 8 / 4 = 2. In plain language: every step of 1 to the right climbs 2 units. A slope calculator runs this fraction for you, but it also computes three things the fraction alone does not — the angle, the intercept, and the distance between the points.

What the sign and size of m mean

The sign is a direction; the size is steepness. A positive slope climbs to the right, a negative slope falls, and zero is perfectly flat. Feed the calculator (0, 5) and (4, 1): the rise is 1 − 5 = −4 over a run of 4, so m = −1 — a line descending at a steady 45° tilt. Two points sharing an x-value, like (3, 1) and (3, 7), are the special case: the run is zero, so the fraction 6 / 0 has no answer. Rather than pretending to divide by zero, the tool reports the line as vertical with slope undefined and an angle of exactly 90° — which is the honest answer, since a vertical line crosses every y at one single x.

From slope to angle

Slope is a ratio; an angle is a rotation. The bridge between them is the arctangent: the angle of the line above (or below) the horizontal equals atan(m) converted to degrees:

angle = atan(m) × 180 / π

m = 2   →  63.43°
m = −1  →  −45°
m = 0.2 →  11.31°  (a 20% road grade)

That last row is worth a second look. Road signs quote grades as percentages — a 20% grade climbs 20 units per 100 — which is just slope × 100. Steep mountain roads hit 10–15%; anything past 25° (a slope near 0.47, roughly a 47% grade) is unusual for a road and obvious for a staircase ramp.

The intercept and the line equation

Slope alone describes a family of parallel lines; the y-intercept b picks out one of them. Once m is known, b comes from either point: b = y₁ − m·x₁. For (1, 2) and (5, 10), b = 2 − 2·1 = 0, so the line is y = 2x + 0. For (1, 1) and (3, 7), m = 3 and b = 1 − 3 = −2, giving y = 3x + −2 — the calculator prints the arithmetic result exactly as computed, which is a reminder that −2 is the answer, however inelegant it looks. With m and b in hand you can predict y at any x without knowing either original point.

The distance you get for free

A line segment between two points has a length as well as a steepness, and it arrives from the same picture: the horizontal run and vertical rise form a right triangle whose hypotenuse is the segment itself. length = √((x₂−x₁)² + (y₂−y₁)²). For (1, 2) to (5, 10) that is √(4² + 8²) = √80 ≈ 8.94 — the same theorem that powers any right-triangle problem, as broken down in how the Pythagorean theorem works. So one pair of points yields four outputs: slope, angle, intercept, and length.

Try it yourself

The Slope Calculator takes any two points and returns the slope, angle, y-intercept, segment length, and the line equation, flagging vertical lines instead of dividing by zero. The Triangle Calculator solves the full rise-and-run triangle (all sides and angles) when you want more than the hypotenuse, and the Percentage Calculator helps convert a slope ratio into the percent grade you see on road signs.

Frequently asked questions

How do you find the slope from two points?
Divide the rise by the run: m = (y2 − y1) / (x2 − x1). For (1, 2) and (5, 10) that is (10 − 2) / (5 − 1) = 8 / 4 = 2 — every step right climbs 2 units. The order of subtraction must stay consistent within the fraction, or the sign flips incorrectly.
Why is the slope of a vertical line undefined?
Both points share the same x, so the run x2 − x1 is zero and the fraction divides by zero — there is no number that describes that steepness. The calculator reports the line as vertical with slope null and an angle of exactly 90° rather than returning a fake number.
How do you convert a slope into an angle or a percent grade?
The angle is the arctangent of the slope: m = 2 gives atan(2) ≈ 63.43°, and m = −1 gives −45°. Percent grade is simpler still — slope × 100 — so a 20% road grade is a slope of 0.2, which works out to about 11.31° above horizontal.
Does it matter which point you enter first?
No. Swapping the points negates both the rise and the run, and the two negatives cancel, so the slope — and therefore the angle and equation — comes out identical. Only mixing the order of subtraction inside one fraction (y2 − y1 over x1 − x2) produces a wrong sign.
What is the difference between slope and the distance between two points?
Slope is a ratio — how fast y changes per unit of x — while distance is a length, the hypotenuse of the rise-run triangle: √((x2−x1)² + (y2−y1)²). A segment from (1, 2) to (5, 10) has slope 2 but length √80 ≈ 8.94; two segments can share a slope and have any lengths at all.