Skip to main content

Slope & Distance Calculator

Find the slope, distance and midpoint between two points.

Reviewed for accuracy by the Math Ora X team Last updated

Result

About the Slope & Distance Calculator

Given two points in the plane, this finds the slope of the line through them, the straight-line distance, and the midpoint.

$$ m=\frac{y_2-y_1}{x_2-x_1},\ d=\sqrt{(x_2-x_1)^2+(y_2-y_1)^2} $$

How to use this calculator

  1. Enter the first point as 2x_1, y_12x and the second point as 2x_2, y_22x.
  2. Click calculate to find the slope, distance, and midpoint.
  3. Check the slope to see whether the line rises, falls, is flat, or is vertical.
  4. Use the step-by-step result to understand how each value was found.

The formula explained

The slope formula computes the rate of change between two points, and the distance formula computes the straight-line distance between them. The midpoint is found by averaging the x-coordinates and the y-coordinates.

  • \(x_1\) = the x-coordinate of the first point
  • \(y_1\) = the y-coordinate of the first point
  • \(x_2\) = the x-coordinate of the second point
  • \(y_2\) = the y-coordinate of the second point
  • m = the slope of the line through the two points
  • d = the distance between the two points

Step by step method

  1. Find the change in y by subtracting y_1 from y_2, and the change in x by subtracting x_1 from x_2.
  2. Compute the slope with m = (y_2 - y_1)/(x_2 - x_1), and compute the distance with d = 2sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}2.
  3. Find the midpoint by averaging the x-values and averaging the y-values: ((x_1 + x_2)/2, (y_1 + y_2)/2).

Worked example

Problem. Find the slope, distance, and midpoint between the points (2, 3) and (8, 11).

  1. Slope: m = (11 - 3)/(8 - 2) = 8/6 = 4/3.
  2. Distance: d = 2sqrt{(8 - 2)^2 + (11 - 3)^2}2 = 2sqrt{6^2 + 8^2}2 = 2sqrt{36 + 64}2 = 2sqrt{100}2 = 10.
  3. Midpoint: ((2 + 8)/2, (3 + 11)/2) = (5, 7).

Answer. Slope = 4/3, distance = 10, midpoint = (5, 7)

Tips and common mistakes

  • If x_2 = x_1, the line is vertical, so the slope is undefined because you would be dividing by 0.
  • Be careful with subtraction signs, especially when one coordinate is negative.

Frequently asked questions

What if the line is vertical?+

If x₁ = x₂ the slope is undefined (a vertical line).

How is distance found?+

With the Pythagorean theorem on the coordinate differences.

More Mathematics Tools

Explore related calculators in this category

You Might Also Like

Popular tools from other categories

Can't Find the Right Calculator?

Try our AI Math Solver, type any problem in plain English and get instant step-by-step solutions.

Try AI Solver

Browse All Categories

Home Mathematics Current Tool
Facebook Twitter WhatsApp