Category

Queueing Theory Calculator — M/M/1 & M/M/s Waiting Line Models

Model a waiting line with queueing theory. Enter the arrival rate (λ), service rate (μ), and number of servers to get server utilization, the probability of waiting (Erlang C), and the average number and time in the queue and system.

0 calculations

Calculation Parameters

λ and μ are expressed per this unit; waiting times are shown in it too.

Enter Parameters

Fill in the form on the left and click "Calculate"

In the last century, mathematicians developed a framework that describes the dynamics of a waiting line: learn the fundamentals of queueing theory with our queueing theory calculator.

Since humans started getting along in that thing we call society, they also started waiting. Waiting for their turn to talk, eat, pay taxes, you name it. With the growth of the population and the increasing complexity of our daily lives, we started waiting even more. It's not surprising that someone developed an interest in analyzing and modeling the behavior of queues.

What Is Queueing Theory?

You don't have to spend weeks on a thick book to understand what queueing theory is — though its mathematical description may get pretty long. We are talking of the same process of entering a waiting line — and waiting — to get access to a service. You do this every time you get groceries or go to the bank.

Queueing theory was developed by Agner Krarup Erlang in the early 20th century while he was working on the analysis of telephone networks. The theory successfully developed in the following years, thanks to the pervasive nature of queues and the helpfulness of the results of the queueing models.

The queueing theory analyzes the behavior of a waiting line to make predictions about its future evolution. Some examples of what we can calculate with a queueing model are:

  • The waiting and service time;
  • The total number of customers in the queue; and
  • The utilization of the server.

Queueing theory has deep roots in statistics and probability. The arrival and servicing of customers are, fundamentally, stochastic processes. However, when analyzing such processes over long times, their implicit randomness somehow vanishes: we then talk of the steady state of the process.

What Is a Queue?

A queue is a line of "customers" waiting for a "service". Customers don't have to be people — they can be packets on a network, planes waiting to land, or jobs waiting for a CPU. A queue is described by a handful of quantities:

  • Arrival rate (λ) — the average number of customers arriving per unit of time.
  • Service rate (μ) — the average number of customers a single server can serve per unit of time.
  • Number of servers (s) — how many parallel service channels (checkouts, tellers, CPUs) are open.

Queueing Discipline: Who's Going First?

The queueing discipline is the rule that decides the order in which waiting customers are served. The most common one is FIFO (First In, First Out) — the classic "first come, first served" line. Other disciplines include LIFO (last in, first out, like a stack of plates) and priority queues (VIP customers first). Our calculator assumes the standard FIFO discipline.

The Kendall Notation: Classifying Queues

Queues are classified with Kendall's notation, written as A/B/c:

  • A — the arrival process (M = Markovian / Poisson arrivals);
  • B — the service-time distribution (M = Markovian / exponential service times);
  • c — the number of servers.

So an M/M/1 queue has Poisson arrivals, exponential service, and a single server, while M/M/s generalizes it to s servers.

The M/M/1 Queue: Your First Queueing Model

The M/M/1 queue is the cornerstone of queueing theory: one server, Poisson arrivals at rate λ, and exponential service at rate μ. Its steady-state results are wonderfully simple. The utilization is:

ρ = λ / μ

and the key steady-state metrics are:

  • Average number in the system: L = ρ / (1 − ρ)
  • Average number waiting in the queue: Lq = ρ² / (1 − ρ)
  • Average time in the system: W = 1 / (μ − λ)
  • Average waiting time in the queue: Wq = ρ / (μ − λ)

For the queue to be stable (not grow forever), we need ρ < 1 — i.e., customers must arrive more slowly than they can be served.

A New Checkout Opens: the M/M/s Queue

When you add servers, you move to the M/M/s model. Now the utilization per server is:

ρ = λ / (s · μ)

The probability that an arriving customer has to wait is given by the famous Erlang C formula, built from the offered load a = λ / μ. From there we derive Lq, L, Wq and W. Two elegant identities tie everything together — Little's Law:

L = λ · W   and   Lq = λ · Wq

Our calculator implements the full M/M/s model (which reduces to M/M/1 when s = 1), including the Erlang C probability of waiting, the utilization, and the average numbers and times in the queue and system.

How to Use Our Queueing Theory Calculator

  1. Enter the arrival rate λ — how many customers arrive per unit of time.
  2. Enter the service rate μ — how many customers one server can handle per unit of time.
  3. Enter the number of servers s.
  4. Pick the time unit (per second, minute, hour, or day) so waiting times are shown in the right units.
  5. Read off the utilization ρ, the probability of waiting, and the average numbers (L, Lq) and times (W, Wq).

Example: a small shop sees λ = 8 customers/hour, each cashier serves μ = 5 customers/hour, and there are s = 2 cashiers. The utilization is ρ = 8 / (2 · 5) = 0.8 (80%), the queue is stable, and the calculator returns the expected waiting time and the average number of customers in line.

FAQ

What does queueing theory calculate?

It predicts the steady-state behavior of a waiting line: server utilization, the probability an arrival must wait, the average number of customers in the queue and in the system, and the average waiting and total times.

When is a queue stable?

A queue is stable when the utilization ρ = λ / (s·μ) is less than 1. If ρ ≥ 1, customers arrive at least as fast as they can be served and the line grows without bound.

What is Little's Law?

Little's Law states that the average number of customers in a system equals the arrival rate times the average time spent in the system: L = λ · W. It holds for almost any queueing system in steady state.

Where is queueing theory used?

Everywhere queues appear: call centers, supermarket checkouts, airport runways, hospital emergency rooms, computer networks, manufacturing lines, and traffic engineering.

Calculation History

Loading...