Start a project

Tool 141 of 194 · Architecture

Queue & Capacity Calculator

How many workers does a queue need? Enter arrivals and handling time and see the waits for every worker count.

Queue & Capacity Calculator

Workload

By number of workers

WorkersUtilisationJobs that waitAverage waitTime in systemAverage queue lengthStart within target

M/M/c (Erlang C): random arrivals, random service times, one shared queue, first come first served. With other variability the waits are scaled by (Ca² + Cs²) / 2, the Allen-Cunneen approximation, and the share starting within a time assumes waits tail off exponentially (exact for M/M/c). Real systems with timeouts, retries or batches need load testing too.

01

What it does

Works out utilisation, the share of jobs that wait, average waits and queue length for each worker count, and the fewest workers that meet a target.

  • M/M/c queueing with the Erlang C formula, computed with the stable Erlang B recursion
  • Utilisation, chance of waiting, average wait, time in system and queue length
  • The fewest workers for a target: a share of jobs starting within a time, or an average wait
  • Allen-Cunneen adjustment for arrivals and service times that aren't random

02

Private by design

Everything happens in your browser. Nothing you type, paste or upload is sent anywhere, and it keeps working offline once the page has loaded.

03

What you get

A table by worker count, a chart and the workers needed, with a Copy and a Download button on every result.

  • Queueing
  • Capacity planning
  • Erlang C
  • Little's law

Why it matters

Queues behave non-linearly. At 50% utilisation almost nobody waits; at 90% waits explode, and one extra worker can cut them by an order of magnitude. Rules of thumb such as "keep CPU under 70%" miss this, and simple division (arrivals x time / workers) says nothing about waiting.

This calculator uses queueing theory: the M/M/c model and its Erlang C formula, the same maths call centres use to staff phones, applied to job queues, thread pools and API workers. It lists every worker count from the minimum stable one upwards, so you can see where adding capacity stops paying off, and marks the fewest workers that meet your target.

How to use it

  1. Enter how many jobs arrive per second, minute or hour.
  2. Enter the average time to handle one.
  3. Set a target, such as 95% of jobs starting within 500 ms.
  4. Read the table and pick a worker count with headroom.

FAQ

What is Little's law?

The average number of jobs in a system equals the arrival rate times the average time each spends there (L = λW). It holds for almost any stable queue.

What is Erlang C?

A formula for the probability that an arriving job has to wait when c servers share one queue with random arrivals and service times.

Why does the wait shoot up near 100% utilisation?

Random bursts arrive faster than workers can clear them, and with no spare capacity the backlog takes a long time to drain.

What if my jobs take a fixed time?

Set service time variability to 0. Waits roughly halve compared with random service times.

Work with me

Want a site that gets these right?

I build fast, accessible websites and web apps that pass these checks from day one. Tell me about your project and I'll reply personally with honest next steps.

All developer tools · Back to leej.uk