cv.cm

Slope calculator

Type two points to get the slope, the line's equation, the distance and the midpoint, with the working.

m = 2

Slope-intercept form
y = 2x
Point-slope form
y − 2 = 2(x − 1)
y-intercept
(0, 0)
Standard form
2x − y = 0
x-intercept
(0, 0)
Angle to the x-axis
63.434949°
Grade
200%
Distance between the points
3√5 ≈ 6.7082039
Midpoint
(5/2, 5)

Working

  1. Δx = 4 − 1 = 3
  2. Δy = 8 − 2 = 6
  3. m = Δy / Δx = 6 / 3 = 2
  4. b = y₁ − m·x₁ = 2 − 2·1 = 0
  5. d = √(Δx² + Δy²) = √(9 + 36)

How to use this tool

Find the slope of a line in three steps.

  1. Type two points

    Enter x₁, y₁ and x₂, y₂ as whole numbers, decimals or fractions.

  2. Read the slope

    The slope shows as a fraction and a decimal, with the equation of the line in three forms.

  3. Check the working

    The steps, intercepts, angle, distance and midpoint are listed, and the graph shows the rise and run.

FAQ

How do I find the slope from two points?

Slope is rise over run: m = (y₂ − y₁) ÷ (x₂ − x₁). For (1, 2) and (4, 8), m = 6 ÷ 3 = 2. Type the two points and the calculator shows each step.

Can I type fractions?

Yes: 3/4, −1/2 or a mixed number such as 1 1/2, as well as decimals. Results are exact fractions, with the decimal beside them.

What does an undefined slope mean?

The two points have the same x, so the line is vertical: the run is zero and you cannot divide by it. Its equation is x = that value.

Which forms of the line equation does it give?

Slope-intercept y = mx + b, point-slope y − y₁ = m(x − x₁) and standard form Ax + By = C with whole numbers.

What else does it work out?

The angle of the line, the slope as a percent grade, the distance between the points (also as a square root when exact), the midpoint and both intercepts.