Queuing Theory
calculator.
See how long a line waits, how busy the servers are, and how many you need.
- Each server busy
- 83.3%
- Wait at all
- 62%
- Served within t
- 62.4%
Each server is busy 83.3% of the time. Random bunches of arrivals still build a line, even with spare capacity on average.
How the wait grows with arrivals
Drag the point to change the arrival rateWait in line against the arrival rate for 5 servers. At 50 per hour the wait is 3.72 min. The curve climbs steeply near 60 per hour, where the servers are full all the time.
Servers for a service level
You need 6 servers to serve 80% within 3 min. With 6, 89.1% are, and the average wait is 53.5 s.
What adding servers would do
| Servers | Busy | Wait at all | Avg wait | Within t |
|---|---|---|---|---|
| 5(yours)Busy 83.3% | 83.3% | 62% | 3.72 min | 62.4% |
| 6Busy 69.4% | 69.4% | 32.7% | 53.5 s | 89.1% |
| 7Busy 59.5% | 59.5% | 16% | 16.9 s | 97.1% |
| 8Busy 52.1% | 52.1% | 7.2% | 5.6 s | 99.3% |
| 9Busy 46.3% | 46.3% | 3% | 1.9 s | 99.8% |
| 10Busy 41.7% | 41.7% | 1.2% | 0.6 s | 100% |
How many customers are present
Bars give the chance, in percent, of each number of customers present. From 5 up, every server is busy and newcomers wait; those bars are in the second colour.
Chance of each count
| Present | Chance | Or fewer |
|---|---|---|
| 0 | 0.99% | 0.99% |
| 1 | 4.11% | 5.1% |
| 2 | 8.57% | 13.68% |
| 3 | 11.91% | 25.58% |
| 4 | 12.4% | 37.99% |
| 5 | 10.34% | 48.32% |
| 6 | 8.61% | 56.93% |
| 7 | 7.18% | 64.11% |
Working
- 1Offered load: how many servers the arrivals keep busya = λμ = 5012 = 4.1667 erlangs
- 2Utilization: the share of time each server is busyρ = ac = 0.8333, below 1, so the line settles
- 3Erlang C: the chance that all servers are busy when you arriveC = 0.6201
- 4Average number waitingLq = C × ρ1 − ρ = 3.1007
- 5Average wait, then time in the systemWq = Lqλ = 0.06201 hW = Wq + 1μ = 0.14535 h
- 6Check: Little's law ties the four averages togetherλ × W = 7.2674, and L = 7.2674λ × Wq = 3.1007, and Lq = 3.1007Wq + 1μ = 0.14535, and W = 0.14535
How it's worked out
The models here are written M/M/c. The first M means customers arrive at random at a steady average rate, the second M means service times are random too, and c is the number of servers (Ross, Eastern Michigan University). Four letters, as in M/M/1/6, add a limit on how many fit in the system.
You give λ, the arrivals per unit of time, and μ, how many one server finishes in that time. Their ratio is the offered load a, in erlangs: how many servers the work keeps busy on average. Divide by c for the utilization ρ.
With no limit on room, ρ must be below 1, or the line grows without end. The Erlang C formula then gives C, the chance an arrival finds every server busy. From it come the average number waiting and the average wait.
Little's law ties the averages together: the number in the system is the arrival rate times the time each one stays, and the same holds for the line alone. The working ends with that check. With a limit K, the tool works out the chance of each count from 0 to K, and arrivals that find it full are lost.
Worked examples
Dana staffs a call center for the lunch hour
Dana expects 50 calls an hour, and a call takes 5 minutes, so one agent handles 12 an hour. The offered load is 4.17 erlangs. With 5 agents, each is busy 83.3% of the time.
Erlang C says 62% of callers wait at all. The average wait is 3.7 min, and 62.4% are answered within 3 minutes.
Her goal is 80% within 3 minutes. Solving for servers gives 6 agents, which answer 89.1% in time with an average wait of 0.9 min. A 7th agent would cut that to 0.3 min.
One checkout, then two in one line
A shop gets 8 customers an hour, and its one till serves 10 an hour. The till is busy 80% of the time, yet the average wait is 24 min, with 3.2 people in line. Only 34.5% start within 6 minutes.
Now picture two such shops side by side, each with its own line. Merge them into one line feeding both tills, with 16 customers an hour, and the wait drops to 10.7 min. The staff is the same. The gain comes from no till sitting idle while the other has a line.
A car wash with room for 6 cars
Cars arrive 6 an hour and the bay washes 5 an hour, so it could never keep up without a limit. With room for 6 cars, washing and waiting, the line stays finite. But 23.1% of drivers find it full and leave.
The bay is busy 92.3% of the time. A driver who gets in spends 48.3 min there on average. Room for 10 cars cuts the lost drivers to 19.3%, but stretches that time to 83.1 min.
Reading your result
Average wait in line. This is the time before service starts. For people, this is the number that matters, because once they are served they are content.
Utilization. A high share keeps costs down, and a low one keeps waits down. One server shows how sharply the trade bends near full:
| Busy | In line | Wait |
|---|---|---|
| 50% | 0.5 | 6 min |
| 80% | 3.2 | 24 min |
| 90% | 8.1 | 54 min |
| 95% | 18.1 | 114 min |
Served within t. Call centers set goals like 80% within 20 seconds. The share comes from Erlang C and the spare capacity cμ − λ. No steady state. At 13 arrivals an hour against one server finishing 12, the utilization is 108.3% and the tool gives no average, because the line keeps growing.
Common mistakes
- Mixing time units. If calls come per hour, the service rate must be per hour too. A 5 minute call is 12 an hour, not 5.
- Using the average call length as μ. μ is a rate, the number one server can finish in the time unit, so it is 1 over the average service time.
- Staffing to 100% busy. At full use the line never settles. Real teams also need time for breaks, so plan above the count shown.
- Using one busy hour for a whole day. The models assume a steady arrival rate. Work out each hour on its own when the rate changes through the day.