Find the slope, angle, distance, midpoint, and line equation from two coordinate points.
| Formula | Expression |
|---|---|
| Slope | m = (y₂ − y₁) / (x₂ − x₁) |
| Distance | d = √((x₂−x₁)² + (y₂−y₁)²) |
| Midpoint | M = ((x₁+x₂)/2, (y₁+y₂)/2) |
| y-intercept | b = y₁ − m·x₁ |
| Angle | θ = arctan(|m|) |
| Property | Value |
|---|---|
| Slope (m) | 1.6 |
| y-intercept (b) | -0.2 |
| Line Equation | y = 1.6x − 0.2 |
| Angle (θ) | 57.9946° |
| Distance (d) | 9.433981 |
| Δx (run) | 5 |
| Δy (rise) | 8 |
| Midpoint | (4.5, 7) |
| Perpendicular slope | -0.625 |
| Type | Slope (m) | Description |
|---|---|---|
| Positive | m > 0 | Rises left to right |
| Negative | m < 0 | Falls left to right |
| Zero | m = 0 | Horizontal line |
| Undefined | — | Vertical line (Δx = 0) |
Slope and angle describe the same tilt in two different languages, and mixing them up is how a 45 percent grade gets pictured as a 45-degree cliff. A 45 percent grade is a slope of 0.45, which is an angle of only 24.2277°. Give this calculator two points and it shows both versions, plus the line equation, distance, midpoint and perpendicular slope.
Use the preloaded points (2, 3) and (7, 11). First find the run and the rise: Δx = 7 − 2 = 5 and Δy = 11 − 3 = 8.
The slope is rise over run, m = (y₂ − y₁) / (x₂ − x₁), so m = 8 / 5 = 1.6.
The y-intercept follows from b = y₁ − m × x₁ = 3 − 1.6 × 2 = −0.2, and the page assembles the two into y = 1.6x − 0.2.
The angle is θ = arctan(|m|) = arctan(1.6) = 57.9946°. The distance is √(5² + 8²) = √89 = 9.433981, and the midpoint is ((2 + 7) / 2, (3 + 11) / 2) = (4.5, 7).
The perpendicular slope is the negative reciprocal, −1 / 1.6 = −0.625. Slopes and distances are rounded to six decimals and the angle to four.
When x₁ equals x₂, the run is zero and dividing by zero is not allowed, so the line is vertical. The page then shows an angle of 90° and a perpendicular slope of 0. Entering exactly the same point twice is reported as vertical too, although a single point does not define any line.
The page computes arctan of the absolute slope, so it reports the steepness without the direction. A slope of −2 shows 63.4349°. The angle the line makes measured from the positive x-axis would be 116.565°, which you can get by subtracting 63.4349 from 180.
Only if you mix them up. Swapping both points entirely gives the same slope, 1.6 in the example. But swapping just the y-values, entering (2, 11) and (7, 3), flips the slope to −1.6.
Multiply by 100 for a percent grade, so 1.6 is a 160 percent grade. A roof pitch of 6 in 12 is a slope of 0.5, which is an angle of about 26.57°.
Slope is rounded to six decimal places, and the line equation is built from the rounded value. For exact fractions, work out rise over run yourself from the Δy and Δx rows. For long decimals, treat the displayed intercept as approximate.