ERLANG C call-centre staffing maths
Telephone-traffic engineering · A.K. Erlang, 1917

How many agents do you actually need?

The Erlang C formula turns offered call load and a service-level target into a staffing number. Here it is worked out live — and written out as a clean, self-contained reference implementation in thirty languages. Free to copy, verified against known values.

Offered load

Service-level target

offered load10.0Erlangs

Agents required

14full-time
equivalents
on the phones
to answer 80% of calls within 20s
AgentsAnswer<tASAOccupancyP(wait)

The maths

Six functions. Everything else is arithmetic.

Step 1

Offered load

u = calls × AHT / period

Traffic intensity in Erlangs — the number of concurrent conversations in progress on average. 100 calls in 30 min at 180 s each = 10 Erlangs.

Step 2

Probability of waiting

C = Pₓ / (Pₓ + (1−ρ)·ΣPₖ)

The Erlang C term: the chance an arriving call finds every agent busy and joins the queue. Built from Poisson terms; ρ=u/m is occupancy.

Step 3

Service level

SL = 1 − C·e^(−(m−u)·t/AHT)

Fraction of calls answered within t seconds — the classic “80/20” grade of service. Drops out of the wait probability directly.

Step 4

Average speed of answer

ASA = C·AHT / (m·(1−ρ))

Mean seconds a caller waits before an agent picks up, across all calls (the ones answered instantly count as zero).

Step 5

Occupancy

ρ = u / m

How hard the agents work. Above ~90% the queue and burnout both explode — the reason you can’t staff to the raw load.

Step 6

Agents required

m ↑ from ⌊u⌋+1 until SL & ASA met

Increment agents until the service-level and answer-time goals are both satisfied. The number the calculator above returns.

Numerically stable by construction. Naive factorials overflow past ~170 agents. Every implementation here computes the Poisson terms in log-space with a bundled Lanczos lgamma (matched to the platform’s own lgamma to ~1×10⁻¹³), so it stays exact at any centre size — and depends on nothing but the standard maths library.


The code

Same five functions, thirty languages. Self-contained — paste and run.

erlang_c.js