Math

Slope Calculator

Find the slope between two points and the straight-line distance connecting them. Slope describes the vertical change per unit of horizontal change, which is useful for comparing line steepness.

01

Your inputs

02

Your result

Ready when you are.

Adjust the inputs, then calculate to see your result here.

Calculated on your device. Inputs are not saved by this calculator.

GET MORE FROM YOUR RESULT

Using the Slope Calculator

Enter each point’s x and y coordinates in the correct pair. Reversing the order of both points leaves the slope unchanged, but swapping only one coordinate changes the line you are describing.

Worked example

Use the example inputs below to reproduce this result. These are the form's starting values, not recommended targets. Changing your inputs updates your result above; this worked example stays fixed for comparison. Results are rounded for display.

Example inputs

First x
0
First y
0
Second x
3
Second y
4

Example result

Distance
5
Slope
1.3333333

Method and assumptions

Distance = √(Δx² + Δy²); slope = Δy / Δx.

Label both points before entering them

Coordinate calculations depend on the pairing and order of x and y values. Write each point as an ordered pair and use the same coordinate system for both. A result derived from coordinate differences assumes those coordinates represent compatible units. Screen pixels, map coordinates and physical distances need the appropriate interpretation outside the arithmetic.

Common question

Does a negative slope mean a negative distance?

No. A negative slope means y falls as x increases. Distance is the nonnegative length between the points, regardless of the direction of travel.