Tracking carrier performance is notoriously difficult when weekends skew your delivery metrics. While organizations often review standard operational funding sources to optimize supply chains, true efficiency requires precise data. Accurately measuring transit times grants logistics leaders the leverage needed to negotiate better carrier SLAs. However, a key stipulation of this analysis is excluding non-working days to prevent skewed averages. For example, top-tier distributors rely on Excel's NETWORKDAYS function to isolate true transit durations. Below, we will demonstrate the exact formula to average these shipping times seamlessly.
In logistics and supply chain management, tracking shipping times is a critical Key Performance Indicator (KPI). However, calculating the average duration it takes for an order to move from your warehouse to a customer's doorstep can be tricky. If you rely on a simple subtraction formula (Delivery Date - Shipping Date), your data will include weekends.
Since most courier services and fulfillment centers do not operate or deliver on weekends, including Saturdays and Sundays in your shipping metrics can artificially inflate your shipping times, making your logistics operations look less efficient than they actually are. To get an accurate picture, you need to calculate the average shipping times with weekends excluded.
In this tutorial, we will explore the best Excel formulas and techniques to calculate and average shipping times excluding weekends, utilizing both traditional helper-column methods and advanced, single-cell dynamic array formulas.
Before diving into the averaging process, it is essential to understand the primary Excel function used for excluding weekends: NETWORKDAYS.
The NETWORKDAYS function calculates the number of working days between two dates, automatically excluding Saturdays and Sundays. It also allows you to exclude a custom list of holidays.
Syntax:
=NETWORKDAYS(start_date, end_date, [holidays])
If your business operates in a region where the weekend falls on different days (for example, Friday and Saturday), or if your shipping carriers deliver on Saturdays, you should use NETWORKDAYS.INTL instead. This function allows you to define custom weekend days using a weekend code.
The most straightforward and audit-friendly way to calculate average shipping times is by using a helper column. This method works perfectly in all versions of Excel, including older versions like Excel 2010, 2013, and 2016.
Assume you have a data table containing Order IDs, Ship Dates, and Delivery Dates starting from row 2:
| Order ID (Col A) | Ship Date (Col B) | Delivery Date (Col C) | Shipping Days (Col D - Helper Column) |
|---|---|---|---|
| ORD001 | 2023-10-12 (Thursday) | 2023-10-17 (Tuesday) | Formula goes here |
| ORD002 | 2023-10-13 (Friday) | 2023-10-16 (Monday) | Formula goes here |
| ORD003 | 2023-10-18 (Wednesday) | 2023-10-19 (Thursday) | Formula goes here |
In cell D2, enter the following formula to calculate the net shipping days:
=NETWORKDAYS(B2, C2) - 1
Why subtract 1?
The NETWORKDAYS function is inclusive of both the start and end dates. For example, if an item ships on Friday (Day 1) and arrives on Monday (Day 2), NETWORKDAYS will return 2. If you prefer to measure elapsed time (e.g., shipping took 1 day), subtracting 1 from the result yields the standard "transit days" metric. If your team considers same-day deliveries as "1 day," you can omit the -1.
Drag this formula down for all your rows. Your table will populate as follows:
NETWORKDAYS("2023-10-12", "2023-10-17") - 1 yields 3 days (excludes Saturday and Sunday).NETWORKDAYS("2023-10-13", "2023-10-16") - 1 yields 1 day (excludes Saturday and Sunday).NETWORKDAYS("2023-10-18", "2023-10-19") - 1 yields 1 day.Once your helper column is configured, you can find the average shipping time using the simple AVERAGE function in an external cell (e.g., F2):
=AVERAGE(D2:D4)
For our sample set, this will output 1.67 days.
If you are using Microsoft 365 or Excel 2021, you don't need a helper column. You can calculate the average shipping time directly in a single cell using a dynamic array formula combined with the MAP and LAMBDA functions.
Historically, typing =AVERAGE(NETWORKDAYS(B2:B4, C2:C4)) would result in an error because NETWORKDAYS does not natively accept arrays as inputs. The modern MAP function solves this by forcing Excel to evaluate NETWORKDAYS row-by-row before calculating the average.
Enter the following formula in an empty cell:
=AVERAGE(MAP(B2:B4, C2:C4, LAMBDA(ship, deliver, NETWORKDAYS(ship, deliver) - 1)))
B2:B4 and C2:C4 value-by-value.ship and deliver to the dates in each row.{3, 1, 1}.1.67.To make your shipping averages even more accurate, you should exclude public holidays alongside weekends. If a carrier is closed for Thanksgiving or Christmas, those days shouldn't count against your shipping efficiency metrics.
To do this:
H2:H10).NETWORKDAYS function.Helper Column Formula with Holidays:
=NETWORKDAYS(B2, C2, $H$2:$H$10) - 1
Single-Formula (M365) with Holidays:
=AVERAGE(MAP(B2:B4, C2:C4, LAMBDA(ship, deliver, NETWORKDAYS(ship, deliver, $H$2:$H$10) - 1)))
If your shipping partners deliver on Saturdays but rest on Sundays, standard weekend exclusion will skew your data. You can resolve this by replacing NETWORKDAYS with NETWORKDAYS.INTL.
The syntax of NETWORKDAYS.INTL includes a [weekend] argument:
=NETWORKDAYS.INTL(start_date, end_date, [weekend], [holidays])
The weekend codes are pre-defined by Excel. Here are a few common codes:
To calculate shipping times where only Sunday is excluded as a non-working day, use code 11:
=NETWORKDAYS.INTL(B2, C2, 11, $H$2:$H$10) - 1
If an order has shipped but has not yet been delivered, your delivery date cell will be blank. Standard formulas might evaluate a blank cell as day zero, resulting in a large negative number that ruins your average.
To prevent this, wrap your helper column formula in an IF statement:
=IF(ISBLANK(C2), "", NETWORKDAYS(B2, C2) - 1)
Since the AVERAGE function automatically ignores text and empty cells, it will only average the completed deliveries.
If your formula returns a #VALUE! error, check the formatting of your dates. Excel must recognize your dates as true serial numbers, not as text. You can test this by changing the cell format to "General"-if the date turns into a number (like 45201), it is formatted correctly. If it doesn't change, re-enter the dates or use the DATEVALUE function to convert them.
Ensure that the cell displaying your final average is formatted as a "Number" with one or two decimal places. By default, Excel may round your average to the nearest whole number, hiding the precision of your shipping metrics.
Calculating shipping averages without weekends gives you clean, actionable operational data. For maximum compatibility across various versions of Excel, use a helper column with =NETWORKDAYS(Ship_Date, Delivery_Date) - 1 and average the results. If you are using Microsoft 365, take advantage of the modern AVERAGE(MAP(...)) combination to keep your worksheets clean and devoid of redundant helper columns.
Disclaimer:
The documents and templates provided on this page are for informational and illustrative purposes only. They do not constitute professional, legal, or financial advice, and should not be relied upon as such. Because individual circumstances and regulatory requirements vary, these materials may not be suitable for your specific needs. We recommend consulting with a qualified professional before adapting or using any of these examples for official or commercial purposes.