Slope Calculator

Two points in — the slope, the equation, and the line plotted.

Slope (m)

Rise over run, drawn

Slope is the change in y divided by the change in x — how far the line climbs for each step to the right. The dashed staircase on the graph is exactly that: across for the run, up for the rise. Positive slopes climb left to right, negative slopes fall, and zero is flat.

The order of the points does not matter, as long as you keep it consistent. Subtracting them the other way flips the sign of both the rise and the run, and the division cancels it out.

Undefined is not the same as zero

A horizontal line has slope 0 — it rises by nothing. A vertical line has undefined slope, because the run is zero and you cannot divide by it. These are genuinely different situations, and a calculator returning Infinity or a blank for the vertical case is hiding that. This one says so and gives you the x = k equation instead.

Perpendicular and parallel lines

Parallel lines share a slope. Perpendicular lines have slopes that multiply to −1, so you flip the fraction and change the sign: a slope of 2 becomes −½. The exception is the horizontal-vertical pair, where one slope is 0 and the other is undefined — the rule still holds geometrically but the arithmetic cannot express it.

Frequently asked questions

What does the angle of incline mean?

It is the angle the line makes with the horizontal, which is arctan of the slope. A slope of 1 is 45°. It is the same idea as a road gradient, though road signs quote the slope as a percentage rather than an angle.

Is anything uploaded?

No. The line is plotted in the page from the two points you give.

Something wrong with this tool, or an idea for it? Tell us