Introduction
This article explains how mileage is calculated in Shipper TMS, including which mapping tool is used and how order distance is determined.
Shippers and partners may reference this information to understand how order mileage is calculated for rating, reporting, and billing purposes, and to ensure consistency across customers.
What Tool Is Used to Calculate Mileage?
Shipper TMS calculates order distance using the Mapbox Directions API.
Mapbox is a widely used, industry-standard mapping and routing provider. The same routing logic is applied consistently across all orders to ensure mileage is calculated using a single, standardized method.
How Mileage Is Calculated
This section explains the step-by-step process used to calculate the Order Distance shown in Shipper TMS.
Step 1: Geocode Pickup and Delivery Addresses
When an order is created or updated, the pickup and delivery addresses are converted into geographic coordinates (latitude and longitude) using the Mapbox Geocoding API.
This ensures that routing calculations are based on precise location data rather than raw text addresses.
Step 2: Calculate Route Distance
Once the pickup and delivery coordinates are established, Shipper TMS calculates the route between those points using the Mapbox Directions API.
The Directions API determines the most appropriate driving route based on Mapbox’s road network data and routing logic.
Step 3: Extract Distance and Duration
From the calculated route, Shipper TMS extracts:
- Distance (returned in meters and converted to miles)
- Estimated duration (returned in seconds)
The distance value is displayed in the Order Distance field within Shipper TMS and is used consistently across the platform.
Mileage Consistency and Billing
Order mileage in Shipper TMS is calculated using the same mapping provider and logic for all customers. This ensures consistency when mileage is referenced for:
- Billing and invoicing
- Customer reporting
- Partner or shipper audits
Because Shipper TMS uses Mapbox for routing, mileage values may differ slightly from other mapping tools that rely on different routing algorithms or road data.
Frequently Asked Questions
Can mileage be manually adjusted?
The Order Distance field is system-calculated based on routing data and cannot be manually edited.
Does traffic affect the mileage calculation?
Traffic conditions may affect estimated duration, but mileage is based on the calculated route distance and not real-time traffic variability.
Is the same calculation used for all customers?
Yes. All orders in Shipper TMS use the same Mapbox-based calculation method to ensure consistent distance values across customers, including enterprise shippers.
Learn More
Use the resources below to learn more about how mileage and distance are used when creating orders and reviewing completed shipments in Shipper TMS.