Queueing theory
Little's law calculator.
Fill in two of the three values and leave one blank. The tool solves it, with the arrival rate and time in any unit you pick.
L = lambda x W. L is the average number of items in the system, lambda the average arrival rate and W the average time an item spends in the system. Use the same time unit for both.
Your numbers
Result
Worked example
Customers arrive at 10 per hour and stay 30 minutes (0.5 hour) on average. L = 10 x 0.5 = 5 customers in the shop on average. Reverse it: if on average 2 customers are at the counter and 10 arrive per hour, each spends W = 2 / 10 = 0.2 hour (12 minutes) there. Both examples appear in the Little's law reference.
How it works
Little's law (J. D. C. Little, 1961) says that for a stable system the long-run average number of items equals the long-run average arrival rate times the average time each item spends inside. It holds whatever the arrival or service distribution and whatever the service order, as long as the system is stationary and you measure arrivals and time over the same boundary.
Common uses: work in progress = throughput x cycle time, requests in flight = requests per second x latency, and people in a queue = arrivals x wait. In an overloaded system that keeps growing, the averages are not stationary and the law does not apply to them.
FAQ
What is Little's law?
L = lambda x W: the average number of items in a stable system equals the average arrival rate times the average time an item spends in it.
Do arrivals have to be random for Little's law to hold?
No. It does not depend on the arrival or service distribution, only on the system being stable over the period you measure.
Which arrival rate do I use if some items are turned away?
Use the rate of items that actually enter the system (the effective arrival rate), not the rate of attempts.
How do I use Little's law for web servers?
Requests in flight = requests per second x average latency in seconds. The requests-per-second to concurrency calculator applies this directly.
Sources
Retrieved
- Wikipedia: Little's law (J. D. C. Little, Operations Research 9(3), 1961)
- AWS Lambda Developer Guide: Understanding Lambda function scaling
Formulas are standard published results; the cited pages state them. Inputs, defaults and rounding are this tool's own. Runs entirely in your browser. Nothing you type is sent or stored.
Scope
Little's law relates long-run averages of a stable system. It does not predict individual waits.