Find the slope and equation of a line from two points.
m = (y₂ − y₁) ÷ (x₂ − x₁) = rise ÷ run. Between (1, 2) and (4, 8) the slope is 2.
The slope of a line measures how steeply it rises or falls. Enter two points and the calculator returns the slope, the angle with the x-axis, the percent grade, the line equation y = mx + b, both intercepts, the distance and midpoint between the points and the slope of a perpendicular line. A second tool builds the equation from a point and a slope.
A slope of 2 means the line rises 2 for every 1 across. For distance see the Distance Calculator, for right-angle geometry the Right Triangle Calculator, and for curves the Quadratic Formula Calculator.
The calculator applies the standard method step by step.
| Item | Value |
|---|---|
| Slope m (rise ÷ run) | 2 |
| Rise Δy / Run Δx | 6 / 3 |
| Percent grade | 200% |
| Angle with the x-axis | 63.43494882° |
| Line equation (y = mx + b) | y = 2x + 0 |
| y-intercept (b) | 0 |
| x-intercept | 0 |
| Distance between the points | 6.7082039325 |
| Midpoint | (2.5, 5) |
| Perpendicular slope | -0.5 |
| Points | Slope |
|---|---|
| (1,2) to (4,8) | 2 |
| (0,5) to (2,1) | -2 |
| (0,0) to (4,3) | 0.75 |
| (2,3) to (6,3) | 0 |
| (1,1) to (5,10) | 2.25 |
Subtract the y-values, subtract the x-values and divide: m = Δy ÷ Δx.
Undefined, because the run is zero.
Zero — the line neither rises nor falls.
Multiply by 100. A slope of 0.08 is an 8% grade.
The negative reciprocal: if m = 2 the perpendicular slope is −1⁄2.
y = mx + b, where m is the slope and b the y-intercept.
It uses the standard method: m = (y₂ − y₁) ÷ (x₂ − x₁) y = mx + b The full working and a worked example are shown on this page.
Decimal results use standard double-precision arithmetic (about 15–16 significant digits). Tools that work with whole numbers — big numbers, factors, bases, combinations — use exact integer arithmetic, so no digits are lost.
Yes for checking your work and learning the method. The steps and formula are shown so you can understand the answer, but follow your teacher's rules about calculators in exams.
No. Everything is calculated in your browser and nothing you enter is uploaded or saved.