Slope Calculator
Find the slope, y-intercept, distance, and angle between two points — runs locally, no upload.
Calculate slope between two points
Enter any two coordinate pairs and this tool instantly computes the slope (rise over run), the y-intercept of the line through those points, the straight-line distance, and the angle in degrees. All calculations happen in your browser — nothing is sent anywhere.
Vertical lines (where x₁ = x₂) have an undefined slope; the tool handles this case cleanly and shows the distance and angle regardless.
FAQ
What is slope? Slope measures how steep a line is. It equals the change in y divided by the change in x (rise over run). A positive slope goes up left to right; a negative slope goes down.
What is the y-intercept? The y-intercept is where the line crosses the y-axis, i.e. the value of y when x = 0. It is calculated as y₁ − slope × x₁.
Why is slope undefined for vertical lines? A vertical line has no change in x, so dividing by zero is undefined. The distance and angle are still shown.
How is the angle calculated? The angle is computed using Math.atan2(Δy, Δx) and converted to degrees, giving the direction of the line relative to the positive x-axis.