Home › Math › Slope

Slope Calculator

Slope (m)
0
Y-Intercept (b)
0
Equation
y = 0
Distance
0
Midpoint
(0, 0)
Angle
Show the math
Enter values to see the worked formula.

What Your Result Means

How This Calculator Works

You enter two coordinate points (x₁, y₁) and (x₂, y₂). The tool computes slope as rise over run (Δy/Δx), the y-intercept using b = y₁ − m·x₁, and writes the equation in slope-intercept form. It also calculates the Euclidean distance with the distance formula, the midpoint by averaging coordinates, and the angle via the arctangent function. Vertical lines (where x₁ = x₂) show slope as "undefined."

Quick Questions

What does it mean when the slope is undefined?

An undefined slope occurs when both points have the same x-coordinate, making the line perfectly vertical. Division by zero (Δx = 0) means the slope formula cannot produce a finite number. The equation is expressed as x = constant instead of y = mx + b.

How is slope different from angle?

Slope is the ratio of vertical change to horizontal change (rise/run), while angle measures the rotation from the positive x-axis in degrees. They are related by the formula: angle = arctan(slope). A slope of 1 corresponds to a 45° angle.

Can I use this for parallel and perpendicular lines?

Yes. Parallel lines have the same slope. Perpendicular lines have slopes that are negative reciprocals (m₁ × m₂ = −1). Calculate the slope here, then use it to determine parallel or perpendicular relationships.

What is the distance formula based on?

The distance formula is derived from the Pythagorean theorem: d = √((x₂−x₁)² + (y₂−y₁)²). It calculates the length of the hypotenuse of a right triangle formed by the horizontal and vertical differences between the two points.

Sources

Method & review

MethodologyHow we calculate this Reviewed & Updated2026-04 Next review2027-04

Estimate only. Results reflect your inputs and standard formulas. Double-check important decisions independently.