Slope Calculator

Find the slope between two points, write line equations from slope and a point, and identify parallel and perpendicular lines. Shows rise/run, angle, and distance.

Guides & Reference

How It Works

Rise Over RunTwo points on a line

Slope = (y2−y1)/(x2−x1). Rise is the vertical change, run is the horizontal change. Positive slope goes up right; negative goes down right.

m = (y2−y1)/(x2−x1)(1,2) and (4,8): m=(8−2)/(4−1)=6/3=2
Slope-Intercept FormWriting line equations

Given slope m and one point (x1,y1): b = y1−m·x1. Then write y = mx + b. This converts point-slope to slope-intercept.

b = y1 − m·x1, then y = mx + bm=2, point (1,2): b=0, y=2x
Parallel LinesSame slope, different intercept

Parallel lines have equal slopes. Given a line with slope m, any line y=mx+c (different c) is parallel. They never intersect.

Parallel: same m, different by=3x+2 parallel to y=3x−5
Perpendicular LinesNegative reciprocal slopes

Perpendicular slopes multiply to −1: m2 = −1/m1. If a line has slope 4, perpendicular slope = −1/4.

m_perp = −1/mm=3 → m_perp=−1/3
Slope AngleDegrees from horizontal

Convert slope to angle: θ = arctan(m). A slope of 1 gives 45°, slope 0 gives 0°, steep lines approach 90°.

θ = arctan(m) × 180/πm=1 → θ=45°; m=2 → θ≈63.4°
Distance Between PointsLength of line segment

d = √((x2−x1)²+(y2−y1)²). The Pythagorean theorem applied to horizontal and vertical components.

d = √(Δx²+Δy²)(0,0) to (3,4): d=√(9+16)=5

Quick Reference

Common examples — verify instantly above.

Basic

(0,0) to (4,8)

m = 2

Negative

(1,5) to (3,1)

m = −2

Horizontal

(2,3) to (7,3)

m = 0

Vertical

(4,1) to (4,5)

undefined

Parallel

m=3 parallel

m=3

Perp.

m=3 perpendicular

m=−1/3

Angle

m=1

45°

Distance

(0,0)→(3,4)

5

Tips & Shortcuts

Remember: slope = rise/run. Count squares on a grid — up 3, right 2 = slope 3/2.

Perpendicular slopes: flip and negate. Slope 4/3 → perpendicular is −3/4.

A horizontal line always has slope 0. A vertical line always has undefined slope.

To check if a point lies on a line: substitute its coordinates into y=mx+b. If both sides are equal, the point is on the line.

The slope of a line through the origin (0,0) and (a,b) is simply b/a.

Steeper lines have larger absolute slope values. A slope of 10 is much steeper than a slope of 2.

Common Mistakes

Computing (x2−x1)/(y2−y1) instead of (y2−y1)/(x2−x1)

Slope is always rise (y change) over run (x change), never the reverse.

Thinking a zero slope means undefined

Zero slope is a horizontal line — perfectly valid. Undefined slope is a vertical line (division by zero).

Using the wrong point for y-intercept calculation

Use the full formula b = y1 − m·x1 with the actual coordinates of any point on the line.

Assuming parallel means same line

Parallel lines have equal slopes but different y-intercepts. The same slope AND same intercept means identical lines.

Getting perpendicular slope wrong for fractions

For slope 3/4, perpendicular is −4/3 (flip AND negate). Just flipping to 4/3 is wrong.

Forgetting to simplify the slope fraction

Slope 6/4 should be simplified to 3/2. Always divide by GCF.

Frequently Asked Questions

Slope measures steepness: rise over run = (y2−y1)/(x2−x1). Positive slope goes up left-to-right; negative goes down.

Undefined slope occurs on vertical lines where x1=x2. Division by zero makes the slope undefined.

Parallel lines have identical slopes. Two lines are parallel if and only if their slopes are equal and they have different y-intercepts.

Perpendicular lines have slopes that are negative reciprocals: m1 × m2 = −1. If slope is 3, perpendicular slope is −1/3.

y = mx + b, where m is slope and b is y-intercept. It is the most common way to write a line equation.

For y=mx+b, slope is m directly. For ax+by=c, rearrange to y=(−a/b)x+c/b, so slope = −a/b.

Step 1: slope m = (y₂−y₁)/(x₂−x₁). Step 2: use point-slope form y − y₁ = m(x − x₁). Step 3: rearrange to slope-intercept y = mx + b. Example: points (2,3) and (6,7). m = (7−3)/(6−2) = 1. y − 3 = 1(x − 2) → y = x + 1. Verify with (6,7): 7 = 6+1 ✓. Standard form: x − y + 1 = 0 (or Ax + By + C = 0 with integer coefficients).

Related Calculators