Free online calculator

Slope Calculator

Calculate the slope between two coordinate points and see more than a single rise-over-run result. Enter x₁, y₁, x₂ and y₂ to calculate slope, the line equation, line angle, percent grade, rise and run, and straight-line distance between the points. Vertical lines are recognized separately because their slope is undefined rather than a finite number.

Slope
0.75
Line equation
y = 0.75x + 0
Angle
36.869898°
Grade
75%
Point distance
5
Rise / run
3 / 4

How to use the Slope Calculator

  1. Enter the x and y coordinates of the first point.
  2. Enter the x and y coordinates of the second point.
  3. Rise is calculated as y₂ − y₁.
  4. Run is calculated as x₂ − x₁.
  5. Slope equals rise divided by run when run is not zero.
  6. The y-intercept is calculated from b = y − mx for non-vertical lines.
  7. The tool also calculates line angle, percent grade and Euclidean point distance.

Examples

Points (0,0) and (4,3)

Rise = 3 and run = 4, so slope = 3/4 = 0.75.

Horizontal line

If y₁ and y₂ are equal, rise is zero and slope is 0.

Vertical line

If x₁ and x₂ are equal, run is zero and slope is undefined.

Negative slope

A line that moves downward as x increases has a negative slope.

Frequently asked questions

What is the slope formula?

Slope m = (y₂ − y₁) ÷ (x₂ − x₁).

What does slope measure?

Slope measures the change in y for each unit change in x, often described as rise over run.

Why is vertical-line slope undefined?

A vertical line has zero horizontal change, so the slope formula would require division by zero.

What is percent grade?

For a non-vertical line, percent grade is slope × 100%.

How is the angle calculated?

The tool uses the arctangent relationship between rise and run to express line direction in degrees.

Does the calculator show the line equation?

Yes. Non-vertical lines are displayed in slope-intercept form, while vertical lines are shown as x = constant.

Related tools

More math tools