Queue Wait Time (Little's Law)
Calculate queue wait times and required capacity using queueing theory. Enter values for instant results with step-by-step formulas.
Formula
L = λW; ρ = λ/(cμ); Wait explodes as ρ → 1
## Queueing Theory Formulas **Little's Law**: L = λ × W Where: L = average number in system, λ = arrival rate, W = average time in system **Utilization**: ρ = λ / (c × μ) Where: c = number of servers, μ = service rate per server **Stability Condition**: ρ < 1 (arrival rate must be less than service capacity) **M/M/1 Queue (single server)**: Lq = ρ² / (1 - ρ) Wq = ρ / (μ - λ) **M/M/c Queue (c servers)**: More complex formulas involving Erlang C ## Why Utilization Matters So Much The non-linear relationship between utilization and wait times is queueing theory's key insight. At low utilization (say 50%), most arrivals find idle servers—minimal wait. As utilization increases, arrivals more often find busy servers and must queue. The math shows wait time scales roughly as 1/(1-ρ). At ρ = 0.5, factor is 2. At ρ = 0.8, factor is 5. At ρ = 0.9, factor is 10. At ρ = 0.95, factor is 20. At ρ = 0.99, factor is 100! This explains why systems feel fine at 70% load but collapse at 90%. It's not 30% more load—it's 5x the wait time. Capacity planning must account for this non-linearity.
Worked Examples
Example 1: Call Center Staffing
Problem:Call center receives 50 calls/hour. Each call takes 5 minutes average. How many agents needed for average wait under 1 minute?
Solution:Parameters: λ = 50 calls/hour μ = 12 calls/hour per agent (60 min / 5 min = 12) Required capacity: λ/μ = 50/12 = 4.17 agents (minimum) With 5 agents: ρ = 50 / (5 × 12) = 0.833 (83.3% utilization) Average wait ≈ 2-3 minutes (too long) With 6 agents: ρ = 50 / (6 × 12) = 0.694 (69.4% utilization) Average wait ≈ 30-45 seconds (acceptable) With 7 agents: ρ = 50 / (7 × 12) = 0.595 (59.5% utilization) Average wait ≈ 15-20 seconds (good) Recommendation: 6-7 agents for <1 min average wait. Note: Peak hours may need more; use 8 for safety.
Result:6-7 agents needed | 60-70% utilization target | 30-45 sec average wait
Example 2: Web Server Capacity
Problem:E-commerce site: 100 requests/second average, server handles 25 req/sec. Current: 5 servers. Analyze capacity.
Solution:Parameters: λ = 100 requests/second μ = 25 requests/second per server c = 5 servers Utilization: ρ = 100 / (5 × 25) = 0.80 (80%) This is at the edge of acceptable! Using M/M/c approximation: Average in queue: ~3-4 requests Average wait: ~30-40ms During traffic spikes (+20%): λ = 120 req/s ρ = 120 / 125 = 0.96 (96%) Wait times explode to 200-500ms+ Recommendation: Add 2 servers (7 total) New ρ = 100 / 175 = 0.57 (57%) Handles 40% traffic surge safely Little's Law verification: L = λW = 100 × 0.04 = 4 requests in system ✓
Result:80% utilization (risky) | Add 2 servers | Target 60% for surge capacity
Example 3: Retail Checkout Lines
Problem:Store: 120 customers/hour at peak. Checkout takes 3 minutes average. 4 registers. What's expected wait?
Solution:Parameters: λ = 120 customers/hour μ = 20 customers/hour per register (60/3 = 20) c = 4 registers Utilization: ρ = 120 / (4 × 20) = 0.75 (75%) M/M/4 queue analysis: Average in queue: ~1.5 customers per line Average in system: ~2.5 customers per line Total in store checkout: ~10 customers Wait time: Queue wait: ~45 seconds average Checkout time: 3 minutes Total time: ~3:45 average Little's Law: L = 120/60 × (3.75/60) = 2 × 0.0625 = ... L = 120 customers/hr × (3.75 min / 60 min/hr) = 7.5 customers Peak periods (150 customers/hour): ρ = 150 / 80 = 0.94 (danger!) Wait explodes to 5+ minutes Open 5th register for peaks.
Result:75% utilization | ~45 sec wait normally | Open 5th register for peaks
Frequently Asked Questions
What is Little's Law?
Little's Law states: L = λW, where L = average number in system, λ = arrival rate, W = average time in system. It's remarkably simple yet universally applicable—works for any stable queue regardless of arrival or service distributions. Named after John Little (1961), though the relationship was known earlier.
What is utilization in queueing theory?
Utilization (ρ) = arrival rate / (servers × service rate). It's the fraction of time servers are busy. ρ = 0.8 means servers are busy 80% of time. Critically, as ρ approaches 1, wait times explode. Queue is stable only when ρ < 1; if ρ ≥ 1, queue grows infinitely.
Why do wait times explode near 100% utilization?
At high utilization, any random variation in arrivals or service creates backlogs that don't clear quickly. At 90% utilization, small surges cause significant queues. At 99%, even tiny variations create massive waits. This non-linear relationship is why capacity planning targets 70-80% utilization, not 95%+.
What's the difference between wait time and system time?
Wait time = time in queue before service starts. System time = wait time + service time. A customer arriving at empty queue has 0 wait but still has service time. System time is what customers experience end-to-end; wait time is the 'wasted' portion.
How does adding servers affect wait time?
Adding servers reduces wait time non-linearly. Going from 1 to 2 servers at 80% total utilization dramatically reduces wait. Additional servers beyond 2-3 have diminishing marginal impact. The key is keeping per-server utilization reasonable (< 80-85%).
What is M/M/c queue notation?
Kendall notation describes queue characteristics: M/M/c = Markovian arrivals (Poisson), Markovian service (exponential), c servers. M/M/1 = single server, M/M/c = c servers. Other notation: G (general distribution), D (deterministic). Most real systems approximate M/M/c.
How do I apply this to call centers?
Call center parameters: λ = calls per hour, μ = calls handled per agent per hour, c = number of agents. Target: Average wait < 30 seconds, typically requires ρ < 80%. Erlang C formula (similar to M/M/c) is industry standard. Factor in: breaks, wrap-up time, skill routing.
How do I apply this to software systems?
Software queues: λ = requests per second, μ = requests processed per second per server, c = number of servers/threads. Target: p99 latency SLA. Key insight: add servers to reduce wait, optimize code to improve μ. Auto-scaling triggers based on queue depth or utilization.
How do I reduce wait times without adding capacity?
Options: 1) Reduce service time (faster processing), 2) Reduce arrival rate (manage demand, pricing), 3) Buffer demand (appointments vs walk-ins), 4) Improve service variability (consistent process), 5) Priority queues (serve urgent first). All affect wait without adding servers.