Algebra · Coordinate Geometry
Slope
Calculator
Calculate slope, line equation, distance, midpoint, and angle from two points. Get all three line equation forms, parallel & perpendicular slopes, and a live coordinate graph.
—
Slope (m)
—
y = mx+b
—
Distance
Two Points on a Line
Quick Examples
P₁
x₁:
y₁:
P₂
x₂:
y₂:
One Point + Slope
P₁
x₁:
y₁:
m
Two Lines — Find Intersection
Line 1: y = m₁x + b₁ | Line 2: y = m₂x + b₂
m₁
b₁
m₂
b₂
One Point + Angle of Inclination
P₁
x₁:
y₁:
°
Slope
—
y-intercept
—
Distance
—
Slope m
—
Angle θ
—
Midpoint
—
Distance
—
Line Equations & Properties
📈 Coordinate Plane
Understanding Slope
Slope (m) measures how steep a line is: m = rise/run = (y₂−y₁)/(x₂−x₁). It tells you how much y changes for each unit change in x. A line's slope determines its direction and steepness and is the same at every point on the line.
Key Slope Formulas
Slope: m = (y₂−y₁) / (x₂−x₁)
Slope-intercept: y = mx + b
Point-slope: y − y₁ = m(x − x₁)
Standard form: Ax + By = C
Distance: d = √((x₂−x₁)² + (y₂−y₁)²)
Midpoint: ((x₁+x₂)/2, (y₁+y₂)/2)
Angle: θ = arctan(m) (in degrees)
Parallel: m₂ = m₁ (same slope)
Perpendicular: m₂ = −1/m₁ (negative reciprocal)
What does undefined slope mean?
Undefined slope occurs when a line is vertical (x₁ = x₂). The slope formula gives division by zero: m = (y₂−y₁)/0. A vertical line has no slope — it's not zero slope (horizontal), it's undefined. The equation of a vertical line is x = c (a constant), not a function of y. This is why vertical lines fail the vertical line test and are not functions.
What is the difference between slope-intercept and standard form?
Slope-intercept form (y = mx + b) directly shows slope m and y-intercept b, making it easy to graph and understand. Standard form (Ax + By = C, where A≥0, A and B are integers with no common factor) is symmetric between x and y and is preferred in some algebraic contexts. Point-slope form (y−y₁ = m(x−x₁)) is most useful when you know a point and the slope — you can write the equation immediately without finding the y-intercept.
Why do perpendicular slopes multiply to −1?
If line 1 has slope m₁ = rise₁/run₁, then a perpendicular line is created by rotating 90°, which swaps rise and run and negates one: m₂ = −run₁/rise₁ = −1/m₁. So m₁ × m₂ = m₁ × (−1/m₁) = −1. Exception: a horizontal line (m=0) and vertical line (undefined slope) are perpendicular, but the formula doesn't apply since you can't compute −1/0. Also: two lines with the same non-zero slope are parallel (never intersect, unless they're the same line).
How do you find where two lines intersect?
Set the equations equal: m₁x + b₁ = m₂x + b₂. Solve for x: x = (b₂−b₁)/(m₁−m₂). Then substitute back to find y. If m₁ = m₂ and b₁ ≠ b₂, the lines are parallel — no intersection. If m₁ = m₂ and b₁ = b₂, the lines are identical — infinitely many intersections. The intersection point is a solution to the system of two linear equations.