Slope calculator
Find a slope and intercepts from two points, or find both endpoints at a given distance.
Get started
- Use the example values or enter your own measurements.
- Calculate, then copy the result or download the available details.
Example
Input
(0, 0) to (3, 4)Expected result
Slope 4/3 and distance 5Good to know
The calculation runs in your browser. Use consistent units in fields with no explicit unit.
Calculation method
The slope is the rise divided by the run. A vertical line has an undefined slope. A known distance and direction determine two endpoints on opposite sides of the starting point.
The two-point mode reports vertical and horizontal changes separately. Use the sign of each change to tell which direction the point moved. A vertical line has a constant x-coordinate.
A line and a distance determine a point on each side of the starting point. Use the endpoint table to keep both solutions.
Calculation mode
Two points
- X1
- Y1
- X2
- Y2
Point and direction
- X1
- Y1
- Distance
- Direction given as · Slope / Angle in degrees
- Direction value