Free Online Distance, Midpoint and Slope Calculator
Enter two points and get the distance between them, the midpoint, the slope, the angle and the equation of the line through them, each with its working shown. A vertical line is reported as having no slope rather than infinity, and the equation is given in both the slope intercept and the standard forms.
The sum runs in your browser. Nothing you type is sent anywhere.
📍 The two points
Coordinates can be negative or decimal. The order does not change the distance or the midpoint, and it does not change the slope either.
Each result with your own numbers substituted into the formula, in the order you would write it out by hand.
| What | Formula | With your numbers |
|---|
| When | Calculation | Actions |
|---|
Number formatting
Rounding only changes what you see. The sum itself always runs at full precision, so a rounded number never feeds into the next step.
Display
Full screen hides the page around the tool. Press Escape, or the button in the bar, to come back.
History
Your data
Settings, history and saved setups live in this browser and nowhere else. There is no account and no server, which also means clearing them here is final.
Enjoying WizTools123? Help keep our server infrastructure 100% free and open for everyone.
How to Find Distance, Midpoint and Slope
Three steps, and the third shows the method.
What to Know About Two Points on a Grid
Slope, sign and the case that breaks most calculators.
Key Features & Capabilities
What it does, and what it deliberately does not.
About Coordinate Geometry
Coordinate geometry puts shapes on a grid so that questions about them become arithmetic. Three quantities come up constantly for a pair of points: how far apart they are, what lies halfway between them, and how steeply the line through them rises. All three come from the same two differences, the change in x and the change in y, which is why they are given together here rather than on three separate pages.
The distance comes from Pythagoras. The horizontal and vertical gaps are the two legs of a right angled triangle and the distance is its hypotenuse, so it is the square root of the sum of their squares. Squaring removes the signs, which is why the order of the points makes no difference. The midpoint is simply the average of the two x values and the average of the two y values.
The slope is the change in y divided by the change in x, and it is where the only real difficulty lies. If the two points have the same x coordinate the line is vertical and that division is by zero. The honest answer is that a vertical line has no slope, and it is undefined rather than infinite: the line does not become steeper and steeper until it reaches some enormous number, it simply has no number that describes its steepness in this way. Calculators that print infinity here are teaching something false.
That is also why the equation of the line is given in two forms. The familiar y equals mx plus c cannot describe a vertical line at all, because there is no m. The standard form ax plus by equals c can, because nothing is divided. Each form has its uses, and having both means there is always one that fits the line in front of you.
Frequently Asked Questions
Negatives, vertical lines and the forms of the equation.
Every Other Math Tool
35 more tools in this set. All free, all in your browser.