Slope Calculator
Enter the coordinates of two points, and find the slope of the straight line between them — plus the angle in degrees.
How to use the slope calculator
- Enter the coordinates of the first point (x₁, y₁).
- Enter the coordinates of the second point (x₂, y₂).
- The slope, angle and direction (rising/falling/horizontal/vertical) update automatically.
What does the slope tell you?
The slope (also called the gradient) tells you how much y changes for every unit x increases — calculated as (y₂ − y₁) ÷ (x₂ − x₁). A positive slope means the line rises from left to right, a negative slope means it falls. A slope of 0 means a horizontal line.
Worked example: the line through the points (0, 0) and (4, 8) has a slope of (8 − 0) ÷ (4 − 0) = 2, meaning y rises by 2 for every unit x increases. The angle to the x-axis is arctan(2) = 63.43°. Note that slope and angle are not proportional: a slope of 1 gives 45°, but doubling it to 2 does not give 90° — it gives 63.43°.
Frequently asked questions
What's the difference between slope and angle?
The slope is a ratio (change in y divided by change in x), while the angle is how many degrees the line tilts relative to the horizontal. They're related by angle = arctan(slope).
Can the slope be undefined?
Yes — if the line is vertical (x₁ = x₂), the slope is mathematically undefined, since it would require dividing by zero.
What is slope used for in practice?
Among other things, describing the steepness of roads and roofs, the rate of change in a graph (such as speed or growth over time), and as the basis for the equation of a straight line (y = mx + b).