Mileage Calculator
Press Calculate to see the results.
Type two city names to get the straight-line mileage between them, plus rough estimates of the driving distance, driving time and flight time. The mileage calculator knows about 150 major US and world cities.
Mileage between two places can mean different things. The straight-line or as-the-crow-flies distance is the shortest path over the Earth's surface, which on a globe is an arc of a great circle. It is what airlines and radio engineers use, and it is the same in both directions. The driving distance follows roads, so it is always longer and depends on the route you take.
This calculator gives the exact great-circle distance between the centers of two cities and then estimates the rest. The driving estimate multiplies the straight-line figure by 1.2, a common rule of thumb for well-connected road networks. The flight estimate assumes an average cruising speed of about 500 mph plus half an hour for takeoff, climb, descent and taxiing. Real figures differ, especially for short trips, island destinations or routes around lakes and mountains.
For New York to Boston the straight-line distance is about 190 miles, while the usual highway route along Interstate 95 or via Hartford is a little over 210 miles, a ratio close to the 1.2 rule.
Each city is stored as a latitude and longitude. The haversine formula converts the difference between two points into the angle between them as seen from the Earth's center, and multiplying that angle by the Earth's radius gives the distance along the surface.
Treating the Earth as a perfect sphere introduces an error of up to about 0.5%, because the planet is slightly flattened at the poles. Surveyors and aviation systems use more precise ellipsoid formulas such as Vincenty's, but for trip planning the difference is a mile or two over hundreds of miles.
d = 2R · arcsin √( sin²(Δφ/2) + cos φ₁ · cos φ₂ · sin²(Δλ/2) )
- R
- mean radius of the Earth, 6,371 km (3,959 miles)
- φ₁, φ₂
- latitudes of the two places
- Δφ, Δλ
- differences in latitude and longitude
This is the haversine formula for great-circle distance on a sphere.
Knowing the mileage of a trip helps with budgeting fuel, comparing driving with flying, and estimating arrival times. Multiply the driving distance by your vehicle's fuel use to estimate gas: a 215-mile drive in a 30 mpg car needs a little over 7 gallons each way.
Businesses and self-employed people often reimburse or deduct driving at a per-mile rate. In the United States the IRS publishes a standard mileage rate each year for business, medical and moving, and charitable driving. Those deductions must be based on the miles you actually drove, recorded in a log with dates, destinations and purposes, not on map estimates.
For the most accurate driving distance and time, including traffic, tolls and road closures, use a route planner or navigation app; use this calculator for quick comparisons and planning.
Frequently asked questions
How far is New York from Boston?
About 190 miles (306 km) in a straight line and roughly 215 miles by road, a drive of around four hours without heavy traffic.
What is great-circle distance?
The shortest distance between two points on the surface of a sphere, measured along the circle whose center is the center of the Earth. Long-haul flights follow great-circle routes, which is why they look curved on flat maps.
Why is driving distance longer than straight-line distance?
Roads bend around terrain, water and property and connect through intermediate places. On average driving routes are about 20% longer than the straight line.
Can I enter any town?
The calculator includes about 150 large cities in the US and around the world. For a small town, enter the nearest large city for an approximate answer.
Updated by Calculator.hair. How we build and check our calculators