Slope Calculator

Enter two coordinate points to instantly compute the slope m, y-intercept b, slope-intercept equation y = mx + b, angle of inclination, perpendicular slope, and segment length.

How to use this calculator

  1. Enter coordinates for point 1 (x₁, y₁) and point 2 (x₂, y₂).
  2. Read slope m, y-intercept b, and the full line equation y = mx + b.
  3. The angle of inclination and perpendicular slope are also shown.

Formula & method

Slope & line equation formulas

m = (y₂ − y₁) / (x₂ − x₁) · b = y₁ − m × x₁ · Equation: y = mx + b · θ = arctan(m)

m = slope, b = y-intercept, θ = angle of inclination. Perpendicular slope m⊥ = −1/m.

Example

Points (1, 2) and (4, 8): Δy = 6, Δx = 3, m = 2. b = 2 − 2×1 = 0. Equation: y = 2x.

Key insights

How to interpret your result

Slope m

Positive m: line rises left to right. Negative m: line falls. m = 0: flat line. Undefined: vertical line.

Y-intercept b

The y-value where the line crosses the y-axis (x = 0). From slope-intercept form: b = y₁ − m × x₁.

Angle of inclination

The angle θ between the line and the positive x-axis: θ = arctan(m). Ranges from 0° (horizontal) to 90° (vertical).

Frequently asked questions

What is slope?
Slope m = Δy/Δx is the rate of vertical change per unit of horizontal change along a straight line.
How do I find the slope from two points?
m = (y₂ − y₁) / (x₂ − x₁). This works as long as x₁ ≠ x₂ (non-vertical line).
What is the slope-intercept form?
y = mx + b, where m is slope and b is the y-intercept (y-value when x = 0).

Related calculators

See all math calculators · Explore all online calculators