All tools · Utilities

Slope & Line

Slope, distance and midpoint of the line through two points.

Free to use, no sign-up required. Slope & Line is one of 198 tools built into Xenition, alongside a chat that can use them for you.

Finds the slope between two points, the straight-line distance between them and their midpoint, and plots the line with its rise and run.

How to use Slope & Line

  1. Enter the first point as x₁ and y₁.
  2. Enter the second point as x₂ and y₂.
  3. Read the Slope, Distance and Midpoint, and check the graph.

How it works

Slope = (y₂ − y₁) ÷ (x₂ − x₁), the rise over the run. When x₁ = x₂ the line is vertical and the slope is undefined. Distance = √((x₂ − x₁)² + (y₂ − y₁)²). Midpoint = ((x₁ + x₂) ÷ 2, (y₁ + y₂) ÷ 2), shown to two decimal places.

Example

For (1, 2) and (4, 8), the rise is 6 and the run is 3, so the slope is 2. The distance is √45 = 6.7082 and the midpoint is (2.5, 5).

Questions about Slope & Line

How do I get the equation of the line?

Use y = mx + c with the slope as m, then solve for c with one point. With slope 2 through (1, 2): 2 = 2 × 1 + c, so c = 0 and the line is y = 2x.

How do I turn a slope into a percentage grade or an angle?

Multiply the slope by 100 for a grade, so 0.05 is a 5% grade. The angle is arctan of the slope: a slope of 1 is 45°.

Use it from chat

You do not have to open Slope & Line to use it. Ask Xenition in plain language and it runs the right tool, then carries the answer into whatever you are working on — a document, a spreadsheet, a deck.

Related tools