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.
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.
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).
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.
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°.
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.