# Advanced driving distance calculator with fuel cost estimation

## How to use the distance calculator

To calculate the distance between two cities, start typing the name of the starting point in the "From" field. From the prompt box that appears, select the city you want. Instead of names, you can also use geographical coordinates or click on the marker on the right to select the exact point on the map. After you have selected the starting point, enter the destination point in the "To" field. Then click on the "calculate" button.

The map page that opens will show you the route, a short summary containing the distance, time it would take, amount of fuel required and its cost. The route map will be shown below. The starting and destination points will be marked with markers. An orange line will be used to show the highway route. Under these details, there will be a summary table containing information about the route and the route sections, such as road type, calculated length and the length of each segment of the route.

The result can be printed out. You can also change some parameters to repeat the calculation. In the advanced settings, you can specify the transit points and adjust the desired speed for each road type. Under the additional settings are input fields for the fuel calculator. Enter the actual fuel consumption of your vehicle and the average price of 1 gallon of fuel. When re-calculating, this data will be used to calculate the required amount of fuel and its cost.

## Algorithm for calculating the distance between cities

The distance calculator calculates the route between points by finding the shortest path between the points in a weighted graph of roads (Dijkstra's algorithm). Then optimally the shortest and quickest route is constructed. Precise satellite coordinates of roads and settlements are used. The calculation is based on computer simulation, which is not always perfect. So don't forget to make some allowances when planning your trip.

## Other ways of calculating the driving distance

Perhaps the simplest alternative is to open a road atlas and to make a route map with the eyes. Then, trace the route with odometer to get the approximate mileage. Estimating the travel time will be more difficult since you will need to split the route into segments with the same road class and measure the sum of the lengths of fragments of each class. Knowing the average speed for each road type, it will be easy to calculate the time, dividing the route by speed.

If there is no odometer available, you can use a ruler. Attach the zero-point to the starting point of the route and move the line, firmly sticking it to hairpin turns.

You can also calculate the distance between cities using tables present in atlases and reference books. This is quite convenient for routes that begin and end in cities. Small cities are generally not present in the table.

## When do you use the distance calculator?

The free distance calculator shows the exact distance between cities. It finds the shortest route and also calculates the fuel consumption. It can be very useful in the following cases:

- The distance calculator service enables a traveller to create his route, for example, when planning for a summer vacation with his family or a business trip by car. Knowing the fuel consumption and the average price per gallon of fuel, it is easy to calculate the possible cost of the trip.
- The distance calculator allows truckers to create a route on a map when preparing for a long-haul ride.
- The distance calculator is a useful tool for a shipping company – it helps to determine the mileage, as well as estimate the shipping cost based on the tariffs of shipping companies.

Other countries: Driving distance calculator for United States, Driving distance calculator for Canada, Driving distance calculator for United Kingdom