Skip to content

Calculator Tools

Slope Calculator

Calculate rise, run and slope from two coordinate points or direct changes. See a simplified exact fraction, concise decimal and line equation, with correct handling for horizontal and vertical lines.

๐Ÿ”’ Your files and data never leave your device
Calculation mode

Formula

m = (yโ‚‚ โˆ’ yโ‚) รท (xโ‚‚ โˆ’ xโ‚) = rise รท run

Decimal inputs are converted to exact fractions before subtraction and division. A vertical line has an undefined slope rather than an infinite numeric result.

Simple workflow

How to use Slope Calculator

  1. 1Choose Two points or Rise and run.
  2. 2Enter the labelled coordinates or changes as integers or decimals.
  3. 3Select Calculate slope to see rise, run, exact slope, decimal and the line equation where available.

Good to know

Frequently asked questions

What is the slope formula for two points?

Subtract the y-values for rise and the x-values for run, then divide: m = (yโ‚‚ โˆ’ yโ‚) / (xโ‚‚ โˆ’ xโ‚).

What is the slope of a vertical line?

It is undefined because the run is zero and division by zero is not defined. Two-point mode instead shows the vertical equation x = constant.

What is the slope of a horizontal line?

It is 0 because the y-values do not change, so rise is zero while run is nonzero.

Why show both a fraction and decimal?

The simplified fraction preserves the exact ratio. The decimal is convenient for reading but may be rounded when the value repeats.

Practical guide

Calculate rise over run from two points or direct changes

Slope describes how y changes as x changes. From two points, subtract yโ‚ from yโ‚‚ for the rise and xโ‚ from xโ‚‚ for the run, then divide: m = (yโ‚‚ โˆ’ yโ‚) / (xโ‚‚ โˆ’ xโ‚).

Two-point mode also calculates the y-intercept for y = mx + b. Rise-and-run mode can find the slope without enough information to determine a unique intercept.

Worked example

Find the line through (1, 2) and (3, 6)

Start with
xโ‚ = 1, yโ‚ = 2, xโ‚‚ = 3 and yโ‚‚ = 6.
Choose
Choose Two points and calculate.
You get
Rise = 4, run = 2, slope = 2 and the line equation is y = 2x.

Tips for a useful result

  • A horizontal line has a rise of zero and slope 0.
  • A vertical line has a run of zero, so its slope is undefined and its equation is x = constant.
  • A fractional slope is shown exactly and with a concise decimal equivalent.

Precision and limitations

Ordinary decimal inputs are converted to integer fractions before the calculation. This avoids binary floating-point artifacts in subtraction, simplification and the line equation.

The tool calculates straight-line slope in a Cartesian plane. It does not fit a trend line to a collection of data points or estimate measurement uncertainty.

Coordinates and results remain local to this page and are not stored or transmitted.

Keep going

Related tools

View all โ†’