Add the requested inputs
Use the labelled fields in the workspace above. If example values are provided, try them first or replace them with your own.
Learning & education · Free online tool
Find the gradient, y = mx + c equation, midpoint and distance for the line through two points.
Runs locally in your browser
Use it with confidence
Use the labelled fields in the workspace above. If example values are provided, try them first or replace them with your own.
Use the main action when needed. Gradient m = (y₂ − y₁) ÷ (x₂ − x₁) and c = y₁ − m x₁. The midpoint averages the coordinates, the distance uses Pythagoras, and a perpendicular line has gradient −1 ÷ m.
The line through (1, 3) and (4, 9) has gradient 2 and equation y = 2x + 1. Its midpoint is (2.5, 6) and the points are √45 = 3√5 ≈ 6.708 apart.
Values are kept as exact fractions where possible. A vertical line has no gradient and is written x = k.
Helpful answers
Yes. Use it as often as you need, with no sign-up and no run limit. Your inputs stay in your browser.
No. This tool runs in your browser and UtilHub does not receive or store the values you enter. Your browser or device may still retain normal local history or form data.
Gradient m = (y₂ − y₁) ÷ (x₂ − x₁) and c = y₁ − m x₁. The midpoint averages the coordinates, the distance uses Pythagoras, and a perpendicular line has gradient −1 ÷ m.
Values are kept as exact fractions where possible. A vertical line has no gradient and is written x = k.