The AVGWAIT function calculates the average waiting time for a request or call to be processed.

## Syntax

`AVGWAIT(Number of servers, Arrival rate, Average duration)`

## Arguments

Argument | Data type | Description |

Number of servers (required) | Number | The number of servers (for example, call center agents) available to process requests. |

Arrival rate (required) | Number | The interval between the arrival of each request. |

Average duration (required) | Number | The average duration it takes to process each request. |

The AVGWAIT function returns a number. This is the average waiting time for a request to be processed, using the same time unit as the *Arrival rate* and *Average duration* arguments.

## Additional information

### How the AVGWAIT function is calculated

The ANSWERTIME function calculates the solution to this equation:

In this equation:

- x is the
*Number of servers*. - y is the
*Arrival rate*. - z is the
*Average duration*. - a is the offered load, which is y multiplied by z.
- p is the offered load per server, which is a divided by x.

## Constraints

### Time unit for arguments

The *Arrival rate* and *Average duration* arguments do not have to use a specific time unit. For example, they can use seconds or minutes. However, both arguments must use the same time unit.

### Maximum number of servers

The maximum number you can use for the *Number of servers* argument is five million.

## Calculation engine functionality differences

Call center planning functions are unavailable in Polaris. Learn more about the differences between Anaplan calculation engines.

## Examples

In this example, the *Call Centers* list is on columns, and line items on rows. The first three line items contain the data for the AVGWAIT function for each call center:

- The scheduled number of servers to process requests
- The arrival rate, or interval between each request arriving
- The average duration it takes to complete requests

The fourth line item uses the AVGWAIT function to calculate what the average waiting time for a request to be processed given the number of servers, arrival rate, and average duration to process requests.

The fifth line item enables you to adjust the arrival rate of requests. The formula in the sixth line item uses the adjusted arrival. This enables you to see how the average waiting time changes given a different arrival rate. A value of Infinity is given for *Call Center 2* because the rate of incoming requests is higher than the ability to process them, which means that calls have to wait indefinitely.

Call Center 1 | Call Center 2 | Call Center 3 | Call Center 4 | |

Scheduled Number of Servers | 25 | 45 | 50 | 39 |

Request Arrival Rate | 0.84 | 0.93 | 0.69 | 0.68 |

Average Duration | 25 | 46 | 45 | 45 |

Average Waiting Time
| 1.9213063 | 13.4641512 | 0.00270453 | 0.53752576 |

Adjusted Arrival Rate | 0.9 | 1.1 | 0.89 | 0.77 |

Adjusted Average Waiting Time
| 5.07923029 | Infinity | 0.40000875 | 3.82731801 |