← Projects
11 Jul 2026 · Erlang C, in every language

Staffing a call centre in Excel

First in a short series: the same small staffing formula — Erlang C — written out one language at a time. We start where most of the world actually does this: in a spreadsheet.

Here is the question every contact centre quietly runs on. Say 100 calls arrive in half an hour, each takes about three minutes to handle, and you’d like 80% of them answered within 20 seconds. How many people do you need on the phones?

Guess too low and the queue — and your customers’ patience — blows out. Guess too high and you’re paying people to watch a silent phone. The formula that answers it properly is Erlang C, worked out by a Danish engineer in 1917 and still running underneath every workforce-management tool sold today. You don’t need one of those tools. You need Excel.

The whole thing, in formulas

No macros, no add-in. Modern Excel’s GAMMALN keeps it numerically stable even for a large centre (a naïve version falls over past about 170 agents). Name a few input cells first — calls, mins, aht (average handle time, in seconds), sl_goal, tsecs — then:

Offered load, in Erlangs:
    u  =  calls * aht / (mins * 60)                 ->  10

Put trial agent counts in A2 and fill down (11, 12, 13, ...):

  Occupancy         B2:  = $u / A2

  P(wait), Erlang C  C2:
      = LET( p, EXP(A2*LN($u) - GAMMALN(A2+1) - $u),
             s, SUMPRODUCT( EXP( SEQUENCE(A2,1,0)*LN($u)
                                 - GAMMALN(SEQUENCE(A2,1,0)+1) - $u ) ),
             p / ( p + (1-B2) * s ) )

  Service level     D2:  = IF(A2<=$u, 0, 1 - C2*EXP(-(A2-$u)*$tsecs/$aht))

  ASA, seconds      E2:  = IF(A2<=$u, "inf", C2*$aht/(A2*(1-B2)))

Agents required (with A2:A50 filled 11, 12, 13, ...):
    = MIN( IF( (D2:D50 >= $sl_goal) * (E2:E50 <= $tsecs), A2:A50 ) )   ->  14

How to actually use it

1. Drop your numbers into the named cells (calls, mins, aht, sl_goal, tsecs). 2. In column A, list candidate team sizes — 11, 12, 13, and upward. 3. Fill the four formulas across B–E for each row. Each row now tells you, if you rostered that many agents, the occupancy, the chance a call waits, the service level you’d hit, and the average speed of answer. 4. Read down column D to the first row where the service level clears your goal. That’s your answer. For the numbers above it’s 14 agents — thirteen isn’t enough, fifteen is money left on the table.

That’s the whole job: a table you scroll down until the service level goes green.

The fine print

The LET + SEQUENCE version needs Excel 365, which spills the result down the column automatically. On an older Excel, build the k = 0…agents−1 Poisson terms in a helper column and SUM them for the C2 cell instead — same maths, a few more cells.

The why — where these formulas come from, why the log-space trick matters, and the same five functions in 29 other languages — lives in the project itself: