📏Slope and Intercept Calculator

From two points: slope, y-intercept, x-intercept, the angle, and parallel and perpendicular slopes

How to use the slope and intercept calculator

Two points determine one line. The slope is m = Δy ÷ Δx, the change in y divided by the change in x, and the y-intercept follows from b = y₁ − m·x₁. Enter the two points and this calculator returns the slope, both intercepts and the equation y = mx + b in one pass.

A bare slope number is hard to picture, so the angle and the grade are shown too. A line of slope m meets the x-axis at arctan m, so slope 1 is 45° and slope 3 is about 71.57°. The grade is the slope times 100, the same convention as a road sign. When the coordinates are whole numbers the slope is also printed as a reduced fraction.

If the two x values are equal the slope is undefined, because Δx is 0 and the division fails. The line is then vertical, of the form x = constant, and the tool stops and names that line instead of printing a slope. Two identical points do not determine a line either, so that also produces a message.

A horizontal line, slope 0, is y = b, so it has no x-intercept, and a line perpendicular to it is x = constant, which has no slope. Those two rows are hidden in that case with a note explaining why. A parallel line has the same slope, and a perpendicular line has slope −1 ÷ m.

Frequently asked questions

What is the slope when both points have the same x value?

Δx is 0, so the division is impossible and the slope is undefined. The line is vertical, of the form x = constant.

How do I read the slope as an angle?

A line of slope m meets the x-axis at arctan m. Slope 1 is 45° and slope 0.5 is about 26.57°.

How is the perpendicular slope found?

Perpendicular lines have slopes whose product is −1, so it is −1 ÷ m. A line perpendicular to a horizontal line is vertical and therefore has no slope.