Slope Calculator

Find the slope of the line through two points, plus its equation, angle, distance and midpoint.

Formula explained below

Slope (m)

1.5

As a fraction
3/2
Line equation
y = 1.5x + 0.5
Angle with the x-axis
56.31°
Distance between the points
7.2111
Midpoint
(3, 5)

The line rises 1.5 units for every 1 unit across.

Calculation breakdown

Step-by-step calculation
StepFormulaResult
Rise8 − 26
Run5 − 14
Distance√(4² + 6²)7.2111

How it works

Enter the coordinates of two different points.

Slope m = (y₂ − y₁) ÷ (x₂ − x₁)Line: y = m x + b, with b = y₁ − m × x₁Angle = arctan(m) Distance = √((x₂ − x₁)² + (y₂ − y₁)²)

Worked example

The points (1, 2) and (5, 8):

  1. Rise: 8 − 2 = 6. Run: 5 − 1 = 4
  2. Slope: 6 ÷ 4 = 1.5, or 3/2
  3. Equation: b = 2 − 1.5 × 1 = 0.5, so y = 1.5x + 0.5
  4. Midpoint: (3, 5). Distance: √(16 + 36) = 7.2111

Sources

Frequently asked questions

How do you find the slope between two points?

Divide the change in y by the change in x, m = (y₂ − y₁) ÷ (x₂ − x₁). For the points (1, 2) and (5, 8), the rise is 6 and the run is 4, so the slope is 6 ÷ 4 = 1.5.

What does the slope mean?

It is how steep the line is. A positive slope rises to the right, a negative slope falls, and a slope of 0 is a flat line. A slope of 1 is a 45 degree angle.

What is the slope of a vertical line?

It is undefined, because the run is 0 and you cannot divide by zero. Its equation is x = a constant, and the calculator shows that.

How do I write the equation of the line?

Use y = mx + b. Find m as the slope, then b = y₁ − m × x₁. For (1, 2) and (5, 8), b = 2 − 1.5 = 0.5, so y = 1.5x + 0.5.

How do I find the angle of a line?

The angle with the x-axis is the inverse tangent of the slope. A slope of 1.5 is an angle of about 56.31 degrees.