Erlang Distribution Calculator
Compute waiting-time probabilities for the sum of several exponential stages.
What it does
A single exponential stage describes the wait for one event. Many real processes need several stages in a row, such as a call moving through three service desks or a component failing after several wear steps. The Erlang distribution describes the total time for those k stages when each has the same rate.
It is the gamma distribution restricted to a positive integer shape, which allows the cumulative probability to be written as a finite sum. That makes it easy to compute without numerical integration, even for fairly large shape values.
The tool takes the number of stages, the rate per stage and the time threshold, then returns cumulative, tail, interval or density results. It also reports the mean and standard deviation so you can check whether the rate is sensible.
The model assumes each stage is independent with an identical rate. If the stages differ, a general gamma or a phase type model is more appropriate than this single rate version.
How to use
- Choose the probability question you want answered.
- Enter the number of stages as a whole number.
- Enter the time threshold x in the same units as the rate.
- For an interval, add a second time at or above x.
- Enter the rate for each individual stage.
- Read the result and compare the mean with your expectation.
Formula
- k
- Positive integer shape, equal to the number of sequential stages.
- lambda
- Rate per stage in events per unit of time.
- x
- Total elapsed time in the same units as the rate.
- F(x)
- Cumulative probability that the total wait is at most x.
When the rate is written as a scale theta instead, theta equals one divided by lambda and the mean becomes k times theta. The engine uses the rate form. The finite sum in the cumulative formula is bounded, so the computation stays fast and safe for large shapes.
Worked example
Example: 3 stages at a rate of 0.5
Shape k = 3, rate 0.5 per hour and x = 2 hours, asking for the probability of finishing within 2 hours.
- Compute lambda x: 0.5 x 2 = 1.
- Finite sum for k = 3: 1 + 1 + 1/2 = 2.5.
- Survival term: exp(-1) x 2.5 = 0.919699.
- Cumulative probability: 1 - 0.919699 = 0.080301.
- Density: 0.5 cubed x 2 squared x exp(-1) / 2 = 0.091970.
- Mean: 3 / 0.5 = 6 hours, and standard deviation is 3.4641.
- Tool shows probability 0.0803 (8.03 %), density 0.0920, mean 6 and sd 3.4641.
Reference table
| Time x (hours) | P(X <= x) | Density |
|---|---|---|
| 2 | 0.0803 (8.03 %) | 0.0920 |
| 6 | 0.5768 (57.68 %) | 0.1120 |
| 10 | 0.8753 (87.53 %) | 0.0421 |
Limits
- Assumes identical independent stages with one rate.
- Requires a whole number shape.
- Does not allow a delay before the first stage begins.
- Very large shapes can lose precision in the density tail.
Common mistakes
- Entering a fractional shape where this page expects an integer.
- Using a scale where the field asks for a rate.
- Forgetting that the mean grows with the number of stages.
- Treating the density as a probability of an exact time.
- Applying a single rate when stages actually differ.
Try it yourself
Quick checks. Answers sit tucked under each question.
Shape 3 and rate 0.5, what is the chance the wait exceeds 2 hours?
0.9197 (91.97 %), the complement of the worked cumulative value.
Shape 3 and rate 0.5, what is the chance of finishing by 6 hours?
0.5768 (57.68 %).
What are the mean and standard deviation?
Mean 6 hours and standard deviation 3.4641 hours.
Questions
How is Erlang related to exponential?
With one stage it is exactly the exponential distribution. More stages produce a peaked, less dispersed waiting time.
How is it related to gamma?
It is the gamma family restricted to integer shapes, which allows a finite sum for the cumulative probability.
What does the rate apply to?
Each individual stage, not the total process. The mean of the whole wait is the shape divided by that rate.
Can I enter a large shape?
Yes, up to 1000. The sum is bounded and the tool stays responsive.
Why does the density start at zero for more than one stage?
Several stages cannot all finish instantly, so very small total times have almost no chance.
What if stages have different rates?
Use a general gamma or phase type model instead of this equal rate version.
Sources
- NIST and SEMATECH e-Handbook, Gamma Distribution
- Duke University, Notes on Gamma Processes
- University of Illinois, Exponential, Erlang and Gamma Distributions