Figuro.net

Slope & Distance Calculator

Find the slope, distance between two points, midpoint, and line equation — with every step of the math shown. Works as a standalone distance calculator too.

Enter values and press Calculate to see the result here.

How this is calculated

Slope is the change in y divided by the change in x between two points. This calculator also derives the distance between the points, their midpoint, and the full line equation.

Understanding slope

Slope measures how steep a line is and in which direction it moves. A positive slope rises left to right, a negative slope falls, a zero slope is flat, and an undefined slope is vertical.

Formulas

Slope (m) = (y₂ - y₁) ÷ (x₂ - x₁)
Distance = √((x₂-x₁)² + (y₂-y₁)²)
Midpoint = ((x₁+x₂)/2, (y₁+y₂)/2)

Example: for points (1,2) and (4,11), slope = (11-2)/(4-1) = 3, distance ≈ 9.49, midpoint = (2.5, 6.5).

Quick reference table

Point 1Point 2Slope
(0,0)(2,4)2
(1,2)(4,11)3
(3,5)(3,9)Undefined

Common pitfalls

Tips

Frequently asked questions

What is the slope formula? Slope = (y₂ - y₁) ÷ (x₂ - x₁), the change in y divided by the change in x between two points.

How do you find the slope between two points? Subtract the y-coordinates and the x-coordinates separately, then divide the difference in y by the difference in x. For (1,2) and (4,11), slope = (11-2)/(4-1) = 3.

What does a slope of zero mean? A slope of zero means the line is perfectly horizontal — the y-value doesn't change as x changes.

What does an undefined slope mean? The slope is undefined when the line is perfectly vertical, since the change in x is zero and division by zero is undefined.

How do you find the midpoint between two points? Average the x-coordinates and average the y-coordinates separately: midpoint = ((x₁+x₂)/2, (y₁+y₂)/2).

How do you write the equation of a line from two points? Find the slope first, then substitute one point into y = mx + b and solve for b (the y-intercept).

Worked examples

Example 1 — Positive slope: (1,2) to (4,11) → slope = 3, distance ≈ 9.49, midpoint = (2.5, 6.5).

Example 2 — Negative slope: (0,10) to (5,0) → slope = -2, line equation y = -2x + 10.

Example 3 — Vertical line: (3,5) to (3,9) → slope is undefined since x doesn't change.

Slope in the real world

Grade, pitch and ramps

Slope is rise divided by run, and the same idea has different names in different fields. A road grade of 5% means a rise of 5 feet for every 100 feet of horizontal distance. Roof pitch is written as rise per 12 inches of run, so 6/12 is a slope of 0.5. Accessibility guidelines in the United States commonly limit ramps to a slope of 1:12, about 8.3%.

Parallel and perpendicular lines

Converting between slope formats

SlopeAs a percent gradeAs an angle
0.055%about 2.9°
0.2525%about 14.0°
1100%45°

More questions

Does the order of my two points matter? No, as long as you subtract in the same order for both coordinates. Swapping the points gives the same slope.

How is distance related to slope? Both come from the same two points. Slope gives the steepness, while distance uses the Pythagorean theorem to give the straight-line length between them.

← Browse all 166 calculators