Slope & Line Calculator
Everyday
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
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.
Compound Interest Calculator
Project how a starting balance grows with regular contributions, your interest rate, and your compounding frequency.
Age Calculator
Calculate exact age in years, months, days — and find your next birthday.
BMI Calculator
Calculate Body Mass Index from height and weight, with a healthy range.
Tip Calculator
Calculate the tip and split the total bill between people.
Percentage Calculator
Work out percentages, what-percent, and percent change in one place.