Skip to main content

Notice Send us your feedback to help us improve this service.

Distance Calculator

Calculate the distance between two points.

What this calculator does

This tool measures the straight-line distance between two points on a flat grid. Enter the across (x) and up (y) position of each point, and it gives the length of the line joining them.

It suits graph paper and homework, floor plans, site plans, game boards and grid maps of a small area.

How we work it out

We use the Pythagorean theorem. First we find the gap across, x2 minus x1, and the gap up, y2 minus y1. Those two gaps form the short sides of a right-angled triangle. We square each one, add them, and take the square root. That gives the long side, which is the distance between your points.

The answer has four decimal places, in the same unit as your coordinates.

Setting up your points

Pick one fixed corner or landmark as zero. Measure every point from it: x is the distance across, and y is the distance up the page or north. Use the same unit for every number. If a point is left of or below your zero, give it a minus sign. The calculator handles negative values, because each gap is squared.

The order does not matter. Swapping point 1 and point 2 gives the same distance.

Straight line versus the path you travel

The result is the distance as the crow flies. Real paths are often longer. A cable along walls, a pipe under a floor, or a walk through city blocks follows the grid instead. For those, add the gap across to the gap up. The straight line is always the shortest path between two points, so treat it as a minimum.

Using a map

For a map, read each point's position off the map's grid and find the distance in grid squares or centimetres. Then convert with the map's scale. If the scale says 1 centimetre equals 2 kilometres, multiply your answer in centimetres by 2 to get kilometres. To change kilometres into miles, use the unit converter.

This only works for short distances, such as across a town or a park. The formula treats the ground as flat. Over long distances, between cities or provinces, the curve of the Earth matters, and you need a great-circle method. Do not enter latitude and longitude here. Degrees are not equal distances, because lines of longitude come closer together toward the poles, so the answer would be wrong.

What this does not include

  • Distance on a map, which must account for the curve of the Earth
  • Paths that bend, such as roads, cables or walking routes
  • Points in three dimensions, such as rooms on different floors
  • Map scale and unit conversion, which you apply yourself
  • Latitude and longitude, which are not equal distances

Common questions

Can I use this for map distances?

Only for short distances on a flat map grid. Maps sit on a curved Earth, so long distances need a different formula. For a town, a park or a property, read the grid positions, run the calculator, then apply the map's scale. For distances between cities, the real road distance usually matters more anyway.

How is this related to the Pythagorean theorem?

It is the same rule. The gap across and the gap up are the two short sides of a right-angled triangle, and the distance is the long side. The Pythagorean theorem calculator gives the same answer if you enter the two gaps as sides A and B.

Can I measure between two floors of a house?

Not directly, because this tool works in two dimensions only. Find the flat distance here first. Then enter that distance and the height difference between the floors as the two short sides in the Pythagorean theorem calculator. Its answer is the full straight-line distance through the floor.

Why are there four decimal places?

Most distances are square roots that do not come out even, so the calculator keeps four decimal places. Round to suit your task. On a floor plan in metres, two decimal places takes you to the nearest centimetre, which is usually plenty.

What does as the crow flies mean?

It means the straight-line distance, ignoring roads, walls and hills. It is what this calculator gives. A trip by road is almost always longer, and sometimes much longer where lakes, rivers or mountains are in the way.

Last reviewed October 18, 2026. How we check our numbers.

This is an estimate to help you plan. It is not financial, medical, or legal advice. Talk to a professional before you make a big decision.

Add this calculator to your website

Free to use on your site, blog or intranet. Paste this code where you want the calculator to appear. It works on its own, sets no cookies and shows no ads.