Skip to main content
WizTools123
WizTools123
Free Online Tools

Tool Categories


Math Tools New Tool

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.

Free Forever Nothing Uploaded Three Results At Once Working Shown
Free Online Distance, Midpoint and Slope Calculator
Share this tool
Advertisement Slot (Top Banner) Google AdSense Unit • Responsive Banner
📍 Distance, Midpoint and Slope Two points · every result with its working · vertical lines handled properly

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.

First point
Second point
—
Try one of these
The third is the one that returns infinity on most calculators.
The distance
—
Midpoint—
Slope—
Angle with the x axis—
Equation of the line—
Standard form—
Change in x and y—

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
Buy Us A Coffee

Enjoying WizTools123? Help keep our server infrastructure 100% free and open for everyone.

Buy Us A Coffee
Sponsored Content (Below Tool) Google AdSense Placement

How to Find Distance, Midpoint and Slope

Three steps, and the third shows the method.

1
Type the two points Negative and decimal coordinates are both fine. The pair is written out underneath as you type so you can see the signs landed where you meant them.
2
Read the distance, midpoint and slope All three come at once, along with the angle the line makes with the x axis and its equation in two forms. Swapping the points changes none of them, which is worth knowing.
3
Open the working Each result is shown with your numbers substituted into the formula, in the order you would write it by hand, so it can be copied as a method rather than just an answer.

What to Know About Two Points on a Grid

Slope, sign and the case that breaks most calculators.

A vertical line has no slope, not an infinite one. When the two x coordinates are equal the slope formula divides by zero. A great many calculators print infinity, a huge number, or an error. None of those is right: the slope of a vertical line is undefined, which is a definite fact about it rather than a failure. It is said plainly here, and the equation is given as x equals a number, which is the one form a vertical line can be written in.
The order of the points does not matter. Distance squares the differences, so the signs cancel. The midpoint is an average, which is symmetric. The slope divides one difference by the other, so flipping both signs leaves it unchanged. People often worry about getting the order wrong, and the swap button is there to show that nothing moves.
The sign of the slope is the direction of travel. A positive slope rises from left to right, a negative one falls. A slope of zero is a horizontal line, and the magnitude is how steep it is: a slope of 2 rises two units for every one across. The angle with the x axis is given as well, which is often the more intuitive of the two.
Two forms of the equation, because they are used differently. The slope intercept form, y equals mx plus c, shows the steepness and where the line crosses the y axis. The standard form, ax plus by equals c, has no division in it and works for vertical lines too, which is why it is the one used when lines are handled in code. Both are given.
Two identical points are not a line. If both points are the same the distance is zero and there is no unique line through them, because infinitely many lines pass through a single point. That is said rather than producing a slope of zero over zero and pretending it means something.
It runs in your browser with nothing uploaded. The arithmetic is in the page, so it works offline once loaded and nothing you type is sent anywhere.

Key Features & Capabilities

What it does, and what it deliberately does not.

Distance and midpoint Both from the same pair of points, with the differences in x and y shown separately.
Slope and angle The gradient and the angle the line makes with the x axis, which is often easier to picture.
Two equation forms Slope intercept and standard, so there is one that works whatever the line does.
Vertical lines handled No slope rather than infinity, with the equation written in the only form that fits.
The working shown Your numbers substituted into each formula, in the order you would write it out.
Nothing is uploaded It runs in this tab and keeps working offline.

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.

No. The distance squares the differences so the signs cancel, the midpoint is an average, and the slope divides one difference by the other so flipping both leaves it unchanged. The swap button lets you see that for yourself.

Because the formula divides the change in y by the change in x, and for a vertical line the change in x is zero. Division by zero has no answer, so the slope does not exist. It is not infinity, and a calculator that says infinity is wrong.

Yes. Both are handled, and the pair is written out underneath the boxes so you can check that a minus sign landed where you intended.

Ax plus By equals C has no division in it, so it describes every line including vertical ones, and it is the form used when lines are handled in code or in linear algebra. The slope intercept form is easier to read but cannot describe a vertical line.

The distance is zero and the midpoint is that point, but there is no unique line through a single point, so no slope or equation is given. Infinitely many lines pass through one point.

Yes, anticlockwise from the positive x direction, and it is between minus ninety and ninety degrees. A slope of one gives forty five degrees, and a negative slope gives a negative angle.

No. The arithmetic runs in your browser, so nothing you type leaves the page and it works offline.

Every Other Math Tool

35 more tools in this set. All free, all in your browser.

Advertisement Slot (Bottom Banner) Google AdSense Unit • Responsive Banner