CalcVind

Slope Calculator

Slope, angle and line equation from two points

Two Points

Point 1
Point 2

Slope

0.75 = 3/4Slope (m)
y = 0.75x + 1.25Equation
36.8699°
Angle
75%
Grade
1.25
y-intercept (b)
-1.6666667
x-intercept
5
Distance
(3, 3.5)
Midpoint

Working

  1. m = (y₂ − y₁) ÷ (x₂ − x₁) = (5 − 2) ÷ (5 − 1) = 3 ÷ 4 = 0.75
  2. b = y₁ − m·x₁ = 2 − 0.75 × 1 = 1.25
  3. d = √(Δx² + Δy²) = √(16 + 9) = 5
  1. 1
    Enter two points
    (x₁, y₁) and (x₂, y₂)
  2. 2
    Get the slope
    As a decimal and a fraction
  3. 3
    Plus the line
    Equation, angle, distance, midpoint

How is slope calculated?

Slope is rise over run: how much y changes for every 1 unit that x changes.

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

y = mx + b, with b = y₁ − m·x₁

Angle = tan⁻¹(m)

Distance = √((x₂ − x₁)² + (y₂ − y₁)²)

Positive, negative, zero and undefined

A positive slope rises to the right; a negative slope falls. A slope of 0 is a flat (horizontal) line, and a vertical line has an undefined slope because the run is zero.

Slope as a percentage

Road and ramp gradients are often given as a percentage: slope × 100. A 1 in 12 wheelchair ramp has a slope of 0.0833, or 8.33%.

Related calculators

Frequently asked questions

What is the slope formula?

m = (y₂ − y₁) ÷ (x₂ − x₁). For (1, 2) and (5, 5), m = 3 ÷ 4 = 0.75.

How do I find the equation of the line?

Work out the slope m, then b = y₁ − m × x₁. The line is y = mx + b.

How do I convert a slope to an angle?

Take the inverse tangent: angle = tan⁻¹(m). A slope of 1 is 45°.

Last reviewed: October 2026