Slope Calculator

Calculate slope, angle, distance, and midpoint between two points

The slope calculator finds the slope (rise/run) between two coordinate points, plus the angle of inclination, distance, midpoint, and slope-intercept equation. Enter any two points to get the complete line analysis.

Slope Calculator

m = (y₂ − y₁) / (x₂ − x₁)  |  y = mx + b  |  θ = arctan(m)

How to Use the Slope Calculator

The slope calculator finds the gradient between any two points on a coordinate plane, plus the complete line equation, angle, distance, and midpoint.

Slope Formula

Slope m = (y₂ − y₁) / (x₂ − x₁) = rise / run. For points (1, 2) and (4, 8): m = (8−2)/(4−1) = 6/3 = 2. The line rises 2 units for every 1 unit right. Then b = y₁ − m×x₁ = 2 − 2×1 = 0, so equation is y = 2x.

Special Cases

Horizontal line: y₁ = y₂, so rise = 0, slope = 0. Equation: y = constant. Vertical line: x₁ = x₂, so run = 0, slope is undefined (division by zero). Equation: x = constant. Zero slope and undefined slope are often confused — horizontal has zero slope, vertical has undefined slope.

Angle of Inclination

θ = arctan(m) in degrees. Slope 1 → 45°. Slope √3 → 60°. Real-world: a road with 5% grade has slope 0.05, angle ≈ 2.86°. A ski slope with 100% grade (1:1) has a 45° angle.

Distance and Midpoint

Distance = √((x₂−x₁)² + (y₂−y₁)²) — the Pythagorean theorem applied to coordinates. Midpoint = ((x₁+x₂)/2, (y₁+y₂)/2) — the average of each coordinate. For (0,0) and (6,8): distance = √(36+64) = √100 = 10, midpoint = (3,4).

Frequently Asked Questions

What is slope?

Slope m = (y₂ − y₁) / (x₂ − x₁) = rise/run. It measures steepness and direction of a line. Positive slope: line goes up left to right. Negative: goes down. Zero: horizontal. Undefined: vertical. Slope of 3 means for every 1 unit right, the line goes up 3 units.

What is slope-intercept form?

y = mx + b, where m is the slope and b is the y-intercept (where the line crosses the y-axis). Given two points (x₁,y₁) and (x₂,y₂): m = (y₂−y₁)/(x₂−x₁), then b = y₁ − m×x₁. The calculator finds the complete equation from two points.

Is this calculator free?

Yes, completely free with no signup required. All calculations run in your browser.

Is my data private?

Yes. All calculations run locally. Nothing is transmitted.

How do you calculate the angle of inclination?

angle = arctan(m) = arctan(rise/run). A slope of 1 gives 45°. Slope of √3 gives 60°. Slope of 0 gives 0° (horizontal). A road with 6% grade has slope 0.06, angle = arctan(0.06) ≈ 3.43°.