Free Algebra Solver
Slope

Slope Calculator

Enter two points such as (1, 2) and (3, 8), or a line like 2x + 3y = 6. You get the slope, the y-intercept, and the equation of the line.

Interpreted as: (1, 2) and (3, 8) (Slope) Ready
Examples
Solution

Worked example: (1, 2) and (3, 8)

Worked example. Edit the problem above and press Slope to solve your own.

Problem(1, 2) and (3, 8)
  1. Label the points

    Call the first point (x₁, y₁) and the second (x₂, y₂). The order does not matter as long as you keep it consistent.

    (x₁, y₁) = (1, 2)
    First point
    (x₂, y₂) = (3, 8)
    Second point

    Swapping both points changes the sign of the rise and the run, so the slope stays the same.

  2. Use the slope formula

    Slope is rise over run: the change in y divided by the change in x.

    y₂ − y₁/x₂ − x₁ = 8 − 2/3 − 1
    Substitute the coordinates
    m = 6/2 = 3
    Simplify

    Every pair of points on a straight line gives the same ratio.

  3. Find the y-intercept b

    Substitute one point and the slope into y = mx + b, then solve for b.

    2 = 3(1) + b
    Use the first point
    b = 2 − 3 = −1
    Solve for b

    The point lies on the line, so its coordinates satisfy the equation.

  4. Write the equation of the line

    Put m and b into slope-intercept form, and rewrite it in point-slope and standard form.

    y = 3x − 1
    Slope-intercept form
    y − 2 = 3(x − 1)
    Point-slope form
    3x − y = 1
    Standard form
    x-intercept: (1/3, 0), y-intercept: (0, −1)
    Intercepts

    All three forms describe the same line.

Answerm = 3; y = 3x − 1

Slope guide

How to use the slope calculator

This slope calculator finds the slope of a line from two points or from an equation, then writes the line in slope-intercept, point-slope, and standard form. Enter two points like (1, 2) and (3, 8), or a line like 2x + 3y = 6.

How do you find the slope of a line?

Slope is rise over run: m = (y₂ − y₁)/(x₂ − x₁). Subtract the y-values, subtract the x-values in the same order, and divide. For the points (1, 2) and (3, 8), m = (8 − 2)/(3 − 1) = 6/2 = 3. A positive slope rises from left to right; a negative slope falls.

What is the slope formula?

The slope formula is m = (y₂ − y₁)/(x₂ − x₁), the change in y divided by the change in x. It measures how far the line goes up for each step to the right.

Slope
m =y₂ − y₁x₂ − x₁

Which point you call first does not matter, as long as you use the same order on top and bottom. Swapping both flips both signs, so the slope stays the same.

Try it with (3, 8) first: (2 − 8)/(1 − 3) = −6/−2 = 3. Same answer. The slope of a straight line is the same between any two of its points, which is why two points are enough to pin the line down.

How do you find the equation of a line from two points?

Find the slope, substitute one point into y = mx + b to get b, then write the equation. For (1, 2) and (3, 8) the line is y = 3x − 1.

Slope
m = (8 − 2)/(3 − 1) = 6/2 = 3
Use (1, 2)
2 = 3(1) + b
Solve for b
b = 2 − 3 = −1
Slope-intercept form
y = 3x − 1

Check it with the other point: 3(3) − 1 = 8. The line also crosses the x-axis at (1/3, 0) and the y-axis at (0, −1).

What are slope-intercept, point-slope, and standard form?

They are three ways to write the same line. The calculator gives all of them, so you can copy whichever one your teacher asks for.

FormGeneral shapeLine through (1, 2) and (3, 8)
Slope-intercepty = mx + by = 3x − 1
Point-slopey − y₁ = m(x − x₁)y − 2 = 3(x − 1)
StandardAx + By = C3x − y = 1

Slope-intercept form is best for graphing and reading the y-intercept. Point-slope form is the fastest to write when you know a point and the slope. Standard form keeps x and y together and avoids fractions.

Point-slope form changes depending on which point you use. Through (3, 8) the same line is y − 8 = 3(x − 3). Both versions simplify to y = 3x − 1, so either one is correct.

How do you find the slope from an equation like 2x + 3y = 6?

Solve for y, then read the coefficient of x. For 2x + 3y = 6 the slope is −2/3 and the y-intercept is (0, 2).

Subtract 2x from both sides to get 3y = −2x + 6. Divide every term by 3: y = −(2/3)x + 2. This is what a slope intercept form calculator does when you give it a line in standard form. As a shortcut, the slope of Ax + By = C is always −A/B.

What is the difference between zero slope and undefined slope?

A horizontal line has slope 0, and a vertical line has an undefined slope. The difference comes from which part of the fraction is zero.

For (1, 4) and (5, 4), the rise is 0, so m = 0/4 = 0 and the line is y = 4. For (2, 1) and (2, 7), the run is 2 − 2 = 0. Dividing by zero is undefined, so the line has no slope and its equation is x = 2.

How do you find the y-intercept?

Put x = 0 into the equation, or read b from y = mx + b. For y = 3x − 1, the y-intercept is (0, −1).

If you only have two points, find the slope first and then solve y₁ = m·x₁ + b for b. The calculator works as a y intercept calculator this way, and it shows the substitution step.

For a line in standard form, set x = 0 and solve. In 2x + 3y = 6 that leaves 3y = 6, so y = 2 and the intercept is (0, 2). Setting y = 0 instead gives the x-intercept, (3, 0). Those two points are often the quickest way to graph a line in standard form.

What are common slope mistakes?

Mixing the order is the most common: (8 − 2)/(1 − 3) gives −3 instead of 3. Keep the same point first in both the top and the bottom.

Putting x on top (run over rise) is another. Students also read the slope of 2x + 3y = 6 as 2, forgetting to solve for y first, and call a vertical line's slope 0 when it is undefined.

What does rise over run mean on a graph?

Rise is how far you move up or down between two points, and run is how far you move left or right. Slope is the rise divided by the run.

On the line y = 3x − 1, start at (0, −1). Move 1 unit right and 3 units up, and you land on (1, 2). Do it again and you reach (2, 5). Counting boxes like this on graph paper is a quick way to read a slope without the formula.

A slope of −2/3 works the same way: 3 units right and 2 units down. Keep the sign on the rise and the run positive, and you won't get confused about direction.

Frequently asked questions

Short answers to the questions people ask most about this topic.

What is slope in simple terms?

Slope is how steep a line is. It tells you how much y changes when x goes up by 1. A slope of 3 means the line rises 3 units for every 1 unit to the right.

How do I write a line in point slope form?

Use y − y₁ = m(x − x₁) with your slope and any point on the line. Through (1, 2) with slope 3, it is y − 2 = 3(x − 1).

Can the slope be a fraction?

Yes. The line 2x + 3y = 6 has slope −2/3, which means it drops 2 units for every 3 units to the right.

What does a negative slope mean?

The line goes down as you move from left to right. A positive slope goes up.

How do I convert slope-intercept form to standard form?

Move the x term to the left and clear any fractions. y = 3x − 1 becomes −3x + y = −1, and multiplying by −1 gives 3x − y = 1.

Are parallel lines' slopes the same?

Yes. Parallel lines have equal slopes. Perpendicular lines have slopes that multiply to −1, such as 3 and −1/3.

Can I enter a line in slope-intercept form?

Yes. Type something like y = 3x − 1 and the calculator reads the slope and intercept, then gives point-slope and standard form too.

Math keypad

Slope mode

Use the keypad below or tap the expression to use your phone keyboard.

Keyboard tips

Ctrl + Enter
Run the selected operation
^
Enter a power, such as x^2
sqrt(
Calculate an exact or simplified square root
a:b
Separate quantities in a ratio
12, 18
Separate integers in an LCM and GCD calculation
@ x =
Assign x when evaluating an expression
y =
Enter a polynomial function to graph
|
Wrap an absolute-value expression