AbraCalc

Slope of a Line Calculator

Calculate the slope (gradient) of a straight line through two coordinate points using the rise-over-run formula. Also reports the angle of inclination in degrees. Enter x1, y1, x2, y2.

Embed this tool on your site

How to use this tool

  1. Enter x1, y1, x2 and y2 in the fields above.
  2. Results update instantly as you type โ€” or click Calculate.
  3. Read your slope (m) and the full breakdown beneath it.

Formula

m = (y2-y1)/(x2-x1); angle = atan(m) in degrees

How it works

Slope m = (y2โˆ’y1) / (x2โˆ’x1). Inclination angle ฮธ = arctan(m) in degrees.

Worked example

Rise 3, run 4

  1. m
  2. =
  3. 3
  4. /
  5. 4
  6. =
  7. 0
  8. .
  9. 7
  10. 5
  11. .
  12. a
  13. n
  14. g
  15. l
  16. e
  17. =
  18. a
  19. r
  20. c
  21. t
  22. a
  23. n
  24. (
  25. 0
  26. .
  27. 7
  28. 5
  29. )
  30. =
  31. 3
  32. 6
  33. .
  34. 8
  35. 7
  36. d
  37. e
  38. g
  39. .

Common mistakes to avoid

  • Dividing run by rise instead of rise by run โ€” slope is (y2-y1)/(x2-x1), not the reciprocal.
  • Entering the same x-value for both points (a vertical line), which causes division by zero โ€” vertical lines have undefined slope, not zero slope.
  • Confusing a zero slope (horizontal line, y2=y1) with an undefined slope (vertical line, x2=x1).

Key terms

Frequently asked questions

What does a negative slope mean?
A negative slope means the line falls from left to right. For every unit you move right along the x-axis, the y-value decreases by the absolute value of the slope.
How is slope related to the angle of inclination?
The angle theta satisfies tan(theta) = slope, so theta = atan(slope) in degrees. A slope of 1 gives a 45 degree angle; steeper lines have larger angles up to (but not including) 90 degrees.
Do the two points need to be in any particular order?
No โ€” swapping the two points negates both the numerator and denominator, so the slope (their ratio) is unchanged.

References & sources