Skip to content

Slope Calculator

Last updated

Two points

Point 1
Point 2

Results update as you type

— slope
  • Working shown
  • Instant results
  • Runs in your browser

Enter two points and this slope calculator finds the slope (rise over run), the line's equation in slope-intercept and point-slope form, the angle of the line, its percent grade and the distance between the points.

Use the calculator above for your own numbers. Below, we explain how the Slope Calculator works, with worked examples and sources.

How to find the slope from two points

  1. Label the points (x₁, y₁) and (x₂, y₂).
  2. Subtract the y-values to get the rise: y₂ − y₁.
  3. Subtract the x-values in the same order to get the run: x₂ − x₁.
  4. Divide rise by run and simplify.

Example: (2, 3) and (6, 11). Rise = 11 − 3 = 8. Run = 6 − 2 = 4. Slope = 8 ÷ 4 = 2. It does not matter which point you call the first one, as long as you use the same order on top and bottom.

What the slope tells you – Positive Rises left to right m = 2; Negative Falls left to right m = −0.5; Zero Horizontal y = 5
Slope – reference table.

Writing the equation of the line

Once you know the slope, find the y-intercept b from either point: b = y₁ − m x₁ = 3 − 2 × 2 = -1. The slope-intercept form is y = 2x − 1. In point-slope form the same line is y − 3 = 2(x − 2).

What the slope tells you

SlopeLineExample
PositiveRises left to rightm = 2
NegativeFalls left to rightm = −0.5
ZeroHorizontaly = 5
UndefinedVerticalx = 3

Parallel lines have equal slopes. Perpendicular lines have slopes that multiply to −1, so a line perpendicular to m = 2 has slope −1/2.

Slope as an angle and a percent grade

Engineers and builders often give slope as a percent grade (rise ÷ run × 100) or an angle. A slope of 2 is a 200% grade and an angle of about 63.4°. A wheelchair ramp at 1:12 rises 1 unit for every 12 along the ground, a grade of 8.33% and an angle of about 4.76°.

Rise : runGradeAngle
1 : 128.3%4.8°
1 : 425%14°
1 : 250%26.6°
1 : 1100%45°

Common mistakes

  • Subtracting the x-values in a different order from the y-values.
  • Dividing run by rise instead of rise by run.
  • Calling a vertical line's slope 0 – it is undefined; a horizontal line has slope 0.
  • Forgetting the sign when a coordinate is negative: 4 − (−2) = 6.

Sources

  1. Khan Academy – Algebra 1 — khanacademy.org/math/algebra
  2. OpenStax – Algebra and Trigonometry 2e (Rice University) — openstax.org/details/books/algebra-and-trigonometry-2e

Questions or feedback about this calculator? Contact us – we read every message. Results are estimates for information only. Last reviewed: .

Zeeshan Nawaz

Written & built by

Zeeshan Nawaz

Calculator Developer · Tuff Search

Builds and tests Tuff Search calculators, turning published formulas and official sources into tools anyone can check.

FAQ

Frequently asked questions

Quick answers about the Slope Calculator.

m = (y₂ − y₁) ÷ (x₂ − x₁), the change in y divided by the change in x.

The line is horizontal; y stays the same as x changes.

The run is zero, and you cannot divide by zero.

Multiply the slope by 100. A slope of 0.08 is an 8% grade.

Yes, in coordinate geometry 'gradient' and 'slope' mean the same thing.

Still have a question? Email support@tuffsearch.com

Keep exploring

Related calculators

More calculators people use alongside this one.