How the slope and equation are calculated
The slope measures how much y changes for each unit of x between the two points. Once you have the slope, plugging either point back in solves for the y-intercept, giving the full line equation.
- x1, y1 — coordinates of the first point
- x2, y2 — coordinates of the second point
- m — slope of the line
- b — y-intercept, where the line crosses the y-axis
More detail
What the slope's sign means
A positive slope means the line rises left to right; a negative slope means it falls. A slope of 0 is a flat horizontal line. If x1 equals x2, the two points sit on a vertical line, where slope is mathematically undefined (division by zero) — the calculator shows "—" instead of a number.
From two points to a full equation
Once the slope m is known, substituting either point's coordinates into y = mx + b and solving for b pins down exactly where the line crosses the y-axis. Either point gives the same b, since both lie on the same line.
Quick check. Points (1, 3) and (4, 9) give slope 2 and y-intercept 1, so the line is y = 2x + 1 — a fast way to sanity-check the calculator.
Frequently asked questions
How do you find the slope between two points?
Slope m = (y2 − y1) / (x2 − x1) — the change in y divided by the change in x. For points (1, 3) and (4, 9), that's (9 − 3) / (4 − 1) = 2.
What is the y-intercept and how is it calculated?
The y-intercept b is where the line crosses the y-axis (x = 0). Once you know the slope m, plug either point into b = y1 − m × x1. For (1, 3) with slope 2, b = 3 − 2 × 1 = 1.
Why does the calculator show "—" for some point pairs?
When the two points share the same x-coordinate (x1 = x2), the line is vertical. A vertical line's slope is undefined since the formula divides by (x2 − x1) = 0, so the result field shows "—" instead of a number.
What does the full line equation look like?
Once you have slope m and y-intercept b, the line's equation is y = mx + b. For points (1, 3) and (4, 9), the calculator gives m = 2 and b = 1, so the equation is y = 2x + 1.
Does it matter which point I enter first?
No. Swapping point 1 and point 2 gives the same slope and y-intercept, since both (y2 − y1)/(x2 − x1) and its reversed form (y1 − y2)/(x1 − x2) reduce to the same value.