Slope Calculator - Gradient, Line Equation and Distance

Slope between two points

First point

x₁ y₁

Second point

x₂ y₂
Slope 2 y = 2x
Angle
y-intercept
Distance
Midpoint

What slope really measures

Slope is rise over run: how much the line climbs for every step it takes sideways. A slope of 2 means two units up for one across; a slope of −0.5 means half a unit down. The number is a rate, not a length, which is why the same slope describes a wheelchair ramp and a hillside road.

Using it in three steps

  1. 1 Type the coordinates of the first point, x then y.
  2. 2 Do the same for the second point. Order does not matter: swapping the two points gives the same slope.
  3. 3 Read the slope and the line equation at the top; the angle, intercept, distance and midpoint sit below.

Vertical lines have no slope

When both points share the same x, the run is zero and the formula would divide by it. This calculator says the slope does not exist instead of printing infinity, because infinity reads as "very steep" when the truth is that the question does not apply. The line still has an equation - it is just x = a number.

Slope as a percentage

Road signs and building codes usually quote slope as a percentage, which is simply the slope multiplied by a hundred: a gradient of 0.08 is an 8 percent grade. Accessibility rules for ramps are often written this way, and so are railway limits. The angle shown here is the same thing expressed in degrees - 8 percent is about 4.6 degrees, not 8.

Slope and line equations - frequently asked questions

No. Swapping the points flips the sign of both the rise and the run, and the two minus signs cancel. Distance and midpoint are unaffected too. The only thing that changes is nothing you can see, which is a useful check: if swapping them changes your hand-worked answer, a sign went astray.
New
Ohm's Law Enter any two of voltage, current, resistance and power, and the other two are worked out for you. Every pairing is supported, not just volts and amps.
Popular Today
Scientific Notation Convert between ordinary decimals and scientific notation in either direction, with engineering notation and a significant figures count alongside.

Other math calculators

Scientific Calculator A scientific calculator with trigonometry, logarithms, powers, roots and factorials. Type an expression or use the keypad; degrees and radians both supported.
Fraction Calculator Add, subtract, multiply or divide two fractions. The answer is simplified and also shown as a mixed number and a decimal, so you can use the form you need.
Standard Deviation Paste a list of numbers and get the standard deviation, variance, mean, median, mode and range at once - both the sample and the population version.
Quadratic Solver Enter a, b and c to solve ax² + bx + c = 0. You get the roots, the discriminant that decides how many there are, and the vertex of the parabola.
Triangle Calculator Solve a right triangle from any two sides, or a general triangle from all three. You get the missing side, all three angles, the area and a drawing to scale.

Other Calculators You May Like

Age Calculator Free age calculator: enter your birth date to see your exact age in years, months, days, hours and minutes, plus the countdown to your next birthday.
Date Difference Calculator Free date difference calculator: find the exact time between two dates in years, months, days and weeks, and see how many working days fall in between.
Day of the Week Calculator Free day of the week calculator: find out which weekday any date falls on - past or future - handy for birthdays, events and historical dates.
Business Days Calculator Free business days calculator: count the working days between two dates, weekends excluded - useful for deadlines, delivery dates and project planning.
Week Number Calculator Free ISO 8601 week number calculator: find which week of the year any date falls in, and see the first and last day of that week at a glance.