What is Little's law?

A rule stating that the average number of items in a system equals their arrival rate times the average time each stays.

Little's law diagram example

Public diagram from the Machinations Community. Open it on its own page

Little's law states that the average number of items in a stable system equals the average arrival rate multiplied by the average time each item spends in the system. In symbols, L = λW. It holds for queues, factories, hospitals and websites alike, which makes it one of the most useful relationships in operations.

How it works

The three quantities are tied together, so knowing two gives the third. L is the average number of items inside, λ is the rate at which they arrive (and, in a stable system, leave), and W is the average time spent inside. It requires only that the system is stable over the period measured, so what comes in on average goes out. It does not depend on the shape of the arrival pattern or on how items are served.

The practical lesson is that, for a given rate, reducing time in the system reduces the amount of work inside, and reducing the amount inside reduces the time. That is why limiting work in progress shortens waiting.

Example

Say an emergency department receives 12 patients an hour and the average patient stays 3 hours. Then L = 12 x 3 = 36 patients are in the department on average. If better triage cuts the average stay to 2 hours, L = 12 x 2 = 24, so 12 fewer beds or chairs are in use at any time. Conversely, if there were 36 patients inside and the stay were known to be 3 hours, the arrival rate would be 36 / 3 = 12 an hour. The numbers are an illustration.

How to model it in Machinations

Use a Source for arrivals at rate λ, a Pool or Queue for the system and a Drain for departures. Add a Register that computes L from the Pool, and another that divides L by the arrival rate to give W. Make the arrival rate a Lever. Play and chart the Registers to see that the numbers satisfy L = λW once the system settles.

See Little's law in a system you can Play

Build the rules in a Machinations diagram, change a value and Play it to watch how the system responds.