Home › Distance Between Addresses
Distance Between Addresses
Enter two full street addresses — or just two ZIP or postal codes — and get the distance between those exact front doors: straight-line and by road, with the route on the map.
How to use this calculator
- Type the first full address in the Address A field — street number, street name, town and ZIP or postal code. The fuller the address, the better the match.
- Pick the suggestion that names the right town and code, and check the pin when it appears.
- Type the second address in the Address B field in the same way, and check its suggestion and pin just as carefully.
- Press Measure between addresses. The results show the straight-line distance, the driving distance and the route drawn on the map.
- If either pin sits on the wrong building or the wrong street, edit that address — add the missing number, town or code — and measure again.
Note: the two exact inputs are Address A and Address B. A full street address gives a building-level pin; a ZIP or postal code on its own gives the centre of the postal area instead, which is a different and looser measurement, as the examples below show.
A fully worked example: the White House to the US Capitol
Enter two famous Washington addresses as the inputs: the White House in Address A and the US Capitol in Address B. Each address is geocoded to its building coordinates — the White House at 38.8977, −77.0365 and the Capitol at 38.8899, −77.0091. The straight-line result between those two pins is 1.57 miles (2.52 kilometres).
Read that result the right way. Two landmark buildings that feel like a proper journey across a city centre are, in direct terms, barely a mile and a half apart. The road result for the same pair will be longer, because a car cannot cut across the blocks between them: it must follow the street grid, turn at junctions and approach each building from a road that actually reaches it. That gap between the 1.57-mile direct figure and the longer road figure is not an error — it is the single most useful thing an address-level measurement shows you, because short in-city trips are exactly where the gap is proportionally largest.
A second pair makes the same point in New York. Times Square sits at 40.7580, −73.9855 and the Metropolitan Museum of Art at 40.7794, −73.9632, and the straight-line distance between them is 1.88 miles. On a place-name search both pairs would simply read as “within Washington” or “within New York” and tell you nothing. At address level you get a real number you can walk, drive, budget or compare — which is the whole reason this tool exists.
A second worked example: full address vs postal code only
Take two addresses in the same city: a flat on one side of town and an office on the other. Typed in full — street number, street name, town and postal code — each address geocodes to a pin on the correct building. The tool then reports two numbers: the straight-line distance, perhaps 2.1 miles, and the driving distance, perhaps 3.4 miles with a journey time to match. The gap between them is normal and informative: roads bend, one-way systems detour, and rivers and railways force crossings at fixed points. Our guide on driving distance vs straight-line distance explains why the road figure is almost always the larger of the two, and the rare cases — a pedestrian shortcut, a ferry — where it is not.
Now repeat the exercise with only the two postal codes. The pins move to the centres of the two postal areas, and the answers might shift by several hundred metres either way. Nothing has gone wrong; the measurement is simply answering a slightly different question — area centre to area centre — which is exactly what you want for comparing neighbourhoods, and not quite what you want for timing a specific front-door-to-front-door trip.
What is an address distance?
An address distance is the distance between two specific properties, measured from front door to front door rather than from town centre to town centre. That sounds like a small refinement, but it changes what the number means. A place-name distance answers a geography question: how far apart are these two settlements? An address distance answers a practical question: how far is this exact journey, between the two doors you will actually leave and arrive at?
The tool reports that journey two ways, because both are genuinely useful. The straight-line figure is the direct separation between the two buildings over the surface of the Earth — the figure that matters for “as the crow flies” claims, radius checks and a sense of scale. The driving figure is the length of the fastest standard road route between the same two pins — the figure that matters for time, fuel and money. Neither is the “real” one on its own; they answer different questions about the same pair of doors, and seeing them together tells you how much the road network adds to the direct separation.
Why the naive methods fail
The first naive method is planning a door-to-door journey from a place-name distance. Town centres are arbitrary points, and in a spread-out town either address can sit several miles from its centre, in opposite directions. Two homes described as “in the same town” can be a long drive apart, and two homes in neighbouring towns can be a short one. The centre-to-centre number hides both cases completely.
The second naive method is planning the journey from the straight-line number alone. Roads must follow the street pattern, respect one-way systems and cross rivers and railways where crossings exist. On a short city trip the road route can be half as long again as the direct line, and occasionally far more. If the decision you are making involves driving — a commute, a school run, a delivery — the road figure is the one to plan around, and the straight-line figure is context. Our guide to driving distance vs straight-line distance works through that relationship in full.
How does this calculator work?
An address is not a place a calculator can do maths on directly — first it has to become coordinates. That step is called geocoding: your browser sends each address to the OpenStreetMap geocoder (Nominatim), which matches it against its map data and returns the latitude and longitude of the building, or of the closest matching spot on the street. From there the maths is the same as everywhere else on this site: the straight-line distance by the haversine formula, and the driving distance from a live road route.
Full addresses and postal codes behave differently, and it is worth knowing why. A complete street address usually pins within a few metres of the building. A ZIP or postal code, by contrast, covers an area — a few streets in a dense city, or dozens of square miles in the countryside. When you enter only a code, the pin lands at the centre (centroid) of that area, so the result is really “centre of this ZIP to centre of that ZIP”. For codes that are far apart, the few miles of wobble hardly matter. For neighbouring codes, it matters a lot — two houses a street apart can return a two-mile answer. Our distance between ZIP codes guide explains the centroid issue in full. If the suggestions list offers several matches for your address, pick the one with the right town and code — common street names exist in hundreds of towns.
Privacy note: the addresses you type go directly from your browser to the OpenStreetMap geocoding service to be located; this site does not store them. If you would rather work from coordinates you already have, the coordinates finder shows exactly where an address lands, and the GPS tab of the main calculator measures between raw coordinates.
The process, in order:
- Read the text typed into Address A and Address B.
- Geocode each address with Nominatim, the OpenStreetMap geocoder, to a latitude and longitude pin.
- Calculate the straight-line distance between the two pins with the haversine formula.
- Request the fastest standard road route between the same two pins from the road network.
- Add the road segment lengths on that route to get the driving distance, and show both figures with the route on the map.
What formula does it use?
Three formulas do the work on this page, and each one below gets its own card, a plain-English restatement, a definition of every symbol in everyday words, and a worked example with real numbers. The haversine formula turns the two pins into the straight-line figure; the segment sum and the detour ratio produce and interpret the driving figure.
In simple words: this first haversine step mixes the north–south gap and the east–west gap between the two address pins into a single number that always falls between 0 and 1.
In simple words: this step turns that in-between number into the angle between the two pins, as seen from the centre of the Earth.
In simple words: multiply that angle by the Earth's radius and you get the direct distance between the two addresses over the surface of the Earth.
where:
- d is the straight-line distance between the two address pins — the direct distance over the Earth's surface, ignoring roads completely;
- φ (phi) is just the latitude of a pin — how far north or south it is — written in radians instead of degrees (to convert, multiply the degrees by π ÷ 180). φ1 is the first address's latitude and φ2 is the second address's;
- Δφ (delta phi) is simply the difference between the two latitudes, and Δλ (delta lambda) is the difference between the two longitudes — how far east or west apart the pins are — both in radians;
- a is a halfway number the formula builds out of those gaps; it always falls between 0 and 1, and the way it is built keeps the calculation accurate for very short distances, which is exactly what address work involves;
- c is the angle between the two pins as seen from the centre of the Earth, measured in radians;
- R is the Earth's radius — about 3,958.8 miles (6,371 kilometres);
- sin, cos and atan2 are ordinary calculator functions (sine, cosine and a form of inverse tangent) that any calculator or browser provides.
Worked through in full for New York (40.7128, −74.0060) to Los Angeles (34.0522, −118.2437), step by step — the same steps the tool follows for two addresses on the same street, just with bigger gaps:
- Convert the latitudes to radians by multiplying each by π ÷ 180: φ1 = 40.7128° becomes about 0.7106 radians, and φ2 = 34.0522° becomes about 0.5943 radians.
- Take the differences: Δφ = 34.0522 − 40.7128 = −6.6606°, which is about −0.1162 radians, and Δλ = −118.2437 − (−74.0060) = −44.2377°, which is about −0.7721 radians. (The minus signs do no harm: the formula squares the half-differences, so direction drops out and only the size of each gap matters.)
- Build the value a: sin²(Δφ ÷ 2) ≈ 0.0034, cos φ1 ≈ 0.7580, cos φ2 ≈ 0.8285 and sin²(Δλ ÷ 2) ≈ 0.1418, so a ≈ 0.0034 + (0.7580 × 0.8285 × 0.1418) ≈ 0.0924.
- Turn a into the angle c: c = 2 × atan2(√a, √(1 − a)) = 2 × atan2(0.3040, 0.9527) ≈ 0.6178 radians.
- Multiply by the Earth's radius: d = R × c = 3,958.8 × 0.6178 ≈ 2,445.6 miles (about 3,935.8 kilometres).
In simple words: add up the length of every stretch of road on the route between the two pins, and that total is the driving distance.
where:
- D is the total driving distance between the two addresses;
- each s is the length of one mapped road segment — one single stretch of road in the map data, such as the piece between two junctions;
- n is simply how many of those segments the route between the pins is made of.
Notice the contrast with the haversine formula above. The straight-line distance has a closed formula: feed in two coordinate pairs and the answer comes out. Road distance has no closed formula at all, because no equation can know where the roads happen to run — it is only ever the sum of road-segment lengths along the path a routing engine picks from the mapped network. That is why this page needs a routing engine for the driving figure and uses pure maths only for the straight-line figure.
In simple words: divide the road distance by the direct distance to see how much longer the road journey really is — a ratio of 1.40 means the road route is about forty percent longer than the direct line.
where:
- driving distance is the length of the road route between the two pins, built by the segment-adding formula above;
- straight-line distance is the haversine result, d, above, in the same unit;
- the ratio itself has no unit — it is just a multiplier, and at address level it is often high, because a short direct line can still require a long loop around blocks, one-way streets or a river crossing.
Worked through with two real city pairs, step by step:
- Dallas to Houston: take the driving distance, 238.3 miles, and the straight-line distance, 224.8 miles. Divide: 238.3 ÷ 224.8 = 1.06. The road route is about six percent longer than the direct line.
- Denver to Phoenix: take the driving distance, 820.6 miles, and the straight-line distance, 585.5 miles. Divide: 820.6 ÷ 585.5 = 1.40. The road route is about forty percent longer — a reminder that the same division is worth doing on any address pair before you plan around either figure.
Common mistakes
The commonest is accepting the first suggestion for a common street name: “High Street” and “Station Road” exist in hundreds of towns, and the geocoder can only rank its guesses. Always check the town and code in the suggestion before measuring. Second, leaving the house number off a long road — a pin at the road's midpoint can sit half a mile from the actual door. Third, treating a ZIP-only result as exact for a short trip; as the example above shows, centroid wobble can be larger than the journey itself. Fix all three by typing complete addresses and confirming each pin on the map before you trust the numbers.
When full addresses beat place names
The main distance calculator works happily with town and city names, and for “how far is it from Leeds to York?” that is all you need. Switch to this tool when the endpoints are specific properties: a house you are viewing, a school, a depot, a client's premises. Relocation decisions turn on door-to-door figures — a move that looks like “same town” on a place-name search can add twenty minutes to a commute once the real addresses are measured. The same applies to delivery and service businesses checking whether an address falls inside their patch, carers and tradespeople planning rounds, and anyone verifying a “within X miles” claim in a listing or a contract.
If the two addresses are far apart and you mainly care about flight planning or a rough sense of scale, the air miles calculator gives the straight-line figure between cities and airports directly. If you need the point exactly halfway between two addresses for a fair meeting spot, geocode them here first to check the pins, then take the coordinates to the midpoint calculator — the halfway point between two cities guide explains the idea in full.
Address distance compared with related measures
A place-name distance and an address distance can describe the same journey and differ by miles, because they measure between different points. Use place names for a quick sense of scale between towns; use addresses whenever a decision depends on the actual doors. A ZIP-to-ZIP distance sits between the two: more specific than a town name, less specific than a building, and best understood as area centre to area centre.
| Input | Pin lands on | Best for |
|---|---|---|
| Full street address | The building | Door-to-door journeys |
| ZIP or postal code only | The centre of the postal area | Comparing neighbourhoods |
| Town or city name | The settlement's central point | A quick sense of scale |
Address distance vs a map measurement
An address distance also differs from a map measurement. On the map distance calculator you place every point yourself and can trace a path of any shape, which is better for boundaries and trails. Here the points come from the addresses themselves, which is faster and less error-prone when what you have is two addresses.
Address distance vs a radius
It differs from a radius: the radius calculator asks whether addresses fall inside a circle around one point, while this tool measures one named pair at a time.
Vague or partial addresses
An address without a town or code is a guess waiting to happen. Street names repeat across a country, and the geocoder ranks its best matches rather than knowing which one you meant. The fix is always the same: complete the address and confirm the pin on the map before trusting the result.
The same address twice
Enter the same address at both ends and the distance is zero, which is correct and useless. It usually means a copy-and-paste slip, or two properties that share an address — flats in one building, for example. For properties inside one building, no map tool can separate them; the honest answer is that they are at the same location for travel purposes.
No road route between the addresses
Two addresses can be close in a straight line and have no road route at all — on opposite banks of a wide estuary with no nearby crossing, or on an island with no road connection in the mapped network. In that case the straight-line figure still stands, and the driving question needs a ferry, a boat or a much longer land route that you should check on the map itself.
New, renamed or poorly mapped addresses
A very new building may not be in the map data yet, and a renamed street may match its old name better than its new one. If an address will not match, try the postcode on its own, a neighbouring well-known building, or find the spot with the coordinates finder and work from the pin you can verify.
Judging a move or a commute
Measure the real candidate home against the real workplace, not town against town. A move that shortens the direct line can lengthen the drive if it puts a river or a congested centre between home and work, and only the address-level road figure reveals that before contracts are signed.
School, care and regular rounds
Journeys repeated daily deserve exact numbers. Carers, childminders, district nurses and tradespeople can check each address pair on a round and see whether the schedule written on paper fits the roads as they actually are, rather than discovering the gap a week into the job.
Delivery and service areas
A business that promises delivery or call-outs within a set distance needs to test real customer addresses, not post town names into a search. Measuring the address pairs behind a boundary dispute settles most arguments quickly, because both sides can see the same pins and the same route.
Checking a “within X miles” claim
Listings and adverts love a distance claim: near the station, within two miles of the school, a short drive to the coast. Type in the two addresses behind the claim and check which figure the claim must have used. Many are straight-line figures presented as if they were journeys, and the road result shows the difference at once.
Accuracy and limits
Accuracy here has two separate sources, and it helps to know which one is limiting your result. The first is the pin: a full address in well-mapped data usually lands within a few metres of the building, while a postal-code pin can be a long way from any particular door in a rural area. The second is the route: the driving figure follows the fastest standard route in OpenStreetMap data, and local closures, new roads and one-way changes can make the route you actually drive slightly different.
The straight-line maths itself is not a meaningful source of error at this scale. The haversine calculation on a sphere is more than precise enough for distances between buildings and towns; where a result surprises you, the cause is almost always a pin in the wrong place or a route shaped by the road network, not the formula. Check the pins first — that one habit removes most bad address results.
Note: this site does not store the addresses you enter. They pass from your browser to the geocoding service to be located, and the measurement happens from the returned coordinates.
What each result means
The straight-line distance is the direct separation between the two pins, in miles and kilometres, where one mile equals 1.609344 kilometres. The driving distance is the length of the road route between the same pins. The route drawn on the map shows which roads that figure follows, and it is your visual check on the whole result: if the line goes somewhere you would never drive, a pin is probably in the wrong place. The two pins themselves are results too — their positions tell you exactly what was measured, which is why confirming them matters more than reading extra decimal places.
Which sibling tool to use instead
If you only have place names and want a quick town-to-town figure, the main distance calculator is faster. If the journey is mainly about the road trip itself, the driving distance calculator presents the same road network with round-trip and ratio figures to the fore. If you need the fair meeting point between two addresses, take them to the midpoint calculator. If you want to trace a path or a boundary by clicking, use the map distance calculator, and if the journey will be flown, the air miles calculator is the right frame. Background reading lives in our guides, and our editorial policy explains how we handle sources and accuracy.
Frequently asked questions
Can I measure between two ZIP codes instead of addresses?
Yes — type the two codes into Address A and Address B and pick the matches from the suggestions, exactly as you would with full addresses. The important thing to remember is where the pin lands: a code covers an area, not a building, so the pin sits at the centre of that postal area and the result is really centre-of-area to centre-of-area. Over long distances the wobble at each end barely matters, but for neighbouring codes it can dominate the answer — two houses a street apart can return a two-mile result if their area centres sit that far apart. For comparing neighbourhoods that is exactly the figure you want; for a specific front-door journey, use the full addresses instead. See the distance between ZIP codes guide for the full explanation.
Why did my address land on the wrong street?
Because a geocoder can only match what it is given against the map data it holds, and an incomplete address leaves it guessing. Street names repeat constantly — a High Street or a Station Road exists in hundreds of towns — so without a town or code, the best-ranked match may be a same-named street somewhere else entirely. The fix is to complete the address: add the house number, the town and the ZIP or postal code, then choose the suggestion that names the right place. Always confirm the pin on the map afterwards. A pin in the wrong town produces a measurement that is precise, confident and completely wrong for your journey.
Is the driving figure the route I would actually take?
It is the fastest standard route between the two pins in current OpenStreetMap data, which is a good model of the journey but not a promise about it. The engine respects one-way streets and roads cars may use, and it weighs each road by its normal speed, so the route it picks is usually the one a sat-nav would start from. On the day, though, local knowledge, a closure, roadworks or heavy traffic can all favour a different route, and the route you actually drive may be a little longer or shorter. Treat the figure as the planning distance for the standard route. If the drawn line on the map passes somewhere you would never drive, a pin usually needs adjusting.
Can I use this for addresses in different countries?
Yes — the OpenStreetMap geocoder covers the world, so addresses in different countries work in the same two fields. Include the country in each address, or use the full international postal format, so that same-named towns and streets in different countries are not confused with each other. The straight-line figure is then simply the direct distance between the two buildings, wherever on Earth they are. The driving figure appears only if a road route connects them, so for two addresses on different continents there will normally be no road route at all and the straight-line figure stands on its own as the sense-of-scale number. Checking both pins on the map matters even more across borders, because place names repeat worldwide.
Why are the straight-line and driving distances so different?
Because the two figures measure different things. The straight-line figure is the direct separation between the two buildings over the surface of the Earth, as if nothing stood between them. The driving figure is the length of an actual road route, and roads must follow the street pattern, respect one-way systems, bend around obstacles and cross rivers and railways only where a crossing exists. On short city trips those detours are proportionally large: the White House and the US Capitol are only 1.57 miles apart in a straight line, yet a car still has to thread the street grid between them. Neither figure is wrong — they answer different questions about the same pair of doors. The how driving distance is calculated guide explains how the road figure is built up segment by segment.
How accurate is an address-to-address distance?
With full addresses and pins you have confirmed on the map, the straight-line figure is accurate to within a few metres, because the haversine maths underneath it is far more precise than address work ever needs. The driving figure matches the mapped road route closely, though the route you actually drive can differ slightly if local roads have changed since the data was updated. The weak point is almost never the formula — it is the pin. A postal-code-only pin sits at the centre of an area that may be several miles wide in the countryside, so a code-based result carries that much uncertainty at each end. If a result surprises you, check the pins first; that one habit removes most bad address measurements.
Can I measure between an address and a postcode?
Yes — the two fields accept any mix of full addresses, partial addresses and codes. Just be clear about what the result then combines: a building-level pin at one end and an area-centre pin at the other. Over a long distance that mixture is harmless, because the area-centre wobble is tiny compared with the whole journey. Over a short distance it can skew the answer by more than the journey itself, especially if the code covers a large rural area. When the exact figure matters — a commute you will repeat every day, say — replace the code with the full address so that both ends are measured to the door.
Why does the map route look longer than the journey I know?
Because the tool reports the fastest standard route in the map data, and that is not always the route local knowledge would choose. A shortcut you rely on may be missing from the data, mapped as restricted, or simply slower in the engine's judgement than the main-road alternative it picked. A recently opened road or a different bridge can have the same effect until the map catches up. The distance shown is honest for the route drawn — follow the line on the map and you will usually see exactly where the extra length comes from. If the line does something clearly wrong, check the pins first, because a pin on the wrong building bends the whole route around it.
What should I do if my address is not found?
Start by completing the address: add the town and the postal code, and check the spelling of the street name, because the geocoder ranks its matches and a small typo can bury the right one. If it still fails, try the postcode on its own, or a nearby well-known landmark, and confirm the area on the map. Very new buildings may not be in the map data yet, and a renamed street sometimes matches its old name better than its new one. As a last resort, find the spot with the coordinates finder and work from a pin you can verify, rather than accepting a match you cannot check.
Can I find the halfway point between two addresses?
Yes. First confirm both addresses here, so you know each one geocodes to the correct building — a halfway point calculated from a wrong pin is worse than useless. Then take the pair to the midpoint calculator, which finds the point exactly halfway between the two sets of coordinates. That point is the fair meeting spot in direct terms, and it is genuinely useful for choosing where to meet a buyer, a colleague or a friend across town. Remember, though, that it is a geographic midpoint, not a travel-time midpoint: if one side has much faster roads, equal driving time may mean meeting somewhat closer to the slower side. The halfway point between two cities guide explains the idea in full.
Are my addresses stored when I use this tool?
No. The addresses you type go directly from your browser to the OpenStreetMap geocoding service to be located, and the measurement is then made from the coordinates that come back. This site does not store the addresses, build a history of your searches or keep the results once you leave the page. The privacy note in the measuring section above states the same policy where the process is described. If you would rather not send an address to a geocoder at all, you can work from coordinates you already have, using the GPS tab of the main calculator.