Mathematics
Slope Calculator
Find the slope, y-intercept, equation, and angle between two points on a line.
Slope
2.6667
Mathematics
Find the slope, y-intercept, equation, and angle between two points on a line.
Slope
2.6667
The slope of a line measures its steepness and direction. It is calculated as the ratio of the vertical change (rise) to the horizontal change (run) between two points. The slope is positive if the line goes up from left to right, negative if it goes down, zero if it is horizontal, and undefined for vertical lines.
Enter the coordinates of two points (x₁, y₁) and (x₂, y₂). The calculator computes the slope using m = (y₂ − y₁) / (x₂ − x₁), then derives the y-intercept b = y₁ − m·x₁, the line equation y = mx + b, the distance between points, and the angle in degrees.
m = (y₂ − y₁) / (x₂ − x₁), b = y₁ − m·x₁, distance = √[(x₂ − x₁)² + (y₂ − y₁)²], angle = arctan(m) × (180/π)The slope m is the rise divided by the run. The y-intercept b tells you where the line crosses the y-axis. The distance formula uses the Pythagorean theorem. The angle converts the arctangent result from radians to degrees.
| Input | Result | Notes |
|---|---|---|
| Point 1: (1, 2), Point 2: (4, 10) | Slope = 2.6667 | The line rises 8 units for every 3 units to the right; a steep positive slope. |
| Point 1: (0, 5), Point 2: (5, 0) | Slope = −1 | The line falls at a 45-degree angle; a negative slope indicates descent. |
| Point 1: (2, 3), Point 2: (2, 8) | Slope = undefined | Vertical line; the slope is undefined because the denominator (x₂ − x₁) is zero. |
A vertical line has undefined slope because you cannot divide by zero. The denominator (x₂ − x₁) is zero when both points have the same x-coordinate.
A negative slope indicates that the line falls from left to right. The larger the absolute value of the slope, the steeper the decline.
The y-intercept (b) is the y-coordinate where the line crosses the y-axis. It occurs when x = 0.
The angle of inclination (in degrees) tells you how many degrees the line is tilted from horizontal. An angle of 45° means the slope is 1.
Yes. Swapping points does not change the slope, y-intercept, or equation—it is the same line.
Distance uses the Pythagorean theorem: √[(x₂ − x₁)² + (y₂ − y₁)²]. This gives the straight-line distance between the two points.