🔍

What is slope-intercept form?

Slope-intercept form writes the equation of a straight line as y = mx + b, where m is the line’s slope (how steep it is) and b is the y-intercept (where the line crosses the y-axis).

How this calculator works

Given two points on the line, the slope is calculated with m = (y2 − y1) ÷ (x2 − x1). Once the slope is known, the y-intercept is found by substituting one of the points back into the equation: b = y1 − m·x1.

If both points share the same x-coordinate, the line is vertical and has no defined slope or slope-intercept form (a vertical line is written as x = a constant instead); this calculator flags that case rather than showing an invalid number.

This calculator is for general educational and reference purposes.

Last reviewed August 2026