Celebrating 20 Years of web design, development & digital marketing - est. 2006
20 Years
Est. 2006
Speak to an expert
0808 196 4432
Free call - Mon-Fri 9am-5pm

Postcode Distance Calculator

Work out the distance between any two UK postcodes

Type a pair of UK postcodes below and we'll tell you the straight-line distance between them, in miles and kilometres. Full postcodes and outward codes both work.

Common Uses

People come to this calculator for all sorts of reasons. A few of the most common:

Delivery & Logistics

Working out journey distances for quoting courier jobs, fleet planning, or setting e-commerce shipping fees.

Service Area Planning

Setting a sensible catchment radius for mobile trades and anyone who travels to customers.

Staff Recruitment

Checking how far a candidate would commute, or pricing up mileage allowances for field-based roles.

Property & Relocation

Quick sanity check when house-hunting: how far is that new place from work, school, or the in-laws.

Expense Claims

Producing a defensible mileage figure for expenses, invoicing, or HMRC submissions.

Market Research

Banding customers and competitors by postcode distance to understand footfall and overlap.

How It Works: The Haversine Formula

A lot of online distance calculators cheat. They treat the map as if it were flat, which is fine for very short hops but starts to drift once you're looking at journeys across the country or anywhere with a noticeable north/south component. The error can easily run to several miles.

This calculator uses the Haversine formula instead. Haversine works out the great-circle distance between two points on the surface of a sphere, so it respects the fact that the Earth is round. The formula itself looks like this:

a = sin²(Δlat/2) + cos(lat₁) · cos(lat₂) · sin²(Δlon/2)
c = 2 · atan2(√a, √(1-a))
d = R · c

Here, lat and lon are latitude and longitude in radians, and R is the Earth's mean radius (3,958.8 miles or 6,371 kilometres). The result is accurate to well under a mile between any two UK postcodes, which is more than good enough for quoting jobs, setting catchment areas, or submitting an expense claim without worrying about the numbers.

One thing to keep in mind: this is straight-line distance, not drive distance. A lorry can't fly across a loch, so if you need actual road miles or travel time, you'll want something that routes through the road network. We build those too (see below).

Need Bespoke Postcode Data?

This free tool handles one pair at a time. Behind the scenes, we do quite a bit more.

Primo Interactive builds postcode and geographic data solutions for businesses that need them at scale. Most of the work falls into a handful of categories:

  • Bulk postcode enrichment. Adding latitude, longitude, town, county and region to an entire customer database in one pass.
  • Distance matrices. Working out distances between thousands of origin and destination pairs at once, typically for delivery routing, catchment modelling, or territory planning.
  • Nearest-location finders. Adding "find my nearest store" or "find my nearest engineer" functionality to a website or app.
  • Drive-time and travel-time data. Going beyond straight-line distance by pulling real-world driving times from major routing providers.
  • Private APIs. Building a postcode lookup and distance endpoint that sits inside your own systems, rather than relying on a third party.
  • Geocoded reporting. Map-based dashboards showing customer locations, sales by area, and whatever else you need to see on a map.

If any of that sounds useful, or if you have a postcode problem that isn't on the list, get in touch.

Get in Touch

Serving Businesses Nationwide

Primo Interactive serves businesses across the UK, Europe and worldwide, including: London, Manchester, Birmingham, Leeds, Liverpool, Sheffield, Bristol, Newcastle, Edinburgh, Glasgow, Cardiff, Oxford, Cambridge, Nottingham, Wrexham & Chester.

Trusted by some of the best…

Primo Interactive