Slope Calculator – Two Points to Slope & Angle
Enter two points (x₁,y₁) and (x₂,y₂) to get the slope, the angle in degrees, and the grade as a percentage. Runs in your browser — no signup.
Enter two points to calculate the slope.
How it works
How slope is calculated
Slope is the steepness of a line, found by dividing the change in y by the change in x between two points: m = (y₂ − y₁) ÷ (x₂ − x₁), often called rise over run. A positive slope rises left to right, a negative slope falls, and a horizontal line has slope zero.
Angle and grade
The angle of the line is arctangent of the slope, in degrees. The grade is the slope expressed as a percentage (slope × 100), commonly used for roads and ramps. A vertical line (x₂ = x₁) has an undefined slope because the run is zero.
Frequently asked questions
›What is the slope formula?
m = (y₂ − y₁) ÷ (x₂ − x₁), the change in y divided by the change in x.
›What does a negative slope mean?
The line goes down from left to right; y decreases as x increases.
›Why is my slope undefined?
A vertical line has x₂ = x₁, so the run is zero and division is undefined.
›How do I convert slope to an angle?
Take the arctangent of the slope and convert to degrees: angle = atan(m) × 180/π.
›What is grade?
Grade is the slope as a percentage (slope × 100), used for road and ramp inclines.
Related tools
Last updated: