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.

    Point P1
    Point P2

    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

    ModeInputsOutput
    Two pointsx1, y1, x2, y2slope, angle, intercept
    Angledegrees or radiansequivalent slope
    Standard formA, B, Cslope 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.

    Updated:

    Related Tools