®

Online Calculators

Slope Calculator

Slope Calculator - Two Points
use whole numbers, fractions or decimals
( )
=
( )
=
Answer:
\[ \text{Slope} \; m = -\dfrac{12}{5}\]As a decimal:
m = -2.4


Graph of the line y = mx + b

Graph tools will zoom, move and enter full screen mode.
Or, use <Shift> with a mouse to zoom and move.

press esc to exit full screen mode


Slope Solution
\[ m = \dfrac{rise}{run} = \dfrac{\Delta y}{\Delta x} \]\[ m = \dfrac{y_2 - y_1}{x_2 - x_1} \]\[ m = \dfrac{-9 - 3}{7 - 2} \]\[ m = \dfrac{-12}{5} \]\[ m = -\dfrac{12}{5} \]In decimals:
m = -2.4

Point Slope Form
\[ y - y_1 = m(x - x_1) \]\[ y - 3 = -\dfrac{12}{5}\left(x - 2\right) \]In decimals:\[ y - 3 = -2.4\left(x - 2\right) \]
Slope Intercept Form
Find the Equation of the Line:\[ y = mx + b \]by solving for y using the Point Slope Equation.\[ y - y_1 = m(x - x_1) \]\[ y - 3 = -\dfrac{12}{5}\left(x - 2\right) \]\[ y - 3 = -\dfrac{12}{5}x - \left(-\dfrac{12}{5} \times 2\right) \]\[ y - 3 = -\dfrac{12}{5}x --\dfrac{24}{5} \]\[ y - 3 = -\dfrac{12}{5}x +\dfrac{24}{5} \]\[ y = -\dfrac{12}{5}x +\dfrac{24}{5}+3 \]\[ y = -\dfrac{12}{5}x +\dfrac{39}{5} \]
\[ m = -\dfrac{12}{5} \]\[ b = \dfrac{39}{5} \]In decimals:\[ y = -2.4x +7.8 \]
Standard Form of a Linear Equation
\[ Ax + By = C \]Starting with y = mx + b\[ y = -\dfrac{12}{5}x +\dfrac{39}{5} \]Multiply through by the common denominator, 5, to eliminate the fractions:
\[ 5y = -12x +39 \]
Then rearrange to the Standard Form Equation:\[12x + 5y = 39\]\[ A = 12 \]\[ B = 5 \]\[ C = 39 \]
y-Intercept, when x = 0
\[ y = mx + b \]\[ y = -\dfrac{12}{5}x +\dfrac{39}{5} \]When x = 0\[ y = -\dfrac{12}{5}\times 0 +\dfrac{39}{5} \]\[ y = \dfrac{39}{5} \]\[ \text{y-intercept} = \dfrac{39}{5} \]\[ (x,y) = \left(0, \; \dfrac{39}{5}\right) \]In decimals:\[ (x,y) = \left(0, \; 7.8\right) \]
x-Intercept, when y = 0
\[ y = mx + b \]\[ y = -\dfrac{12}{5}x +\dfrac{39}{5} \]When y = 0\[ 0 = -\dfrac{12}{5}x +\dfrac{39}{5} \]\[ \dfrac{12}{5}x = \dfrac{39}{5} \]\[ x = \dfrac{39}{\require{cancel} \cancel{5}} \times \dfrac{\require{cancel} \cancel{5}}{12} \]\[ x = \dfrac{39}{12} \]\[ x = \dfrac{13}{4} \]\[ \text{x-intercept} = \dfrac{13}{4} \]\[ (x,y) = \left(\dfrac{13}{4}, \; 0\right) \]In decimals:\[ (x,y) = \left(3.25, \; 0\right) \]



Calculator Use

The slope of a line is its vertical change divided by its horizontal change, also known as rise over run. When you have 2 points on a line on a graph the slope is the change in y divided by the change in x.

The slope of a line is a measure of how steep it is.

Slope Calculator Solutions

Input two points using numbers, fractions, mixed numbers or decimals. The slope calculator shows the work and gives these slope solutions:

  • Slope m with two points
  • Graph of the line for y = mx + b
  • Point Slope Form y - y1 = m(x - x1)
  • Slope Intercept Form y = mx + b
  • Standard Form Ax + By = C
  • y-intercept, when x = 0
  • x-intercept, when y = 0

You will also be provided with a custom link to the Midpoint Calculator that will solve and show the work to find the midpoint and distance for your given two points.

How to Calculate Slope of a Line

Calculate slope, m using the formula for slope:

Slope Formula

\[ m = \dfrac {(y_{2} - y_{1})} {(x_{2} - x_{1})} \] \[ m = \dfrac{rise}{run} = \dfrac{\Delta y}{\Delta x} = \dfrac{y_2 - y_1}{x_2 - x_1} \]

Here you need to know the coordinates of 2 points on a line, (x1, y1) and (x2, y2).

How to Find Slope of a Line

  1. Find the difference between the y coordinates, Δy is change in y
Δy = y2 - y1
  1. Find the difference between the x coordinates, Δx is change in x
Δx = x2 - x1
  1. Divide Δy by Δx to find slope
m = Δy/Δx

Example: Find the Slope

Say you know two points on a line and their coordinates are (2, 5) and (9, 19). Find slope by finding the difference in the y points, and divide that by the difference in the x points.

  1. The difference between y coordinates Δy is
Δy = y2 - y1
Δy = 19 - 5
Δy = 14
  1. The difference between x coordinates Δx is
Δx = x2 - x1
Δx = 9 - 2
Δx = 7
  1. Divide Δy by Δx to find slope m
\( m = \dfrac {14} {7} \)
\(m = 2 \)

Line Equations with Slope

There are 3 common ways to write line equations with slope:

  • Point slope form
  • Slope intercept form
  • Standard form

Point slope form is written as

y - y1 = m(x - x1)

Using the coordinates of one of the points on the line, insert the values in the x1 and y1 spots to get an equation of a line in point slope form.

Lets use a point from the original example above (2, 5), and the slope which we calculated as 2. Put those values in the point slope format to get an equation of that line in point slope form:

y - 5 = 2(x - 2)

If you simplify the point slope equation above you get the equation of the line in slope intercept form.

Slope intercept form is written as

y = mx + b

Take the point slope form equation and multiply out 2 times x and 2 times 2.

y - 5 = 2(x - 2)
y - 5 = 2x - 4

Continue to work the equation so that y is on one side of the equals sign and everything else is on the other side.

Add 5 to both sides of the equation to get the equation in slope intercept form:

y = 2x + 1

Standard form of the equation for a line is written as

Ax + By = C

You may also see standard form written as Ax + By + C = 0 in some references.

Use either the point slope form or slope intercept form equation and work out the math to rearrange the equation into standard form. Note that the equation should not include fractions or decimals, and the x coefficient should only be positive.

Slope intercept form: y = 2x + 1

Subtract y from both sides of the equation to get 2x - y + 1 = 0

Subtract 1 from both sides of the equation to get 2x - y = -1

Slope intercept form y = 2x + 1 becomes 2x - y = -1 written in standard form.

Where A = 2, B = -1, and C = -1.

Find Slope From an Equation

If you have the equation for a line you can put it into slope intercept form. The coefficient of x will be the slope.

Example

You have the equation of a line, 6x - 2y = 12, and you need to find the slope.

Your goal is to get the equation into slope intercept format y = mx + b

  1. Start with your equation 6x - 2y = 12
  2. Add 2y to both sides to get 6x = 12 + 2y
  3. Subtract 12 from both sides of the equation to get 6x - 12 = 2y
  4. You want to get y by itself on one side of the equation, so you need to divide both sides by 2 to get y = 3x - 6
  5. This is slope intercept form, y = 3x - 6. Slope is the coefficient of x so in this case slope = 3

How to Find the y-Intercept

The y-intercept of a line is the value of y when x=0. It is the point where the line crosses the y axis.

Using the equation y = 3x - 6, set x=0 to find the y-intercept.

y = 3(0) - 6
y = -6
The y-intercept is -6

How to Find the x-Intercept

The x-intercept of a line is the value of x when y=0. It is the point where the line crosses the x axis.

Using the equation y = 3x - 6, set y=0 to find the x-intercept.

0 = 3x - 6
3x = 6
x = 2
The x-intercept is 2

Slope of Parallel Lines

If you know the slope of a line, any line parallel to it will have the same slope and these lines will never intersect.

Slope of Perpendicular Lines

If you know the slope of a line, any line perpendicular to it will have a slope equal to the negative inverse of the known slope.

Perpendicular means the lines form a 90° angle when they intersect.

Say you have a line with a slope of -4. What is the slope of the line perpendicular to it?

  • First, take the negative of the slope of your line
    -(-4) = 4
  • Second, take the inverse of that number. 4 is a whole number so its denominator is 1. The inverse of 4/1 is 1/4.
  • The negative inverse of a slope of -4 is a slope of 1/4.
  • A line perpendicular to your original line has a slope of 1/4.

Further Study

Brian McLogan (2014) Determining the slope between two points as fractions, 10 June. At https://www.youtube.com/watch?v=Hz_eapwVcrM

 

Cite this content, page or calculator as:

Furey, Edward "Slope Calculator" at https://www.calculatorsoup.com/calculators/geometry-plane/slope-calculator.php from CalculatorSoup, https://www.calculatorsoup.com - Online Calculators

Last updated: July 5, 2024

Follow CalculatorSoup: