Reference formulas and worked examples below keep their stated units. Monetary examples use USD; dimensional examples use US customary units unless labeled otherwise. Metric calculator inputs are converted to these reference units before calculation. Choosing another currency does not convert example amounts or exchange money.
How to use this slope calculator
Find the slope, intercept, rise, run, and distance between two points. Vertical lines are identified explicitly.
How the calculation works
Rise = y₂ − y₁ and run = x₂ − x₁. Slope = rise ÷ run.
For a nonvertical line, intercept b = y₁ − slope × x₁ and the equation is y = mx + b.
Distance = square root of (run² + rise²). A zero run produces a vertical line x = x₁; identical points do not define a unique line.
Worked example
From (1, 2) to (5, 10), rise is 8 and run is 4. The slope is 2 and the intercept is 0, so y = 2x.
Limits and assumptions
Cartesian coordinates in the same units. Geographic distances and earth curvature are not modeled.
Frequently asked questions
What does undefined slope mean?
The line is vertical: the X coordinates are identical but Y differs.
What is the slope of a horizontal line?
Zero, because the rise is zero and the run is nonzero.
Can I enter the same point twice?
No. Infinitely many lines pass through a single point.