Erlang C Calculation

grogmi1

New Member
Joined
Sep 17, 2010
Messages
49
I'm hoping someone on here can help me. I have read through forums, watched endless videos and downloaded umpteen Excel spreadsheets to try and achieve a calculation that will work out how many staff I need in my call centre. Is there anyone on here that can help me, Please? I am simply looking for an Excel formula or even an explanation on how to work this figure out. I'd prefer to stay away from writing VBA if I can (it's not my strongest skill) but if it will get the job done then I'm ready and willing.
Thanks
 
I think the underlying assumptions may not quite fit your application. It sounds as if you may have more than one person working on a given item during the 3-day answer period. I also don't think my one question was clear:
What is the best way to describe this operation's working period? It appears that 1 month consists of 20 working days. Does one work day (the time during which work is actually accomplished) consist of 8 h or 24 h?
  • The operation can take 3 days to complete after initially being assigned which historically on average has been 2 days.
I could see that you are considering a "month" to be 20 working days. My question was trying to clarify what is meant by a "working day". Do you have staff working around the clock, 24 hours in a day, or is your operation best described as an 8-hour workday, and then no one is working for the remaining 16 hours of that day? Your answer to this question appears to focus on the number of workdays necessary, on average, to address an inquiry, but that was the focus of my 2nd question...rather than the 1st one.
 
Upvote 0
I think the underlying assumptions may not quite fit your application. It sounds as if you may have more than one person working on a given item during the 3-day answer period. I also don't think my one question was clear:

I could see that you are considering a "month" to be 20 working days. My question was trying to clarify what is meant by a "working day". Do you have staff working around the clock, 24 hours in a day, or is your operation best described as an 8-hour workday, and then no one is working for the remaining 16 hours of that day? Your answer to this question appears to focus on the number of workdays necessary, on average, to address an inquiry, but that was the focus of my 2nd question...rather than the 1st one.
1 work day is composed of an 8hr period and 1 month consists of 20 days. The remaining 16hrs has no one monitoring our queues which at the moment does get factored into the total cycle time.
 
Upvote 0
Thanks for the clarification...that is what I was assuming (1 work day = 8 h, 1 mo = 20 work days). From my understanding, the equations developed for Erlang C are assuming a fairly homogeneous situation where call (inquiry) demand and the "machinery" to handle the demand are consistent. For that reason, in your analysis, I would consider a "day" to be an 8-hour block (out of a 24-h calendar day) during which tangible work is performed. I'm not sure how your system works regarding inputs, but I'll assume that inquiries might be made anytime during a calendar day, and if so, they are queued, with no action taken until the next workday. Then the inquiry rate (in cell B13 on my worksheet) is a somewhat artificial number that distributes inquiries over the 8-hour workday.

In post #18, you mentioned:
...it looks like I would need to further expand the number of FTEs that would normally be applicable...
I'm not sure what you mean, but wanted to point out that you can modify cells C23 (and those to the right) to consider any number of staff. B23 represents the baseline minimum number, but manually change C23 (and those to the right) to anything that might be of interest. I typically change the formula to increment by something other than 1 to identify approximately where other metrics (Target Service Level, Occupancy, Shrinkage) all appear to be met, and then explore the range in that neighborhood at a smaller resolution to identify the estimated optimal number of staff.

If we set up a sheet using this example:
Using May's numbers as a baseline, a count of 22 FTEs on average each closed 28 requests with a cycle time of 11 days. The impacting factor was the wait time for routed requests, where from a hands to keys perspective they would still be individually taking 3 days to complete the work after assigning within <=2 days. The ability to close the 28 requests is what I would like to somehow factor in to the WFM table to give me a true number of FTE's to confirm whether or not staffing should be 22 or another number.
...using these redefined "days" values, converted into units expected by the worksheet
ErlangC_20240220_20240801.xlsx
HIJ
511d, redefine "day" as 8 h then convert to min5280
63days, redefine day as 8 h, convert to s86400
7
82days, redefine day as 8 h, convert to s57600
ErlangC_not_a_swim_fan2 (3)
Cell Formulas
RangeFormula
J5J5=H5*8*60
J6,J8J6=H6*8*60*60

...the model suggests that 16 staff would be needed to handle the 28 requests while satisfying the three metrics (target service level, max occupancy, shrinkage). Does this make sense to you?...that you might be able to close out 28 requests over 11 days with fewer staff, and without those staff feeling too overwhelmed, while also having sufficient time to deal with other things?
ErlangC_20240220_20240801.xlsx
ABCDEFG
31. Inputs:
4Number of inquiries28
5In a period of minutes (min)5280
6Average Handling Time (AHT) (s)86400
7Required Service Level95%
8Target Answer Time (s)57600
9Maximum Occupancy85%
10Shrinkage30.0%
11
122. Determine number of calls per hour
13n_avg (# calls/h)0.318
14
153. Determine the Traffic Intensity (A)(hour basis)
16# of calls in hour basis0.318
17Avg time per call (min)1440
18Call-minutes per hour458.18
19Traffic intensity (A) , call-hours per hour (Erlang unitless)7.636
20
214. Estimate the raw number of agents required (N)
22One agent max capability is 1 call-hour per hour actual time
23Initial guess for N agents required8910111213
24X term6309.51606.1786.2421.9225.8116.9
25Y term1046.01332.81576.11761.91890.91973.0
26Probability a call has to wait, Pw85.78%54.65%33.28%19.32%10.67%5.59%
27
285. Calculate the Service Level (list item #13 in ref)
29Service Level32.69%77.98%93.12%97.95%99.42%99.84%
30Target Service Level95%95%95%95%95%95%
31Target Service Level Met?FALSEFALSEFALSETRUETRUETRUE
32
336. Average Speed of Answer (ASA) (list item #15 in ref)
34Avg Speed of Answer (ASA) (seconds)203813346261216549622112901
35
367. Percentage of Calls Answered Immediately (list item #16 in ref)
37Immediate Answer14.22%45.35%66.72%80.68%89.33%94.41%
38
398. Check Maximum Occupancy (list item #17 in ref)
40Occupancy95.45%84.85%76.36%69.42%63.64%58.74%
41Max Occupancy85%85%85%85%85%85%
42Max Occupancy constraint met?FALSETRUETRUETRUETRUETRUE
43
449. Factor in Shrinkage (list item #18 in ref)
45Number agents needed considering shrinkage of 30%121315161819
46
4710. Summary
48Number agents needed (minimum of #9 where #5 and #8 are satisfied)16
49Service Level97.9%
50Probability a call has to wait19.3%
51Average Speed of Answer (seconds)4962.2
52% of calls Answered Immediately80.7%
ErlangC_not_a_swim_fan2 (3)
Cell Formulas
RangeFormula
B13B13=B4/(B5/60)
B16B16=B13
B17B17=B6/60
B18B18=B16*B17
B19B19=B18/60
B23B23=ROUNDUP(B19,0)
C23:G23C23=B23+1
B24:G24B24=B$23/FACT(B$23)/(B$23-$B$19) * $B$19^B$23
B25:G25B25=IF(B$23<2, 1, 1 + SUMPRODUCT($B$19^ROW($A$1:INDEX($A:$A, B$23-1)) / FACT(ROW($A$1:INDEX($A:$A, B$23-1)))))
B26:G26B26=B24/(B24+B25)
B29:G29B29=1-B26*EXP(-(B23-$B$19)*($B$8/$B$6))
B30:G30B30=$B$7
B31:G31B31=B29>=B30
B34:G34B34=B26*$B$6/(B23-$B$19)
B37:G37B37=1-B26
B40:G40B40=$B$19/B23
B41:G41B41=$B$9
B42:G42B42=B40<B41
A45A45="Number agents needed considering shrinkage of "& TEXT($B$10,"0%")
B45:G45B45=ROUNDUP(B23/(1-$B$10),0)
B48B48=AGGREGATE(15,6,(B45:G45)/((B31:G31)*(B42:G42)),1)
B49B49=INDEX($B$29:$G$29,MATCH(B$48,$B$45:$G$45,0))
B50B50=INDEX($B$26:$G$26,MATCH(B$48,$B$45:$G$45,0))
B51B51=INDEX($B$34:$G$34,MATCH(B$48,$B$45:$G$45,0))
B52B52=INDEX($B$37:$G$37,MATCH(B$48,$B$45:$G$45,0))
Press CTRL+SHIFT+ENTER to enter array formulas.
Cells with Conditional Formatting
CellConditionCell FormatStop If True
B31:G31Cell Value=TRUEtextNO
B42:G42Cell Value=TRUEtextNO
B45:G45Expression=AND(B31,B42)textNO

I have another draft version of this worksheet that might be useful for cases where the staff size is so large that the factorial function (FACT) in Excel fails because the value exceeds Excel's limit. That version revisited Erlang's original development to rewrite expressions in terms of other functions available in Excel to avoid the limitations with FACT. I never quite finalized that effort, but could if errors are generated in the row 24/25 computations.
 
Upvote 0
Thanks for the clarification...that is what I was assuming (1 work day = 8 h, 1 mo = 20 work days). From my understanding, the equations developed for Erlang C are assuming a fairly homogeneous situation where call (inquiry) demand and the "machinery" to handle the demand are consistent. For that reason, in your analysis, I would consider a "day" to be an 8-hour block (out of a 24-h calendar day) during which tangible work is performed. I'm not sure how your system works regarding inputs, but I'll assume that inquiries might be made anytime during a calendar day, and if so, they are queued, with no action taken until the next workday. Then the inquiry rate (in cell B13 on my worksheet) is a somewhat artificial number that distributes inquiries over the 8-hour workday.

In post #18, you mentioned:

I'm not sure what you mean, but wanted to point out that you can modify cells C23 (and those to the right) to consider any number of staff. B23 represents the baseline minimum number, but manually change C23 (and those to the right) to anything that might be of interest. I typically change the formula to increment by something other than 1 to identify approximately where other metrics (Target Service Level, Occupancy, Shrinkage) all appear to be met, and then explore the range in that neighborhood at a smaller resolution to identify the estimated optimal number of staff.

If we set up a sheet using this example:

...using these redefined "days" values, converted into units expected by the worksheet
ErlangC_20240220_20240801.xlsx
HIJ
511d, redefine "day" as 8 h then convert to min5280
63days, redefine day as 8 h, convert to s86400
7
82days, redefine day as 8 h, convert to s57600
ErlangC_not_a_swim_fan2 (3)
Cell Formulas
RangeFormula
J5J5=H5*8*60
J6,J8J6=H6*8*60*60

...the model suggests that 16 staff would be needed to handle the 28 requests while satisfying the three metrics (target service level, max occupancy, shrinkage). Does this make sense to you?...that you might be able to close out 28 requests over 11 days with fewer staff, and without those staff feeling too overwhelmed, while also having sufficient time to deal with other things?
ErlangC_20240220_20240801.xlsx
ABCDEFG
31. Inputs:
4Number of inquiries28
5In a period of minutes (min)5280
6Average Handling Time (AHT) (s)86400
7Required Service Level95%
8Target Answer Time (s)57600
9Maximum Occupancy85%
10Shrinkage30.0%
11
122. Determine number of calls per hour
13n_avg (# calls/h)0.318
14
153. Determine the Traffic Intensity (A)(hour basis)
16# of calls in hour basis0.318
17Avg time per call (min)1440
18Call-minutes per hour458.18
19Traffic intensity (A) , call-hours per hour (Erlang unitless)7.636
20
214. Estimate the raw number of agents required (N)
22One agent max capability is 1 call-hour per hour actual time
23Initial guess for N agents required8910111213
24X term6309.51606.1786.2421.9225.8116.9
25Y term1046.01332.81576.11761.91890.91973.0
26Probability a call has to wait, Pw85.78%54.65%33.28%19.32%10.67%5.59%
27
285. Calculate the Service Level (list item #13 in ref)
29Service Level32.69%77.98%93.12%97.95%99.42%99.84%
30Target Service Level95%95%95%95%95%95%
31Target Service Level Met?FALSEFALSEFALSETRUETRUETRUE
32
336. Average Speed of Answer (ASA) (list item #15 in ref)
34Avg Speed of Answer (ASA) (seconds)203813346261216549622112901
35
367. Percentage of Calls Answered Immediately (list item #16 in ref)
37Immediate Answer14.22%45.35%66.72%80.68%89.33%94.41%
38
398. Check Maximum Occupancy (list item #17 in ref)
40Occupancy95.45%84.85%76.36%69.42%63.64%58.74%
41Max Occupancy85%85%85%85%85%85%
42Max Occupancy constraint met?FALSETRUETRUETRUETRUETRUE
43
449. Factor in Shrinkage (list item #18 in ref)
45Number agents needed considering shrinkage of 30%121315161819
46
4710. Summary
48Number agents needed (minimum of #9 where #5 and #8 are satisfied)16
49Service Level97.9%
50Probability a call has to wait19.3%
51Average Speed of Answer (seconds)4962.2
52% of calls Answered Immediately80.7%
ErlangC_not_a_swim_fan2 (3)
Cell Formulas
RangeFormula
B13B13=B4/(B5/60)
B16B16=B13
B17B17=B6/60
B18B18=B16*B17
B19B19=B18/60
B23B23=ROUNDUP(B19,0)
C23:G23C23=B23+1
B24:G24B24=B$23/FACT(B$23)/(B$23-$B$19) * $B$19^B$23
B25:G25B25=IF(B$23<2, 1, 1 + SUMPRODUCT($B$19^ROW($A$1:INDEX($A:$A, B$23-1)) / FACT(ROW($A$1:INDEX($A:$A, B$23-1)))))
B26:G26B26=B24/(B24+B25)
B29:G29B29=1-B26*EXP(-(B23-$B$19)*($B$8/$B$6))
B30:G30B30=$B$7
B31:G31B31=B29>=B30
B34:G34B34=B26*$B$6/(B23-$B$19)
B37:G37B37=1-B26
B40:G40B40=$B$19/B23
B41:G41B41=$B$9
B42:G42B42=B40<B41
A45A45="Number agents needed considering shrinkage of "& TEXT($B$10,"0%")
B45:G45B45=ROUNDUP(B23/(1-$B$10),0)
B48B48=AGGREGATE(15,6,(B45:G45)/((B31:G31)*(B42:G42)),1)
B49B49=INDEX($B$29:$G$29,MATCH(B$48,$B$45:$G$45,0))
B50B50=INDEX($B$26:$G$26,MATCH(B$48,$B$45:$G$45,0))
B51B51=INDEX($B$34:$G$34,MATCH(B$48,$B$45:$G$45,0))
B52B52=INDEX($B$37:$G$37,MATCH(B$48,$B$45:$G$45,0))
Press CTRL+SHIFT+ENTER to enter array formulas.
Cells with Conditional Formatting
CellConditionCell FormatStop If True
B31:G31Cell Value=TRUEtextNO
B42:G42Cell Value=TRUEtextNO
B45:G45Expression=AND(B31,B42)textNO

I have another draft version of this worksheet that might be useful for cases where the staff size is so large that the factorial function (FACT) in Excel fails because the value exceeds Excel's limit. That version revisited Erlang's original development to rewrite expressions in terms of other functions available in Excel to avoid the limitations with FACT. I never quite finalized that effort, but could if errors are generated in the row 24/25 computations.
Hello! This tool has been amazing and have been following it along for many of my smaller groups I support. I have run into an issue with the last part of your message here. The biggest contact center I support is upwards of 350k calls per month and the helper area is not cutting it (I return values on the 'Y term' line but X term, and many other corresponding lines (outside the Occupancy calcs) are #NUM!

Was there any update on the draft for larger staff/workloads?
 
Upvote 0
Some time ago I looked into Erlang's original derivation of the Erlang C formula. He modeled the distribution of times between call arrivals with a Poisson distribution. Revisiting his Erlang C formula, but expressing it in terms of the Poisson distribution, and then recognizing that the factorial terms can be described by gamma functions, we can derive an expression for use in Excel that allows the computation in log-space, and in doing so, avoid some limitations with Excel floating point precision and computing large factorials. As before, the input block is shaded blue (B4:B10). The only value in the next block of true interest for the computations is that for Traffic Intensity (A)...which is also computed internally in the main formula below, but I left it and a few other computed quantities in this version.

The main formula takes advantage of Excel 365 features, by consolidating a series of computations for: Traffic Intensity (ti), an array of the number of agents to consider (n), the log-space computation for a quantity "a" used to compute the probability (p) that a call has to wait, the probability that a call is answered immediately (pai), the average speed of answer (asa), the service level (sl), the occupancy (occ), and the number of agents after considering shrinkage (nshrinkage). All of these results are stacked together and spilled in a single output. Conditional formatting is used in the output table to highlight (green/red) where the Service Level and Occupancy requirements are not met/not met. For the user, examine the Traffic Intensity (A) and then adjust the parameters in the "n" part of the formula where the SEQUENCE function is used:
Excel Formula:
SEQUENCE(,10,ROUNDUP(ti,0)+1,2)
so that a sufficient range of n values is considered and the transitions from not met-to-met can be seen for Service Level and Occupancy. In the SEQUENCE function, 10 indicates the number of values that will be generated, and those values begin at ROUNDUP(ti,0)+1...meaning the Traffic Intensity (A) value rounded up to the next higher value...and then I've added 1 to that. You may not need to add 1 (change to 0), or you may want to start even higher. The last parameter (2 in this case) represents the step size...typically this would be 1, but you may find it necessary or convenient to explore more space by taking larger steps before settling in on a smaller range. In this example, you'll see we need 85 agents to satisfy Service Level, but 97 to satisfy Occupancy. We might want to the explore 96 as well to determine if Occupancy is met there...and then the final estimated number of agents would be obtained from the bottom line where shrinkage is accounted for.
MrExcel_20250214_ErlangC.xlsx
ABCDEFGHIJK
1Tool for Estimating Staffing for Call Center using Erlang C Method
2
3Inputs:
4Number of calls350000
5In a period of minutes (min)43200
6Average Handling Time (AHT) (s)600
7Required Service Level95%
8Target Answer Time (s)600
9Maximum Occupancy85%
10Shrinkage30%
11
12Determine the Traffic Intensity (A)(hour basis)
13n_avg (# calls/h)486.1
14Avg time per call (min)10
15Call-minutes per hour4861.1
16Traffic intensity (A) , call-hours per hour (Erlang unitless)81.0
17
18Estimate the raw number of agents required (N)One agent max capability is 1 call-hour per hour actual time
19Initial guess for n agents required (set with SEQUENCE)838587899193959799101
20Probability a call has to wait, Pw75.76%56.08%40.61%28.72%19.81%13.31%8.70%5.53%3.41%2.04%
21Probability a call is answered immediately24.24%43.92%59.39%71.28%80.19%86.69%91.30%94.47%96.59%97.96%
22Avg Speed of Answer (ASA) (seconds)2298541221274211
23Service Level89.56%98.95%99.90%99.99%100.00%100.00%100.00%100.00%100.00%100.00%
24Occupancy97.61%95.32%93.12%91.03%89.03%87.12%85.28%83.52%81.84%80.22%
25Number agents needed considering shrinkage119122125128130133136139142145
ErlangC_kr
Cell Formulas
RangeFormula
B13B13=B4/(B5/60)
B14B14=B6/60
B15B15=B4*B6/B5
B16B16=B4*B6/B5/60
B19:K25B19=LET(ti, B4*B6/B5/60, n, SEQUENCE(,10,ROUNDUP(ti,0)+1,2), a, (1 - ti/n)*EXP(GAMMALN(n+1)-n*LN(ti)+ti)*POISSON(n-1,ti,TRUE), p, 1/(1+a), pai, 1-p, asa, p*B6/(n-ti), sl, 1-p*EXP((ti-n)*(B8/B6)), occ, ti/n, nshrinkage, ROUNDUP(n/(1-B10),0), VSTACK(n,p,pai,asa,sl,occ,nshrinkage))
Dynamic array formulas.
Cells with Conditional Formatting
CellConditionCell FormatStop If True
B23:K23Expression=B23<$B$7textNO
B23:K23Expression=B23>=$B$7textNO
B24:K24Expression=B24>$B$9textNO
B24:K24Expression=B24<=$B$9textNO

 
Upvote 0

Forum statistics

Threads
1,226,904
Messages
6,193,587
Members
453,809
Latest member
KMorales

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top