Slope Calculator
Find the slope between two points plus the line equation y = mx + b, angle, distance and intercepts. Handles vertical lines correctly.
About the Slope Calculator
This slope calculator takes two points (x₁, y₁) and (x₂, y₂) and computes everything about the straight line through them: the slope m = (y₂ − y₁) ÷ (x₂ − x₁), the full line equation in y = mx + b form, the angle of incline in degrees, the distance between the points, and both the x- and y-intercepts.
Slope measures steepness as 'rise over run' — how much y changes for each unit of x. A positive slope rises left to right, a negative slope falls, a slope of 0 is a horizontal line, and when both points share the same x-coordinate the line is vertical and the slope is undefined; the calculator detects this case and shows the equation as x = constant instead of producing an error.
Algebra and coordinate-geometry students use this constantly, but slope also appears everywhere in applied work: road gradients, wheelchair-ramp regulations, roof pitch, trend lines through data points, and rates of change in economics and physics.
How to Use the Slope Calculator
- 1Enter the coordinates of the first point (x₁, y₁).
- 2Enter the coordinates of the second point (x₂, y₂).
- 3Read the slope, line equation, angle, distance and intercepts instantly.
- 4For points with equal x-values, the tool reports a vertical line with undefined slope.
Frequently Asked Questions
How do I find the slope between two points?
Subtract the y-values, subtract the x-values, and divide: m = (y₂ − y₁) ÷ (x₂ − x₁). For (1, 2) and (5, 10): m = (10 − 2) ÷ (5 − 1) = 8 ÷ 4 = 2, meaning y rises 2 units for every 1 unit x moves right.
How do I find the equation of a line from two points?
First compute the slope, then substitute one point to find b: with m = 2 through (1, 2), b = y − mx = 2 − 2(1) = 0, so the line is y = 2x. The calculator does both steps and formats the equation, including negative intercepts, automatically.
What does an undefined slope mean?
It means the line is vertical. If both points have the same x-coordinate — say (3, 1) and (3, 7) — the run is zero and division by zero is undefined. The line's equation is simply x = 3, its angle is 90°, and it has no y = mx + b form. The calculator handles this case explicitly.
How is slope converted to an angle?
The angle of incline is arctan(m). A slope of 1 is a 45° line; a slope of 2 is about 63.4°; a slope of 0.1 is about 5.7°. This is how road gradients relate to slope — a 10% grade means a slope of 0.1.
What is the distance between the two points?
It comes from the Pythagorean theorem: distance = √((x₂ − x₁)² + (y₂ − y₁)²). Between (1, 2) and (5, 10) that is √(16 + 64) = √80 = 8.944. The calculator reports it alongside the slope so you get the full picture of the segment.