Slope Calculator
Calculate the slope of a line from two points, an angle, or standard-form coefficients. Shows undefined vertical slope, angle, intercept, and perpendicular slope.
What Slope Means
Slope measures how much y changes for each change in x. Positive slope rises from left to right, negative slope falls, zero slope is horizontal, and vertical lines have undefined slope.
m is slope, and the coordinates come from two points on the line.
Supported Slope Inputs
| Mode | Inputs | Output |
|---|---|---|
| Two points | x1, y1, x2, y2 | slope, angle, intercept |
| Angle | degrees or radians | equivalent slope |
| Standard form | A, B, C | slope and y-intercept when available |
Angle and Perpendicular Slope
theta is the angle the line makes with the positive x-axis.
For a nonzero finite slope, the perpendicular slope is the negative reciprocal.
Horizontal and vertical lines are handled as special cases because their perpendicular slopes are not ordinary finite numbers.
Worked Example
For points (1, 2) and (5, 10), the change in y is 8 and the change in x is 4, so the slope is 2.
The line rises 2 units for every 1 unit of x.
Undefined Slope Cases
- If the two points have the same x-coordinate and different y-values, the line is vertical and slope is undefined.
- If the two points are identical, they do not define a unique line.
- For standard form Ax + By +, represents a vertical line.
Frequently Asked Questions
Sources and References
Calculations are based on the listed reference sources. Links open in a new tab.
Related Tools
Find the equation of a line from two points or from a point and slope, with standard form, slope-intercept form, point-slope form, intercepts, and a graph.
Find where two 2D lines intersect from standard form, slope-intercept form, or two points on each line. The calculator also detects parallel and coincident lines.
Calculate the acute and obtuse angles between two 2D lines using slopes or standard-form coefficients, with parallel and perpendicular classifications.
Find the perpendicular distance from a 2D point to a line, using standard form or two points on the line, with signed distance and closest point.