Queueing Theory Calculator

Analyze queueing systems with M/M/1, M/M/c, and M/M/1/K models. Calculate utilization, average queue length, wait time, system time, probability of empty system, and more. Includes preset...

About the Queueing Theory Calculator

Queueing theory is a branch of mathematics that studies waiting lines and the processes surrounding them. Developed from the pioneering work of Agner Krarup Erlang in the early 1900s while analyzing telephone networks, queueing theory now serves as a foundational tool in operations research, computer science, telecommunications, and service design.

At its core, queueing theory models how entities (customers, packets, jobs) arrive at a service facility, wait if necessary, get served, and depart. The three models supported here - M/M/1, M/M/c, and M/M/1/K - represent the most widely studied Markovian queues. The first "M" denotes a Poisson (memoryless) arrival process with rate lambda, the second "M" denotes exponentially distributed service times with rate mu, the number refers to servers, and K (when present) caps the system capacity.

The M/M/1 queue is the simplest single-server, infinite-capacity model. M/M/c extends this to c parallel servers sharing one queue - the basis for Erlang-C staffing formulas used in call centers worldwide. M/M/1/K introduces a finite system capacity K, meaning arrivals that find the system full are lost - critical for modeling buffers in networking and manufacturing.

Key metrics include utilization (rho = lambda/cmu), average number in queue (Lq), average number in system (L), average wait in queue (Wq), and average time in system (W). Little's Law (L = lambda W) ties these together elegantly. This calculator lets you explore all these metrics with interactive presets and visual gauges so you can design and optimize real-world systems.

Why Use This Queueing Theory Calculator?

Queueing formulas involve Erlang C calculations, factorial sums, geometric series, and exponential probabilities that are error-prone by hand. One typo in P0 cascades through L, Lq, W, and Wq. This calculator handles all three model variants instantly, showing utilization as both a percentage and color-coded gauge, plus the full state probability distribution. Real-world workflows include call center staffing (M/M/c), network buffer sizing (M/M/1/K), hospital capacity planning, and checkout line optimization.

How to Use This Calculator

  1. Choose a queue model: M/M/1 for single-server systems, M/M/c for multiple parallel servers, or M/M/1/K for finite-capacity systems.
  2. Enter the arrival rate (lambda) - the average number of entities arriving per unit time.
  3. Enter the service rate (mu) - the average number of entities each server can process per unit time.
  4. For M/M/c, specify the number of parallel servers (c); for M/M/1/K, set the system capacity (K).
  5. Click a preset to instantly load a realistic scenario (coffee shop, call center, hospital ER, etc.).
  6. Review the utilization gauge and output cards: rho, L, Lq, W, Wq, and P0 show how many customers are waiting and how long they wait.
  7. Toggle the state probability table to see P(n) for each queue size, answering questions like "what is the probability of more than 5 in line?"
  8. Adjust lambda, mu, or server count to explore trade-offs between service speed and capacity.

Formula

M/M/1: rho = lambda/mu, L = rho/(1-rho), Lq = rho^2/(1-rho), W = 1/(mu-lambda), Wq = rho/(mu-lambda). M/M/c: rho = lambda/(c*mu), P0 computed via summation, Lq = P0*(lambda/mu)^c*rho / (c!*(1-rho)^2). M/M/1/K: rho = lambda/mu, P0 = (1-rho)/(1-rho^(K+1)), L = rho/(1-rho) - (K+1)rho^(K+1)/(1-rho^(K+1)).

Example Calculation

Result: rho = 0.80, L = 4.0, W = 0.20 hours (12 min)

Coffee shop example: lambda = 20 customers/hour, mu = 25 services/hour in M/M/1 (single barista). Utilization rho = 20/25 = 0.80 (80% busy). Average L = 0.80/0.20 = 4 customers in shop, average wait in queue Wq = 0.80/(25-20) = 0.16 hours = 9.6 minutes, total time in system W = 1/(25-20) = 0.2 hours = 12 minutes. If this wait exceeds customer tolerance, add another server (switch to M/M/2) or improve service speed.

Tips & Best Practices

M/M/1 - The Simplest Queue

The M/M/1 model assumes Poisson arrivals at rate lambda, exponential service at rate mu, and a single server with infinite capacity. The utilization rho = lambda/mu must be below 1 for the queue to be stable. Key results follow directly: L = rho/(1-rho) customers in the system, Lq = rho^2/(1-rho) in the queue, W = 1/(mu-lambda) total sojourn time, and Wq = rho/(mu-lambda) waiting time. As rho approaches 1, all metrics grow rapidly - a practical warning for capacity planning.

M/M/c and Erlang C

Adding parallel servers (c > 1) dramatically reduces wait times even when total utilization is similar. The Erlang C formula computes the probability that an arriving customer must wait. Call centers use this daily to determine staffing levels: given a target service level (for example, 80% of calls answered within 20 seconds), find the minimum c that satisfies the constraint.

M/M/1/K - Finite Capacity

When the system can hold at most K entities, arrivals that find the system full are lost (or balked). This model applies to network router buffers, parking lots, and hospital beds. The key addition is the blocking probability P(K), which represents lost business or dropped packets. Unlike M/M/1, the M/M/1/K queue is stable for any rho because finite capacity prevents unbounded growth, but it trades stability for loss.

Frequently Asked Questions

What does M/M/1 stand for?

M/M/1 means Markovian (Poisson) arrivals, Markovian (exponential) service times, and 1 server with infinite capacity. The Kendall notation generalizes to A/S/c/K/N/D.

When should I use M/M/c instead of M/M/1?

Use M/M/c when you have multiple parallel servers sharing a single queue - for example, a call center with several agents, or a bank with multiple tellers. Use this as a practical reminder before finalizing the result.

What is utilization (rho) and why must it be less than 1?

Utilization rho = lambda/(c*mu) represents the fraction of time servers are busy. For infinite-capacity queues, rho >= 1 means the queue grows without bound and the system is unstable.

What is Little's Law?

Little's Law states L = lambda*W - the average number of customers in a system equals the arrival rate times the average time each customer spends in the system. It applies to any stable queue.

How does M/M/1/K handle overflow?

In M/M/1/K, the system holds at most K entities (waiting plus being served). Arrivals that find the system full are lost. This models finite buffers in routers, parking lots, or hospital beds.

Can I use this for network packet queues?

Yes. Network routers are often modeled as M/M/1/K queues where K is the buffer size. The calculator gives you packet loss probability, average buffer occupancy, and throughput insights.

What assumptions do these models make?

All three models assume Poisson arrivals and exponential service times (memoryless property). Real systems may deviate, but these models provide useful baselines and closed-form results.

Related Pages