Slope Calculator (With Steps) — Find the Slope of a Line Between Two Points

Slope Calculator

Choose your calculator☝️

Enter the coordinates (x1,y1)\hspace{0.2em} (x_1, y_1) \hspace{0.2em}

P1=(\hspace{0.2em} P_1 = ( \hspace{0.2em} , )\hspace{0.2em} ) \hspace{0.2em}

Enter the coordinates (x2,y2)\hspace{0.2em} (x_2, y_2) \hspace{0.2em}

P2=(\hspace{0.2em} P_2 = ( \hspace{0.2em} , )\hspace{0.2em} ) \hspace{0.2em}
slope of a line passing through two points - illustration

Hello there!

Please provide your input and click the calculate button
Show Solution Hide Solution

About the Slope Calculator

This slope calculator lets you calculate the slope of a line if you know any two istinct points on the line or the the line's equation.

The calculator will tell you not only the slope, but also how to calculate it.

Usage Guide

Show Hide

i. Valid Inputs

Each input can be a real number in any format — integers, decimals, fractions, or even mixed numbers. Here are a few examples.

  • Whole numbers or decimals → 2\hspace{0.2em} 2 \hspace{0.2em}, 4.25\hspace{0.2em} -4.25 \hspace{0.2em}, 0\hspace{0.2em} 0 \hspace{0.2em}, 0.33\hspace{0.2em} 0.33 \hspace{0.2em}
  • Fractions → 2/3\hspace{0.2em} 2/3 \hspace{0.2em}, 1/5\hspace{0.2em} -1/5 \hspace{0.2em}
  • Mixed numbers → 51/4\hspace{0.2em} 5 \hspace{0.5em} 1/4 \hspace{0.2em}

IMPORTANT — When providing inputs for the linear equation, the coefficients of x\hspace{0.2em} x \hspace{0.2em} and y\hspace{0.2em} y \hspace{0.2em} cannot both be 0\hspace{0.2em} 0 \hspace{0.2em} at the same time. That would eliminate both variables from the equation and hence it will no longer be a linear equation.

ii. Example

If you would like to see an example of the calculator's working, just click the "example" button.

iii. Solutions

As mentioned earlier, the calculator won't just tell you the answer but also the steps you can follow to do the calculation yourself. The "show/hide solution" button would be available to you after the calculator has processed your input.

iv. Share

We would love to see you share our calculators with your family, friends, or anyone else who might find it useful.

By checking the "include calculation" checkbox, you can share your calculation as well.


Here's a quick overview of the slope of a line.

For those interested, we have a more comprehensive tutorial on the slope of a line and its calculation.

Slope of a Line

In analytical geometry, we often need to find the slope between two points or two parallel lines or from a point to a line.

The slope of a line is a measure of its steepness and direction. It is the ratio of the rise (change in y\hspace{0.2em} y–coordinate) to the run (change in x\hspace{0.2em} x–coordinate) as we move from one point to another on the line.

Finding the Slope

How we find the slope depends on what information we have about the line. Let's look at a couple of important cases.

Two Points on the Line

If a line passes through points (x1,y0)\hspace{0.2em} (x_1, \hspace{0.2em} y_0) \hspace{0.2em} and (x2,y2)\hspace{0.2em} (x_2, \hspace{0.2em} y_2) \hspace{0.2em}, its slope m\hspace{0.2em} m \hspace{0.2em} is given by the formula —

m=y2y1x2x1m \hspace{0.2em} = \hspace{0.2em} \frac{y_2 - y_1}{x_2 - x_1}

Equation of the Line

If the equation of a line is of the form y=mx+b\hspace{0.2em} y = {\color{Red} m} x + b \hspace{0.2em} (slope–interecept form), it's slope would be m\hspace{0.2em} {\color{Red} m} \hspace{0.2em}.

If the equation of the line is in some other form, we first convert it into the slope– intercept form, them extract the slope from it.

Slope Calculation

Share  via

Include calculation