Home Math Slope Calculator

Slope Calculator

Slope, line equation, distance and midpoint from two points.

Advertisement

How it works

The slope is how much y changes for each step in x. The calculator also gives the line through the two points, the distance between them and the point in the middle.

Advertisement

Formula

Slope = (y2 − y1) ÷ (x2 − x1).
Distance = square root of ((x2 − x1)² + (y2 − y1)²).
Midpoint = ((x1 + x2) ÷ 2, (y1 + y2) ÷ 2).

Example

Example in plain words. Points (1, 3) and (5, 7).

Slope = (7 − 3) ÷ (5 − 1) = 4 ÷ 4 = 1.

The line is y = 1x + 2, because 3 = 1 × 1 + 2.

Distance = square root of (4² + 4²) = square root of 32 = 5.66.

Midpoint = ((1 + 5) ÷ 2, (3 + 7) ÷ 2) = (3, 5).

Frequently asked questions

What if x1 equals x2?

The line is vertical and the slope is undefined.

What does a negative slope mean?

The line goes down as x grows.

Advertisement

Related calculators

Percentage Calculator

Find a percent of a number, what percent one number is of another, and percent change, all at once.

Fraction Calculator

Add, subtract, multiply and divide fractions, with the answer simplified.

Scientific Calculator

Online scientific calculator with trig, logs, powers, roots, factorial and degree or radian mode.

Quadratic Formula Calculator

Solve ax² + bx + c = 0, with the discriminant and the vertex.