Erlang C Calculator

Erlang C Calculator body { font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; background-color: #f8f9fa; color: #333; line-height: 1.6; margin: 0; padding: 20px; } .erlang-c-calculator-container { max-width: 800px; margin: 40px auto; background-color: #ffffff; border-radius: 8px; box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1); padding: 30px; display: flex; flex-wrap: wrap; gap: 30px; } .calculator-section { flex: 1; min-width: 300px; } h1, h2 { color: #004a99; text-align: center; margin-bottom: 20px; } .input-group { margin-bottom: 20px; padding: 15px; border: 1px solid #e0e0e0; border-radius: 5px; background-color: #fdfdfd; } .input-group label { display: block; margin-bottom: 8px; font-weight: bold; color: #004a99; } .input-group input[type="number"], .input-group input[type="text"] { width: calc(100% – 20px); padding: 10px; border: 1px solid #cccccc; border-radius: 4px; box-sizing: border-box; font-size: 1rem; } button { background-color: #004a99; color: white; padding: 12px 25px; border: none; border-radius: 5px; cursor: pointer; font-size: 1.1rem; transition: background-color 0.3s ease; width: 100%; margin-top: 10px; } button:hover { background-color: #003366; } #results { margin-top: 30px; padding: 25px; border-top: 2px solid #004a99; background-color: #eef7ff; border-radius: 5px; } #results h2 { margin-top: 0; color: #004a99; } .result-item { margin-bottom: 15px; font-size: 1.1rem; } .result-item strong { color: #004a99; display: inline-block; width: 250px; /* Consistent width for labels */ } .result-value { font-weight: bold; color: #28a745; font-size: 1.2rem; } .article-section { margin-top: 40px; background-color: #ffffff; border-radius: 8px; box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1); padding: 30px; } .article-section h2 { text-align: left; margin-bottom: 25px; color: #004a99; } .article-section p, .article-section ul { margin-bottom: 15px; } .article-section li { margin-bottom: 8px; } .article-section code { background-color: #eef7ff; padding: 2px 5px; border-radius: 3px; font-family: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace; } @media (max-width: 768px) { .erlang-c-calculator-container { flex-direction: column; padding: 20px; } .result-item strong { width: auto; display: block; margin-bottom: 5px; } }

Erlang C Calculator

Results

Probability of Delay:
Average Wait Time (seconds):
Average Queue Length:
Service Level (e.g., 80% calls answered in 20s):

Understanding the Erlang C Formula

The Erlang C formula is a mathematical model used in call center management and telecommunications to predict the performance of a queuing system. Specifically, it calculates the probability that an incoming call will have to wait for an available agent, and estimates the average waiting time and queue length, given a certain volume of calls, available agents, and service capacity.

Key Concepts:

  • Traffic Intensity (A): The total demand placed on the system, measured in Erlangs. It's calculated as Calls per unit time * Average Handle Time (in that same unit of time).
  • Average Handle Time (AHT): The total time an agent spends on a call, including talk time, hold time, and after-call work.
  • Service Level: A key performance indicator (KPI) for call centers, often expressed as a percentage of calls answered within a specific time threshold (e.g., 80% of calls answered within 20 seconds).

The Formulas:

The Erlang C formula provides several key metrics:

  • Probability of Delay (P_delay): This is the core of the Erlang C formula. It represents the likelihood that an incoming call will find all agents busy and thus must wait. The formula is complex, involving sums of powers and factorials:
    P_delay = ( (A^N) / N! ) * ( N / (N - A) ) / ( sum( (A^k) / k! ) for k=0 to N-1 + ( (A^N) / N! ) * ( N / (N - A) ) ) where:
    • A is the traffic intensity (in Erlangs).
    • N is the number of agents (servers).
    • k! is the factorial of k.
  • Average Wait Time (W_q): The average time a call spends in the queue before being answered.
    W_q = P_delay * (1 / (N - A)) * AHT (Note: AHT must be in the same time units as the wait time).
  • Average Queue Length (L_q): The average number of calls waiting in the queue.
    L_q = P_delay * A / (N - A)
  • Service Level (SL): Calculating a specific service level (e.g., % calls answered within T seconds) requires further steps, often involving approximations or iterative methods based on the primary Erlang C outputs. A common approximation for the probability of a call having to wait longer than T seconds is:
    P(Wait > T) ≈ P_delay * exp( -(N - A) * T / AHT )

How to Use the Calculator:

  1. Average Calls per Interval: Enter the typical number of calls received during a specific time period (e.g., 30 minutes).
  2. Interval Length (minutes): Specify the duration of the interval you used in step 1 (e.g., 30 minutes).
  3. Average Handle Time (seconds): Input the average time (in seconds) an agent spends on each call.
  4. Number of Agents: Enter the number of agents available to handle calls during the specified interval.
  5. Click "Calculate" to see the estimated probability of delay, average wait times, and queue lengths.

Use Cases:

  • Staffing Optimization: Determine the optimal number of agents needed to meet specific service level targets.
  • Capacity Planning: Forecast how changes in call volume or handle times will impact wait times.
  • Performance Analysis: Understand the efficiency of current staffing levels and identify potential bottlenecks.
  • Forecasting: Predict future resource needs based on anticipated call patterns.

By leveraging the Erlang C model, businesses can make data-driven decisions to improve customer satisfaction, reduce operational costs, and enhance overall call center efficiency.

// Function to calculate factorial var factorial = function(n) { if (n < 0) return NaN; if (n === 0 || n === 1) return 1; var result = 1; for (var i = 2; i <= n; i++) { result *= i; } return result; }; // Function to calculate sum for Erlang C denominator var sumFactorials = function(A, N) { var sum = 0; for (var k = 0; k < N; k++) { sum += Math.pow(A, k) / factorial(k); } return sum; }; var calculateErlangC = function() { var avgCalls = parseFloat(document.getElementById("averageCalls").value); var intervalMinutes = parseFloat(document.getElementById("intervalLength").value); var avgHandleTimeSeconds = parseFloat(document.getElementById("averageHandleTime").value); var numAgents = parseInt(document.getElementById("numberOfAgents").value); // Input validation if (isNaN(avgCalls) || isNaN(intervalMinutes) || isNaN(avgHandleTimeSeconds) || isNaN(numAgents) || avgCalls <= 0 || intervalMinutes <= 0 || avgHandleTimeSeconds <= 0 || numAgents = numAgents) { // System is overloaded or exactly at capacity, queue will grow indefinitely probDelay = 1.0; avgWaitTime = Infinity; avgQueueLength = Infinity; } else { var N_factorial = factorial(numAgents); var sumPart = sumFactorials(trafficIntensity, numAgents); var erlangCValue = (Math.pow(trafficIntensity, numAgents) / N_factorial) * (numAgents / (numAgents – trafficIntensity)); probDelay = erlangCValue / (sumPart + erlangCValue); // Average Wait Time in seconds avgWaitTime = probDelay * (avgHandleTimeSeconds / (numAgents – trafficIntensity)); // Average Queue Length avgQueueLength = probDelay * trafficIntensity / (numAgents – trafficIntensity); // Simplified Service Level Approximation (e.g., 80% in 20 seconds) // This is an approximation. For precise SL, more complex formulas are needed. var targetWaitTime = 20; // Example target: 20 seconds var probWaitLongerThanTarget = probDelay * Math.exp(-(numAgents – trafficIntensity) * targetWaitTime / avgHandleTimeSeconds); var serviceLevelPercent = (1 – probWaitLongerThanTarget) * 100; serviceLevelValue = serviceLevelPercent.toFixed(2) + "% calls answered within " + targetWaitTime + "s (approx)"; } // Display results document.getElementById("probDelayValue").textContent = (probDelay * 100).toFixed(2) + "%"; document.getElementById("avgWaitValue").textContent = avgWaitTime === Infinity ? "Infinity" : avgWaitTime.toFixed(2); document.getElementById("avgQueueValue").textContent = avgQueueLength === Infinity ? "Infinity" : avgQueueLength.toFixed(2); document.getElementById("serviceLevelValue").textContent = serviceLevelValue; };

Leave a Comment