Slope Calculator

Calculate slope from two points, from equation, or find line equation from slope and point with step-by-step solutions.

For learning and homework help — verify critical calculations independently.

Reviewed by CalculatorDrive Math Editorial Board · Last updated

Calculator

Select a calculation type and enter the required values to calculate slope or find line equations.

The short answer

Slope measures how steep a line is: rise over run, or the change in y divided by the change in x between two points, m = (y₂−y₁)/(x₂−x₁). A positive slope rises left to right, negative falls, zero is flat (horizontal), and a vertical line has undefined slope, since that would mean dividing by zero.

Key takeaways

  • Vertical lines have undefined slope because the change in x is zero, and division by zero has no defined result.
  • Parallel lines always share the same slope; perpendicular lines have slopes that multiply to −1 (negative reciprocals of each other).
  • The three common line equation forms — slope-intercept, standard, and point-slope — all describe the same line, just solved for different unknowns.
  • The angle of inclination is simply arctan(slope) — it converts a rise-over-run ratio into an actual angle in degrees.

The slope formula and what it means

Slope value What it means
m > 0Line rises left to right
m < 0Line falls left to right
m = 0Horizontal line
undefinedVertical line (Δx = 0)

Parallel and perpendicular slopes

Slope 2 → perpendicular slope = −1/2 (since 2 × (−1/2) = −1)

Parallel lines never intersect because they climb or fall at exactly the same rate — same slope, different starting point. Perpendicular lines meet at a right angle, and their slopes are always negative reciprocals of each other.

Worked example: finding slope and equation from two points

Points (2, 3) and (5, 7):

m = (7 − 3) / (5 − 2) = 4/3

b = y₁ − m×x₁ = 3 − (4/3)×2 = 1/3

Equation: y = (4/3)x + 1/3

Check with the second point: y = (4/3)(5) + 1/3 = 20/3 + 1/3 = 21/3 = 7 — matching y₂ exactly, confirming both the slope and the equation.

Common mistakes to avoid

  • Mixing point order between numerator and denominator — using y₁−y₂ on top with x₂−x₁ on the bottom flips the sign of the slope incorrectly.
  • Assuming a zero denominator (vertical line) means slope is zero — it's the opposite: undefined, not zero.
  • Confusing parallel (same slope) with perpendicular (negative reciprocal slope) — they describe opposite relationships between two lines.
  • Forgetting the sign flip in standard form — for Ax + By = C, the slope is −A/B, not A/B.

Frequently Asked Questions

What is slope?

Slope measures steepness of a line: rise over run, or change in y divided by change in x. Positive slope rises left to right; negative falls.

What is the slope formula?

m = (y₂ − y₁) / (x₂ − x₁) for two points (x₁, y₁) and (x₂, y₂). Horizontal lines have slope 0; vertical lines have undefined slope.

How does slope relate to linear equations?

In y = mx + b, m is slope and b is y-intercept. Slope tells how much y changes per unit increase in x.

What do parallel and perpendicular slopes look like?

Parallel lines share the same slope. Perpendicular slopes multiply to −1: if one slope is 2, the other is −½.

How do I use this slope calculator?

Enter two points or a linear equation, then click Calculate to see slope, angle of inclination, and line equation.

How do you calculate the angle of inclination from a slope?

Take the arctangent of the slope: angle = arctan(m). A slope of 1 gives an angle of 45° (arctan(1) = 45°), since the line rises at the same rate it runs. A steeper slope, like 2, gives a steeper angle — arctan(2) ≈ 63.4° — while a slope between 0 and 1 gives an angle under 45°.

More math calculators