Saved

Press the star next to a tool's name to save it.

All my tools

Queueing Theory Calculator

Use this queueing theory calculator to find the average queue length, waiting time and utilization of a line with one or several servers, from the arrival and service rates.

Restored your last values ·

Enter how many customers arrive per time unit, and how many one server can serve per time unit, using the same unit, such as per hour. For several servers, enter how many there are. Times in the answer are in the same unit as the rates, so rates per hour give times in hours.

Everything is worked out in your browser. Nothing you type is sent anywhere.

–

–

Choose the model, enter the arrival and service rates, then press Calculate.

See full result

A queueing theory calculator predicts how long people wait in a line. Enter the arrival rate, the service rate and the number of servers, and it gives the average number of customers in the line and in the system, the average waiting time, how busy the servers are, and the chance that an arrival has to wait. It uses the M/M/1 model for one server and the M/M/c model for several. It runs in your browser.

How to use the queueing theory calculator

  1. Choose One server or Several servers.
  2. Enter the arrival rate λ and the service rate μ of one server, in the same time unit.
  3. For several servers, enter how many.
  4. Press Calculate.

The one-server queue

The Wikipedia article on the M/M/1 queue writes ρ = λ ÷ μ for the utilization, and it requires ρ to be below 1 for the queue to be stable.[1] The probability of n customers in the system is (1 − ρ)ρⁿ, the mean number in the system is ρ ÷ (1 − ρ), and the mean time in the system is 1 ÷ (μ − λ), by Little's law.[1] The mean waiting time is 1 ÷ (μ − λ) − 1 ÷ μ, which equals ρ ÷ (μ − λ). The mean number waiting in the queue is ρ² ÷ (1 − ρ), found by subtracting the customer being served, which is a short derivation and is not written on the page. For 8 arrivals and 10 services per hour, ρ = 0.8, the system holds 4 customers on average, 3.2 of them waiting, and each customer spends 0.5 hours in the system and waits 0.4 hours.

Several servers

The article on the M/M/c queue calls the probability that an arriving customer finds all servers busy and must wait Erlang's C formula.[2] With c servers and an offered load of a = λ ÷ μ, the utilization of each server is ρ = λ ÷ (cμ), and the system is stable when ρ is below 1. The page gives C = ((cρ)^c ÷ c!)(1 ÷ (1 − ρ)) divided by the sum of (cρ)^k ÷ k! for k from 0 to c − 1 plus that same first term.[2] It gives the mean number in the system as L = (ρ ÷ (1 − ρ))C + cρ, and the standard waiting time in the queue is Wq = C ÷ (cμ − λ). For 15 arrivals per hour, a service rate of 10 per hour per server and 2 servers, the offered load is 1.5, ρ = 0.75, the chance of waiting is 64.3 percent, the average wait is 0.129 hours, which is about 7.7 minutes, and the system holds 3.43 customers on average.

Little's law

The calculator checks its answers with Little's law, which says that the long-term average number of customers in a stationary system, L, equals the effective arrival rate λ times the average time in the system, W.[3] The page says that the result is not affected by the arrival process, the service distribution or the order of service.[3] Its example is a store with customers arriving at 10 per hour who stay an average of half an hour, so L = 10 × 0.5 = 5. In the last row, the calculator shows L = λ × W with your numbers. It holds exactly, in both models.

What the answers mean

Utilization is the share of time that a server is busy. As it gets close to 100 percent, the waits grow very fast, which is the main lesson of queueing theory. With one server, at ρ = 0.5 the average number in the system is 1, at 0.8 it is 4, at 0.9 it is 9 and at 0.95 it is 19. This is why a service that looks fine on average can have long waits at busy times. Adding a server cuts the wait much more than the cost of the server might suggest, since the capacity is shared. For the numbers above, moving from one fast server to two slower servers of half the speed changes the waits, and you can try these changes in the calculator.

Using the calculator for planning

To plan staffing, find the average arrival rate at your busiest hour, and the average service rate of one server. Try different numbers of servers until the waiting time or the chance of waiting is acceptable. Then check the calculation with a margin, since real arrivals are lumpier than random ones. Typical uses are call centers, help desks, checkout lines, clinics and computer systems, where servers can be agents, cashiers, nurses or processors.

A worked comparison

A clinic receives 12 patients per hour. One doctor who sees 15 patients per hour gives ρ = 0.8, so the average number in the system is 4, and a patient spends 1 ÷ (15 − 12) = 0.333 hours, which is 20 minutes, in the clinic. Two doctors who each see 8 patients per hour, a total capacity of 16, give ρ = 0.75, an Erlang C of about 0.64 chance of waiting and an average wait in the queue of about 0.16 hours, roughly 10 minutes. Enter both cases to compare them. The comparison shows that the arrangement matters as well as the total capacity.

Common mistakes

  • Mixing time units. Use the same unit for both rates.
  • Entering the total service rate. Enter the rate of one server and the number of servers separately.
  • Forgetting stability. The arrival rate must be below cμ.
  • Reading W as the waiting time. W includes the service time. The waiting time is Wq.

What next

Use this often? Add Queueing The to your Home screen.

Frequently asked questions

What is a queueing theory calculator?

A tool that predicts the average number of customers waiting, how long they wait and how busy the servers are, from the arrival and service rates.

What is the M/M/1 queue?

A queue with random arrivals, random service times and one server. Its utilization is ρ = λ ÷ μ and it is stable only if ρ is below 1.

What is Erlang C?

The probability that an arriving customer finds all servers busy and has to wait, in a queue with c servers.

What does Little's law say?

The average number in a stable system equals the arrival rate times the average time in the system: L = λW.

Why does the wait grow so fast near full utilization?

Because there is no spare capacity to catch up. With one server, the average system size is 4 at 80 percent, 9 at 90 percent and 19 at 95 percent.

What went wrong?

We only receive the reason you pick, never what you typed into the tool.

Thanks for your feedback.

More Math Tools