calculatorkong

Slope Calculator

Point 1

Point 2

Slope (m)

Distance

Midpoint

Angle

Slope & line
m = (y₂−y₁) ⁄ (x₂−x₁) · y = mx + b, with b = y₁ − m·x₁

Two points determine a line, and everything about it falls out of one division: rise over run. This calculator delivers the full package — slope, equation, distance, midpoint, angle — with a live plot so the numbers stay attached to a picture.

From points to equation

Between (1, 2) and (5, 10): rise = 8, run = 4, slope m = 2. Plug either point into y = mx + b to find the intercept: b = 2 − 2(1) = 0, so the line is y = 2x. Positive slopes climb left-to-right, negative ones fall, zero is flat — and the sign is the first thing to check against the plot.

The vertical-line exception

Same x on both points means run = 0, and rise ÷ 0 has no value — the slope is undefined, not infinite. Vertical lines get their own notation, x = c, and the calculator switches to it rather than pretending. (Identical points get called out too: one point doesn't determine a line.)

Distance and midpoint ride along

The same coordinate differences power the other classics: distance is Pythagoras on (Δx, Δy) — √(4² + 8²) = √80 ≈ 8.94 here — and the midpoint is just the coordinate averages, (3, 6). One pair of subtractions, three theorems fed. The right-triangle view of that distance calculation lives in the triangle calculator.

Slope out in the world

Slope is grade on a road (a 6% grade is m = 0.06), pitch on a roof, rate on a graph — any "per" you can plot. Parallel lines share m; perpendicular ones multiply to −1 (slope 2 ⊥ slope −½). And when a line isn't straight, calculus asks this page's question at every point — but that's another site's territory. For parabolas, the quadratic calculator handles the curve.

Plot auto-scales to your points; math to double precision.

Frequently Asked Questions

How do I find the slope between two points? +

Rise over run: m = (y₂ − y₁) ÷ (x₂ − x₁). Between (1, 2) and (5, 10): m = 8 ÷ 4 = 2 — the line climbs 2 units for every 1 across.

How do I find the equation of the line? +

Get the slope m, then solve for b using either point: b = y − mx. With m = 2 through (1, 2): b = 2 − 2×1 = 0, giving y = 2x.

What does an undefined slope mean? +

The two points share the same x — the line is vertical, and rise ÷ run divides by zero. Vertical lines are written x = c instead of y = mx + b.

What is the midpoint formula? +

The average of the coordinates: ((x₁+x₂)⁄2, (y₁+y₂)⁄2). Between (1, 2) and (5, 10) the midpoint is (3, 6).

How is distance between two points calculated? +

The Pythagorean theorem on the coordinate differences: d = √((x₂−x₁)² + (y₂−y₁)²). For (1,2)→(5,10): √(16+64) = √80 ≈ 8.94.

What is the slope of parallel and perpendicular lines? +

Parallel lines share the same slope. Perpendicular slopes are negative reciprocals: a line with slope 2 is perpendicular to one with slope −1⁄2.

Powered by Calculator Kong ↗

Related Calculators