Slope Calculator Guide: Formula, Two-Point Examples and Line Equations

The slope of a line describes how steeply it rises or falls as you move from left to right on a coordinate graph. A slope calculator helps you find the gradient between two points and understand whether the line increases, decreases, or stays level.

How to calculate slope from two points

For two points (x₁, y₁) and (x₂, y₂), use:

m = (y₂ − y₁) / (x₂ − x₁)

The numerator is the vertical change, or rise. The denominator is the horizontal change, or run. You must subtract coordinates in the same order in both parts.

Worked example

Suppose a line passes through (2, 3) and (6, 11). The rise is 11 − 3 = 8, and the run is 6 − 2 = 4. Therefore, m = 8 / 4 = 2. The line rises by two vertical units for every one horizontal unit.

How to use an online slope calculator

  1. Open the Slope Calculator.
  2. Enter the coordinates of the first point.
  3. Enter the coordinates of the second point.
  4. Calculate the slope and check any equation or graph shown.
  5. Confirm that the points were entered in the correct x and y fields.

Types of slope

Slope Meaning Example
Positive Line rises left to right m = 3
Negative Line falls left to right m = −2
Zero Horizontal line m = 0
Undefined Vertical line x₁ = x₂

Slope-intercept form

A nonvertical straight line can be written as y = mx + b, where m is slope and b is the y-intercept. If m = 2 and the line passes through (2, 3), then 3 = 2(2) + b, giving b = −1. The equation is y = 2x − 1.

Common mistakes

  • Subtracting x coordinates in one order and y coordinates in the opposite order.
  • Dividing by zero for a vertical line.
  • Confusing slope with the y-intercept.
  • Assuming slope is always a positive number.

Frequently asked questions

What does a slope of 1 mean?

The line rises one unit for each one-unit increase in x.

What is the slope of a horizontal line?

Zero, because the y coordinate does not change.

What is the slope of a vertical line?

Undefined, because the horizontal change is zero and division by zero is not defined.

Can two different points have the same x coordinate?

Yes. They define a vertical line with undefined slope.

Try the free slope calculator to check your coordinates and gradient.

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top