ManyTools

Slope Calculator (Two Points)

Enter two points and get the slope, the equation of the line, the angle, and the distance between them.

Last updated: August 7, 2026How this is calculated →

The slope between two points is the rise over the run: (y2 − y1) divided by (x2 − x1). For (1, 2) and (3, 8), the rise is 6 and the run is 2, so the slope is 3. The line through them is y = 3x − 1, it rises at about 71.57°, and the two points are 6.32 units apart. Enter your own points to see all of it.

Results are estimates provided for general information.

Point 1
Point 2

Negative and decimal coordinates are fine. The line runs through both points.

Line equation

y = 3x - 1

Slope (m)
3
y-intercept (b)
-1
Angle
71.57°
Distance between points
6.3246
Δx
2
Δy
6

Embed this calculator on your site →

About the Slope Calculator

Slope measures how steep a line is: how much it climbs or falls (the rise) for every step it takes sideways (the run). Written out, the slope between two points is (y2 − y1) divided by (x2 − x1). A positive slope goes uphill left to right, a negative slope goes downhill, a slope of zero is a flat horizontal line, and a vertical line has no defined slope at all because the run is zero and you can't divide by it. This calculator takes two points and returns the slope, then goes further: it gives you the y-intercept and the full slope-intercept equation y = mx + b, the angle the line makes with the horizontal, the straight-line distance between the two points, and the raw change in x and y. Two special cases are handled honestly rather than with a broken number — a vertical line is reported as an undefined slope with its equation x = k, and two identical points are flagged as not defining a line at all. Enter your coordinates and everything recalculates as you type.

Frequently asked questions

How do you find the slope from two points?+

Subtract the y-values to get the rise, subtract the x-values in the same order to get the run, and divide: slope = (y2 − y1) / (x2 − x1). For (1, 2) and (3, 8) that's (8 − 2) / (3 − 1) = 6 / 2 = 3.

What is the slope of a vertical line?+

Undefined. A vertical line has the same x-value at both points, so the run is zero and the division has no answer. This calculator reports it as an undefined slope with the equation x = k rather than showing infinity.

What does slope-intercept form mean?+

It's the equation y = mx + b, where m is the slope and b is the y-intercept (where the line crosses the y-axis). Once you have the slope, b = y1 − m·x1. The calculator builds the full equation for you.

How is the angle of the line calculated?+

The angle a line makes with the horizontal is the inverse tangent (arctangent) of its slope. A slope of 3 gives about 71.57°, and a slope of 1 gives exactly 45°. Negative slopes give negative angles (sloping downward).

What's the distance between the two points?+

It's the straight-line distance from the Pythagorean theorem: the square root of the run squared plus the rise squared. For (1, 2) and (3, 8), that's √(2² + 6²) = √40 ≈ 6.32.

Embed this calculator

Free to use on your own site. Paste this snippet where you want the slope calculator to appear — it resizes itself automatically.

Embed code
<iframe
  src="https://manytools.co/embed/slope-calculator"
  title="Slope Calculator by ManyTools"
  data-manytools="slope-calculator"
  width="100%"
  height="640"
  loading="lazy"
  style="border:0;width:100%;max-width:720px"></iframe>
<script>
(function () {
  window.addEventListener("message", function (e) {
    if (e.origin !== "https://manytools.co") return;
    var d = e.data || {};
    if (d.type !== "manytools:embed:height" || d.slug !== "slope-calculator") return;
    var f = document.querySelector('iframe[data-manytools="slope-calculator"]');
    if (f && d.height) f.style.height = d.height + "px";
  });
})();
</script>
Plain link (fallback)
<a href="https://manytools.co/math/slope-calculator">Slope Calculator by ManyTools</a>