Distance calculator guide showing New York to Los Angeles as 3935.75 kilometres

Distance Calculator: Miles, Kilometres and Travel Time

Distance calculator guide showing New York to Los Angeles as 3935.75 kilometres
New York to Los Angeles is 3,935.75 kilometres, or 2,445.56 miles, in a straight line.

Short answer: The straight line distance between two places is found with the haversine formula, using their latitude and longitude and the radius of the Earth, 6,371 kilometres. The distance calculator does that calculation for you: New York (40.7128, −74.0060) to Los Angeles (34.0522, −118.2437) is 3,935.75 km, which is 2,445.56 miles, or 3,935,750 metres. This guide explains the formula, the mile and kilometre conversions, and how to work out travel time from distance and speed.

How distance is measured

Every place on Earth has a latitude and a longitude. Latitude runs from −90 at the South Pole to 90 at the North Pole, and longitude runs from −180 to 180. North and east are positive, south and west are negative, so New York is 40.7128, −74.0060. The distance calculator takes two coordinate pairs and returns the straight line distance between them, which is the shortest path over the surface, also called the great circle distance.

The haversine formula works in three steps. First, convert the degrees to radians, because the trigonometric functions need radians, so each angle is multiplied by π ÷ 180. Second, apply the haversine formula, which uses the sine of half the latitude and longitude differences and the cosines of the two latitudes to get the central angle between the two points. Third, multiply that central angle by the radius of the Earth, R = 6,371 km, to get the distance. For plain x and y points on a flat plane the formula is simpler: distance = √((x₂ − x₁)² + (y₂ − y₁)²). For example, the distance from (0, 0) to (3, 4) is √(3² + 4²) = √25 = 5 units.

Worked examples

Example 1, New York to Los Angeles: the default calculation on the distance calculator page. New York (40.7128, −74.0060) to Los Angeles (34.0522, −118.2437) is 3,935.75 km, which is 2,445.56 miles. The same distance is 3,935,750 metres and 12,912,557 feet, because 1 kilometre is 1,000 metres and 1 mile is 5,280 feet.

Example 2, London to Paris: London to Paris is 343.56 km, which is 213.48 miles. Short city pairs like this one are the easiest way to check a conversion, because the numbers are small enough to work out by hand: 343.56 ÷ 1.609344 = 213.48.

Example 3, more city pairs: Paris to Berlin is 877.46 km, New York to Chicago is 1,144.29 km, and Sydney to Melbourne is 713.43 km.

Example 4, a flat plane: the distance from (0, 0) to (3, 4) is 5 units, because 3² + 4² = 25 and the square root of 25 is 5. The same 3, 4, 5 pattern shows up in maps, games and coordinate geometry whenever two points form a right angled triangle.

Miles and kilometres: converting

One mile is 1.609344 kilometres, and one kilometre is 0.62137 miles. To get miles, divide kilometres by 1.609344. To get kilometres, multiply miles by 1.609344. The calculator shows the same distance in kilometres, miles, metres and feet, so no separate conversion is needed, but the table below is handy for quick checks.

Kilometres Miles Metres
1 0.62 1,000
10 6.21 10,000
100 62.14 100,000
500 310.69 500,000
1,000 621.37 1,000,000
3,935.75 2,445.56 3,935,750

Keep the units straight while you convert. A common slip is to multiply when you should divide, which makes a 100 kilometre trip look like 160 miles instead of 62.14 miles. For reference, 500 kilometres is 310.69 miles, and 1,000 kilometres is 621.37 miles.

Travel time from distance

Travel time is distance divided by speed, and the distance and the speed must use the same unit. For example, 300 kilometres at 60 kilometres per hour takes 5 hours, because 300 ÷ 60 = 5. A shorter trip at the same speed, 240 kilometres at 80 kilometres per hour takes 3 hours, because 240 ÷ 80 = 3. In miles, 120 miles at 60 miles per hour takes 2 hours, and 90 miles at 45 miles per hour takes 2 hours as well, because 120 ÷ 60 = 2 and 90 ÷ 45 = 2.

Use the time calculator to add or subtract the hours and minutes once you have the travel time, for example to work out an arrival time from a departure time. The math calculator is handy for the division itself. Remember that the travel time from a straight line distance is a lower bound: the road distance is longer, and traffic, stops and speed limits add more time on top.

Straight line distance and road distance

Straight line distance is the shortest path over the surface of the Earth. Road distance follows roads, so it is almost always longer, sometimes much longer when a direct road does not exist. The distance calculator on this site gives straight line distance, which is the right number for comparing how far apart two places are, for flight planning, and for checking a map scale. It is not the number to use for fuel, driving time or delivery estimates, because those depend on the road route.

For a road trip, start with the straight line distance as a rough guide, then check the road distance on a map. The gap between the two tells you how direct the route is: a gap of a few percent means a fairly straight road, while a gap of half as much again means the road winds or detours around hills, water or borders.

Common mistakes

Forgetting radians: the trigonometric functions need radians, so each angle must be multiplied by π ÷ 180. Skipping that step is the most common distance calculation mistake, and it gives an answer that looks plausible but is wrong.

Mixing miles and kilometres: a speed in miles per hour goes with a distance in miles, and a speed in kilometres per hour goes with a distance in kilometres. Mixing them gives a travel time that is wrong by a factor of 1.609344.

Using straight line distance for a road trip: the straight line is the shortest possible path, so a road trip always takes longer. Add the road distance and realistic speeds before you plan a departure time.

Swapping the coordinates: latitude comes first and longitude second. New York is 40.7128, −74.0060, not the other way round, and swapping them points at a different place entirely.

Travel time by mode: walking, cycling, driving and flying

The same distance takes very different times at different speeds, because travel time is distance divided by speed. The 300 kilometre trip from this guide shows the range. Walking at 5 kilometres per hour, it takes 300 divided by 5, which is 60 hours. Cycling at 20 kilometres per hour, it takes 300 divided by 20, which is 15 hours. Driving at 60 kilometres per hour, it takes 5 hours. By train at 120 kilometres per hour, it takes 300 divided by 120, which is 2.5 hours. By plane at 800 kilometres per hour, it takes 300 divided by 800, which is 0.375 hours, or 22.5 minutes.

These are moving times, not door to door times. A real trip adds stops, traffic, boarding and waiting, so the moving time is a lower bound. The straight line distance adds a second gap: roads are longer than the straight line, so a road trip takes longer than the straight line time. London to Paris is 343.56 kilometres in a straight line. At 100 kilometres per hour on a perfectly straight road, the trip would take 343.56 divided by 100, which is 3.44 hours, or 3 hours 26 minutes. The real drive takes longer, because the road is longer than 343.56 kilometres before traffic is even counted. Add the hours and minutes with the time calculator, and work out the division with the math calculator.

FAQ

How is the distance between two places calculated?

The straight line distance is found with the haversine formula, using the latitude and longitude of both places and the radius of the Earth, 6371 kilometres. New York to Los Angeles is 3935.75 kilometres, which is 2445.56 miles.

How many miles are in a kilometre?

One kilometre is 0.62137 miles. Divide kilometres by 1.609344 to get miles, or multiply miles by 1.609344 to get kilometres. For example, 100 kilometres is 62.14 miles.

How do you work out travel time from distance?

Divide the distance by the speed. For example, 300 kilometres at 60 kilometres per hour takes 5 hours. Use the same unit for distance and speed, so kilometres go with kilometres per hour and miles go with miles per hour.

What is the difference between straight line distance and road distance?

Straight line distance is the shortest path over the surface of the Earth. Road distance follows roads, so it is almost always longer. The distance calculator on this site gives straight line distance.

How do you calculate the distance between two points on a flat plane?

Use the formula distance equals the square root of the first difference squared plus the second difference squared. For example, the distance from point 0, 0 to point 3, 4 is 5 units, because 3 squared plus 4 squared is 25 and the square root of 25 is 5.

How many feet are in a mile?

There are 5280 feet in a mile. New York to Los Angeles is 2445.56 miles, which is 12912557 feet. The distance calculator shows the same distance in kilometres, miles, metres and feet.

Related calculators: Distance Calculator · Time Calculator · Math Calculator · Percentage Calculator

Similar Posts