Play n Tools

Free tools & games for everyone

Free · No sign-up · No accounts

Queue & flow simulator

Work out waiting lines: average wait, queue length and how many servers you need (Erlang C and B), then watch a simulated queue and compare.

Simulation

How to use

  1. Type how many customers (calls, people, jobs) arrive per hour or per minute, the average time to serve one, and the number of servers (tills, agents, machines).
  2. Say how random the arrivals and service times are, and whether customers can wait or are turned away when everyone is busy.
  3. Read the chance of waiting, the average wait, the queue length, and how many servers you need to serve a chosen share within a time, such as 80 % within 1 minute.
  4. Run the simulation to watch a queue build and clear, and compare its averages with the formulas. Change the seed for a different run of luck.

Keyboard and touch

Enter in a boxWork it out
TabMove between boxes, lists and buttons
Arrow keys on the time sliderStep through the simulation

Tips

  • Queues explode near full load: with one server busy 90 % of the time, the average line is nine times longer than at 50 %. Leave some slack.
  • One shared line feeding several servers beats separate lines in front of each: try 4 servers at 50 arrivals per hour against 1 server at 12.5.
  • Making service times more even (less random) cuts waiting a lot, even at the same average.
  • Little's law, L = λ × W, holds for almost any stable queue: the number inside equals the arrival rate times the time each one spends.
  • Real arrivals rise and fall through the day. Work out each busy hour on its own rather than the daily average.

About this calculator

With random (Poisson) arrivals, random (exponential) service and c servers sharing one line, the M/M/c model gives exact answers: the chance to wait is Erlang's C formula, the average wait in line is C ÷ (cμ − λ), and the chance of waiting longer than t is C × e−(cμ − λ)t. Erlang B gives the share turned away when there is no waiting room. For less random times the wait is scaled by (ca² + cs²) ÷ 2, the Allen-Cunneen approximation (c² = 0 for fixed times, 1/3 for fairly even ones).

The simulation draws arrival and service times from a seeded random generator, serves customers first come, first served by the server that comes free first, and averages over all of them; the same seed always gives the same run. Short runs differ from the formulas by chance. Everything runs in your browser.

See you tomorrow!

A fresh daily puzzle every morning, and new tools added every month.

Browse every product