CalculatorForEver
MATH / CALCULATOR

Slope Calculator

Find a line’s rise over run from two points.

The slope of a straight line is the change in y divided by the change in x between two points. It describes rise per unit of run.

Your numbers

BROWSER-LOCAL INPUTS

Your inputs stay in this browser. No account needed.

RESULT

Your result

Enter your values and select Calculate.

Check the units and assumptions before using this result.

METHOD

How the slope calculator works

How to use this calculator

Enter the two coordinate pairs in the order shown.

What the result means

Slope compares vertical change with horizontal change. It is positive when the two coordinates rise together and negative when y falls as x increases. A vertical line has no finite slope because its horizontal change is zero.

The formula

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

A worked example

From (0,0) to (3,4), the slope is 4/3, or approximately 1.333333.

Assumptions & methodology

A vertical line has undefined slope. Repeating the same point does not determine a line. Results are rounded for display; intermediate calculations retain precision. This tool is informational and does not replace institutional or professional guidance.

References

OpenStax: Introductory Statistics and Prealgebra.

INTERPRETATION

Understanding slope results

Keep the coordinate order consistent

Subtract the coordinates in the same order for both numerator and denominator. Swapping both point orders leaves the slope unchanged; swapping only one changes its sign. A horizontal line has zero slope because its rise is zero.

Vertical lines and identical points

A vertical line has zero run, so its slope is undefined rather than infinitely large as an ordinary number. Two identical points do not determine one line. This tool uses planar coordinates, not an elevation model or a roofing-pitch conversion.

Example: positive, zero and undefined slope

Slope is the change in y divided by the change in x. Coordinates must use a consistent scale.
Two pointsCalculationSlope
(1, 2) and (4, 8)(8 − 2) ÷ (4 − 1)2
(1, 5) and (4, 5)0 ÷ 30: horizontal
(3, 2) and (3, 8)6 ÷ 0Undefined: vertical
RELATED GUIDES

Slope questions and examples

Read a worked explanation before trying another calculation.

QUESTIONS

Slope questions

Does swapping the two points change the slope?+

No. Both the rise and run change sign, so their ratio stays the same.

Is slope the same as an angle?+

No. Slope is a ratio. The angle a line makes with an axis is a different quantity, often found using an inverse tangent.