πAI Math Solver

Calculators

Slope Calculator

A slope calculator from two points: enter the coordinates and get the slope, the y-intercept, and the line's equation, with rise over run shown.

Enter the coordinates of two points, then click Calculate.

Type or handwrite the full problem — the AI will solve it and explain every step

How to use this slope calculator

Type two points, click Calculate. This slope calculator gives the slope, the y-intercept, and the line's equation instantly, right on the page.

  • First point, x and y — the coordinates of your first point, such as (1,2)(1, 2) in the calculator's default
  • Second point, x and y — the coordinates of your second point, such as (4,8)(4, 8)

You immediately get two results: the slope m (the rise over run between your points) and the y-intercept b of y=mx+by = mx + b. With the defaults, the slope calculator returns m=2m = 2 and b=0b = 0: the line y=2xy = 2x.

This page is more than a static slope calculator — it is also an AI tutor you can ask questions:

  • Ask in plain words. “What is the slope of the line through (1, 2) and (4, 8)?” The AI reads it and solves it step by step.
  • Take a photo of your homework. No typing: the AI reads the points and shows every step.
  • Ask about the ideas, not just the number. “Why is a vertical line's slope undefined?” The AI explains — and you can check every number against the slope calculator on this page, so nothing is guessed.
  • Work backwards, then keep asking. Give a slope and a point, and ask for the line. Follow-up questions are welcome, so ask “why?” as often as you need: the slope calculator page keeps teaching.

What slope tells you

Slope is rise over run: how far a line climbs (or falls) for each step you take to the right. Move 1 unit right along a line with slope 2 and you rise 2 units. Move 1 unit right along a line with slope −2-2 and you drop 2 units. One number carries both the steepness and the direction of a line — that is what a slope calculator reads out.

Every line lands in one of four cases:

  • Positive slope — the line rises from left to right, like y=2xy = 2x.
  • Negative slope — the line falls from left to right, like y=−2x+5y = -2x + 5.
  • Zero slope — a horizontal line, like y=5y = 5: no rise at all, so m=0m = 0.
  • Undefined slope — a vertical line, like x=3x = 3: no run to divide by, so the slope does not exist.

The last pair is where most slips happen. Horizontal means slope 0 — fine. Vertical means undefined, not 0. Enter two points that share one x into the slope calculator and it tells you exactly that: the line is vertical, and no single number describes its steepness.

The slope formula

Two points are all a slope calculator needs. The vertical change between them is the rise, the horizontal change is the run, and the slope is their quotient:

m=y2−y1x2−x1m=\dfrac{y_2-y_1}{x_2-x_1}

SymbolMeaning
(x1,y1)(x_1, y_1)the first point
(x2,y2)(x_2, y_2)the second point
y2−y1y_2 - y_1the rise (vertical change)
x2−x1x_2 - x_1the run (horizontal change)
mmthe slope

One discipline and one only: pick which point is first and stay with it. The rise and the run must both subtract in the same direction — that habit keeps the sign of mm honest, and the slope calculator follows it automatically.

One guarantee comes with the formula: a straight line has exactly one slope. Pick any two points on the same line and the slope calculator returns the same mm every time. So it never matters which pair of points you grabbed from the line — and one point plus the slope is enough to draw the whole thing.

Example 1 - positive slope

Find the slope and the equation of the line through (1,2)(1, 2) and (4,8)(4, 8) — the slope calculator's default points.

  1. Rise: y2−y1=8−2=6y_2 - y_1 = 8 - 2 = 6.
  2. Run: x2−x1=4−1=3x_2 - x_1 = 4 - 1 = 3.
  3. Slope: m=63=2m = \dfrac{6}{3} = 2. Every 1 unit right, the line climbs 2 units.
  4. y-intercept: b=y1−mx1=2−2×1=0b = y_1 - m x_1 = 2 - 2 \times 1 = 0.

So the line is y=2x+0y = 2x + 0, or just y=2xy = 2x — it passes straight through the origin. Read m=2m = 2 as rise over run: from (1,2)(1, 2), step 3 units right and 6 units up — run 3, rise 6 — and you land exactly on (4,8)(4, 8). The slope is the directions between your two points, nothing more.

Check it against the second point: when x=4x = 4, y=2×4=8y = 2 \times 4 = 8. Point (4,8)(4, 8) is on the line, exactly as given. Click Calculate above and the slope calculator walks all four steps with you.

From slope to a line equation

Negative slopes run the same route — the arithmetic just carries a minus sign. Take the line through (0,5)(0, 5) and (2,1)(2, 1).

  1. Rise: 1−5=−41 - 5 = -4.
  2. Run: 2−0=22 - 0 = 2.
  3. Slope: m=−42=−2m = \dfrac{-4}{2} = -2. The line drops 2 units for every 1 unit right.
  4. y-intercept: (0,5)(0, 5) sits on the y-axis, so b=5b = 5 — or compute it: b=y1−mx1=5−(−2)(0)=5b = y_1 - m x_1 = 5 - (-2)(0) = 5.

The line is y=−2x+5y = -2x + 5. Now the general move from any slope to a full equation. With a point (x1,y1)(x_1, y_1) and slope mm, point-slope form writes the line at once:

y−y1=m(x−x1)y - y_1 = m(x - x_1)

Expand and collect: y−5=−2(x−0)y - 5 = -2(x - 0) becomes y=−2x+5y = -2x + 5 — slope-intercept form again. Use point-slope when you know a point, slope-intercept when you want to read mm and bb fast; the slope calculator above hands you both.

Common slope calculator mistakes

  1. Flipping rise and run. Slope is rise over run — y-change over x-change, ΔyΔx\dfrac{\Delta y}{\Delta x}. Divide the run by the rise and you get the reciprocal: a different number. Keep y2−y1y_2 - y_1 on top.
  2. Subtracting in mixed order. If the rise uses y2−y1y_2 - y_1, the run must use x2−x1x_2 - x_1. Compute one forwards and the other backwards and the sign of your slope flips. Subtract in the same direction both times.
  3. Confusing zero with undefined. A horizontal line has slope 0 (the rise is 0). A vertical line's slope is undefined (the run is 0). The slope calculator labels the vertical case instead of guessing.

One habit catches all three: write the formula, substitute with parentheses, simplify. That is the exact sequence the slope calculator above runs — compare your working line by line.

Problem 1

A line passes through the points (2, 3) and (6, 11). What is the slope of the line? Check your answer with the slope calculator above.

⏱ 00:00
Page 1
Problem 2

A line passes through the points (−1, 4) and (3, −8). What is the slope of the line? Check your answer with the slope calculator above.

⏱ 00:00
Page 1

Frequently asked questions

1

How is slope calculated from two points?

Subtract the y-coordinates for the rise, subtract the x-coordinates for the run, and divide: m = (y₂ − y₁) ÷ (x₂ − x₁), subtracting in the same direction both times. The slope calculator above runs exactly this division.

2

How do you find the slope between two points?

Label one point (x₁, y₁) and the other (x₂, y₂), then compute (y₂ − y₁) ÷ (x₂ − x₁). For (1, 2) and (4, 8) that is 6 ÷ 3 = 2. Any slope calculator — including the one on this page — does the same two subtractions and one division.

3

What do positive and negative slopes mean?

Positive slope means the line rises left to right (like y = 2x); negative slope means it falls (like y = −2x + 5). Zero slope is a flat horizontal line and a vertical line's slope is undefined — all four cases show up in the slope calculator.

4

What does a negative slope mean?

The line falls as you move right: y goes down while x goes up, like m = −2 dropping 2 units per 1 unit right. The slope calculator keeps the minus sign — it points down, not wrong.

5

What is the slope of a vertical line?

Undefined. Both points share one x, so the run x₂ − x₁ is 0 and division by zero has no answer. The slope calculator reports the vertical-line case instead of a number. A horizontal line, by contrast, has slope 0.

6

How do I find the y-intercept from two points?

Find the slope m first, then use b = y₁ − m·x₁ with either point. For (1, 2) with m = 2: b = 2 − 2 = 0, so the line is y = 2x. The slope calculator above returns b in its second row.

7

Can two points have the same slope in different orders?

Yes — swapping which point is first flips the sign of both rise and run, and the two negatives cancel: (y₁ − y₂) ÷ (x₁ − x₂) equals (y₂ − y₁) ÷ (x₂ − x₁). The order of your two points never changes the slope the slope calculator returns, as long as you stay consistent within each subtraction.

Related practice