About the Slope-Intercept Form
Given any two points on a line, you can always work backward to the line's full equation in y = mx + b form. Our Slope-Intercept Form Calculator finds the slope, y-intercept, and full equation from two points instantly.
How It Works
You enter the coordinates of two points on the line. The calculator finds the slope between them, then uses one of the points to solve for the y-intercept, combining both into the standard slope-intercept equation.
Formula & Methodology
The slope m measures how much y changes for each unit increase in x, calculated as the change in y divided by the change in x between the two given points. Once the slope is known, the y-intercept b is found by substituting either point's coordinates back into y = mx + b and solving for b, since a line's equation must be satisfied by every point that lies on it. Using the first point here means b = y₁ − m × x₁; using the second point instead would give the exact same value of b, since both points lie on the same line by definition.
Step-by-Step: Calculating It By Hand
- 1Subtract the two y-coordinates to find the change in y.
- 2Subtract the two x-coordinates (in the same order) to find the change in x.
- 3Divide the change in y by the change in x to get the slope, m.
- 4Substitute one point's coordinates and the slope into y = mx + b, and solve for b.
- 5Combine m and b into the final equation, y = mx + b.
Examples
Positive slope
Through (1, 2) and (4, 11): the slope is 3, the y-intercept is −1, giving y = 3x − 1.
Negative slope
Through (0, 5) and (2, 1): the slope is −2, the y-intercept is 5, giving y = −2x + 5.
Advantages
- Finds slope, y-intercept, and the full equation in a single step
- Correctly flags vertical lines, which have no slope-intercept form
- Removes the risk of sign errors when solving for the y-intercept by hand
- Useful for graphing, homework checks, and real-world linear relationships
Common Mistakes
- Subtracting x and y coordinates in mismatched order (e.g. y₂ − y₁ over x₁ − x₂)
- Forgetting that a vertical line has no slope-intercept form at all
- Using the wrong point when solving for b after finding the slope
- Confusing slope-intercept form (y = mx + b) with point-slope or standard form
Edge Cases to Watch For
- If both points share the same x-coordinate, the line is vertical and has no defined slope or slope-intercept form.
- If both points share the same y-coordinate, the line is horizontal with a slope of exactly 0.
- A negative slope means the line falls from left to right rather than rising.
- If the two input points are identical, there isn't enough information to determine a unique line.
Common Use Cases
- Finding the equation of a line from two known points
- Algebra coursework on linear equations and graphing
- Modeling a linear relationship from two observed data points
- Quick checks when graphing or interpreting a line's slope and intercept