Slope Calculator

Calculate the slope, distance, and equation of a line between two points.

A slope calculator finds the slope, y-intercept, and equation of a line from two points or a point and slope.

Choose an input mode: two points, point and slope, or slope and intercept. Enter the known values. The calculator will determine the line equation, slope, distance between points, and other properties.

Examples

Two points

Points (1,2) and (3,8): m = (8-2)/(3-1) = 6/2 = 3, equation: y = 3x - 1

Point-slope

Point (2,5), slope 3: y - 5 = 3(x-2), so y = 3x - 1

Slope-intercept

Slope 2, intercept 3: y = 2x + 3

Frequently Asked Questions

What does slope represent?
Slope measures the steepness and direction of a line. It represents the rate of change: how much y changes for each unit change in x.
What is a perpendicular slope?
The perpendicular slope is the negative reciprocal of the original slope: m_perp = -1/m. Perpendicular lines intersect at 90 degrees.
What if the slope is undefined?
A vertical line has undefined slope because the denominator (x₂ - x₁) is zero. Vertical lines are written as x = constant.
Ad Space

Quick Tips

  • Double-check your inputs — small errors lead to incorrect results.
  • Use decimal form for fractions when entering values.
  • Remember that vertical lines have undefined slope and cannot be expressed in y = mx + b form.

A slope calculator finds the slope, y-intercept, and equation of a line from two points or a point and slope.

How to Use This Calculator

Choose an input mode: two points, point and slope, or slope and intercept. Enter the known values. The calculator will determine the line equation, slope, distance between points, and other properties.

Understanding the Formula

Slope: m = (y₂-y₁)/(x₂-x₁); Point-slope: y - y₁ = m(x - x₁); Slope-intercept: y = mx + b

Examples

Two points

Points (1,2) and (3,8): m = (8-2)/(3-1) = 6/2 = 3, equation: y = 3x - 1

Point-slope

Point (2,5), slope 3: y - 5 = 3(x-2), so y = 3x - 1

Slope-intercept

Slope 2, intercept 3: y = 2x + 3

Frequently Asked Questions

What does slope represent?

Slope measures the steepness and direction of a line. It represents the rate of change: how much y changes for each unit change in x.

What is a perpendicular slope?

The perpendicular slope is the negative reciprocal of the original slope: m_perp = -1/m. Perpendicular lines intersect at 90 degrees.

What if the slope is undefined?

A vertical line has undefined slope because the denominator (x₂ - x₁) is zero. Vertical lines are written as x = constant.

Assumptions & Limitations

  • Assumes Euclidean geometry and a standard Cartesian coordinate plane.
  • Assumes exact input values; rounding in inputs propagates to results.
  • Results may show floating-point approximations for irrational numbers.