📈 Slope Calculator
Enter the coordinates of two points to calculate the slope, line equation, distance between them, and angle of inclination.
Two Points
Your Result
How the Slope Calculator Works
Slope measures how steep a line is — the ratio of the vertical change (rise) to the horizontal change (run) between two points on a line.
Formula
Y-Intercept: b = y1 − m × x1
Line Equation: y = mx + b
Distance: d = √[(x2 − x1)² + (y2 − y1)²]
Angle: θ = arctan(m)
Worked Example
The calculator loads with the points (1, 2) and (4, 8). The slope is m = (8 − 2) / (4 − 1) = 6 / 3 = 2. The y-intercept is b = 2 − (2 × 1) = 0, giving the line equation y = 2x. The distance between the points is √[(4−1)² + (8−2)²] = √45 ≈ 6.708, and the angle of inclination is arctan(2) ≈ 63.43°.
Frequently Asked Questions
What does a slope of zero mean?
A slope of zero means the line is perfectly horizontal — there is no change in y as x changes.
What happens when the line is vertical?
When x1 equals x2, the line is vertical and the slope is undefined because it would require dividing by zero.
How is the angle of a line calculated?
The angle of inclination is found by taking the arctangent of the slope, converted from radians to degrees.