Enter two coordinate points to instantly compute the slope m, y-intercept b, slope-intercept equation y = mx + b, angle of inclination, perpendicular slope, and segment length.
How to use this calculator
Enter coordinates for point 1 (x₁, y₁) and point 2 (x₂, y₂).
Read slope m, y-intercept b, and the full line equation y = mx + b.
The angle of inclination and perpendicular slope are also shown.
Formula & method
Slope & line equation formulas
m = (y₂ − y₁) / (x₂ − x₁) · b = y₁ − m × x₁ · Equation: y = mx + b · θ = arctan(m)
m = slope, b = y-intercept, θ = angle of inclination. Perpendicular slope m⊥ = −1/m.
Example
Points (1, 2) and (4, 8): Δy = 6, Δx = 3, m = 2. b = 2 − 2×1 = 0. Equation: y = 2x.
Key insights
Slope m = 0 means a horizontal line; undefined slope (Δx = 0) means a vertical line.
Perpendicular lines have slopes that are negative reciprocals: m₁ × m₂ = -1.
The slope of a line is constant — the ratio Δy / Δx is the same between any two points on it.
In real life, slope appears in gradients of roads (%), ramps, and roofs.
How to interpret your result
Slope m
Positive m: line rises left to right. Negative m: line falls. m = 0: flat line. Undefined: vertical line.
Y-intercept b
The y-value where the line crosses the y-axis (x = 0). From slope-intercept form: b = y₁ − m × x₁.
Angle of inclination
The angle θ between the line and the positive x-axis: θ = arctan(m). Ranges from 0° (horizontal) to 90° (vertical).
Frequently asked questions
What is slope?
Slope m = Δy/Δx is the rate of vertical change per unit of horizontal change along a straight line.
How do I find the slope from two points?
m = (y₂ − y₁) / (x₂ − x₁). This works as long as x₁ ≠ x₂ (non-vertical line).
What is the slope-intercept form?
y = mx + b, where m is slope and b is the y-intercept (y-value when x = 0).
Related calculators
Distance Calculator — Calculate distance between two 2D or 3D coordinate points, find the midpoint and slope, or solve speed-distance-time problems.
Quadratic Formula Calculator — Solve quadratic equations ax² + bx + c = 0 to find real or complex roots, discriminant, and parabola vertex.
Percentage Calculator — Find X% of a number, what percent X is of Y, or the change between two values.