Slope calculator
Slope and distance between two points
Slope and distance between two points
Enter the coordinates of two points.
Slope m = (y₂ − y₁) ÷ (x₂ − x₁). Line: y = mx + b with b = y₁ − m·x₁. Distance = √((x₂ − x₁)² + (y₂ − y₁)²).
Points (1, 2) and (4, 8): m = 6 ÷ 3 = 2, b = 2 − 2 = 0, so y = 2x; distance = √(9 + 36) ≈ 6.7082; midpoint (2.5, 5).
Slope tells you how much y changes for each unit of x. On a graph of distance against time it is speed; for cost against quantity it is the price per item. A negative slope means y falls as x rises.
Roads and ramps often state slope as a percentage: rise ÷ run × 100. A ramp rising 1 m over 12 m has a slope of 1 ÷ 12 ≈ 8.3%, a common maximum for wheelchair ramps.
The line is horizontal; y does not change.
Angle = tan⁻¹(slope); a slope of 1 is 45°.
Yes; perpendicular lines have slopes whose product is −1.