Slope & Line Calculator
Enter the coordinates of two points and this tool works out everything about the line through them: the slope (m = Δy/Δx), the equation in slope-intercept form (y = mx + b), the angle of inclination in degrees, the straight-line distance between the points, their midpoint, and the rise and run. Vertical lines (where the run is zero) are handled too — the slope is reported as undefined and the equation as x = constant. Great for coordinate-geometry homework, graphing, surveying and any place you need the line between two points. Everything is computed locally in your browser.
Point 1
Point 2
y = 2x + 0
Slope (m)
2
Angle
63.43°
Distance
6.7082
Midpoint
(2.5, 5)
Rise (Δy)
6
Run (Δx)
3
How to use
- Enter the x and y coordinates of the first point.
- Enter the x and y coordinates of the second point.
- Read the slope, equation, distance, midpoint, angle and rise/run; copy the equation if you need it.
Frequently asked questions
- How is the slope calculated?
- Slope m = (y₂ − y₁) / (x₂ − x₁), the change in y divided by the change in x. For example, from (1, 2) to (4, 8) the slope is (8 − 2) / (4 − 1) = 2.
- What happens with a vertical line?
- If both points share the same x value, the run is zero and the slope is undefined — a vertical line. The equation is shown as x = that value, and the angle is 90°.
- What is the angle of inclination?
- It's the angle the line makes with the horizontal x-axis, equal to arctan(slope). A slope of 1 is 45°; a horizontal line is 0°.
- How is the distance found?
- By the distance formula √((x₂ − x₁)² + (y₂ − y₁)²) — the length of the straight segment between the two points.
Related tools
Linear Regression Calculator
Paste (x, y) pairs and instantly get the best-fit line — slope, intercept, Pearson r, R², and a live prediction — all computed in your browser.
Time Difference Calculator
Calculate the exact difference between two date-times, broken down into days, hours, minutes, and seconds.
Quadratic Equation Solver
Solve ax² + bx + c = 0 with the quadratic formula — real or complex roots, plus discriminant, vertex, axis of symmetry and sum/product of roots.
Percentage Calculator
Work out percentages, what-percent, and percent change in one place.
Tip Calculator
Calculate the tip and split the total bill between people.
Tile Calculator
Work out how many floor or wall tiles you need for a room — from its length and width and the tile size, with an adjustable waste allowance and boxes required.