Skip to main content

MATH · SLOPE

Slope Calculator

Find the slope, y-intercept, equation, and angle of a line through two points. Handles vertical lines (undefined slope).

Point 1
Point 2
02 Result
y = 2x + 0
Slope (m)2
y-intercept (b)0
Angle63.4349°

About This Calculator

The slope of a line measures its steepness — the ratio of the vertical rise to the horizontal run between any two points. This calculator finds the slope, y-intercept, line equation in slope-intercept form, and the angle the line makes with the horizontal.

How It Works

Enter the coordinates of two distinct points. The calculator computes slope = (y₂ − y₁) / (x₂ − x₁). If x₁ = x₂ the line is vertical and the slope is undefined. The y-intercept is found by substituting one point into y = mx + b and solving for b.

The Formula

m = (y₂ − y₁) / (x₂ − x₁) b = y₁ − m·x₁

m
slope (rise over run)
b
y-intercept (where the line crosses the y-axis)

Frequently Asked Questions

What does a slope of 0 mean?
A slope of 0 means the line is horizontal — it neither rises nor falls as x increases.
What is an undefined slope?
When the two points share the same x-coordinate, the line is vertical. Division by zero makes the slope undefined. The line equation is x = constant.
How is the angle calculated?
The angle is arctan(m) — the inverse tangent of the slope. A slope of 1 corresponds to a 45° angle.