Formula Bro

Math and physics formulas, explained like you are new.


Little's Law

In one sentence: Little’s law says the number of things inside a system equals how fast they arrive, multiplied by how long each one stays.

L=λWL = \lambda W

Read it out loud: “L equals lambda times W. The average number of items in the system equals the arrival rate times the average time each item spends in it.”

What each symbol means

SymbolMeaning

LL

The average number of items inside the system at any moment, such as customers in a shop or requests in a server.

λ\lambda

The arrival rate: how many items enter the system per unit of time, such as customers per hour.

WW

The average time one item spends in the system, from arrival to departure. Use the same time unit as λ\lambda, for example hours.

What the formula is doing

Picture a queue. People walk in at a steady pace, and each one stays for some time before leaving. At any moment, the number of people inside depends on two things: how fast they come in, and how long each one stays.

If customers arrive twice as fast and stay for the same time, there are twice as many inside. If they arrive at the same speed but each stays twice as long, there are again twice as many. So LL grows in proportion to both, and the formula is a product: L=λWL = \lambda W.

The law does not need to know how arrivals are spread out. They can come in bursts or evenly, and stays can be short or long. The system only needs to be steady, meaning it is not slowly filling up forever. Then the long-run average count equals the rate times the average time.

The units must match. If λ\lambda is in customers per hour, WW must be in hours. Six minutes is 0.1 hours, so using 6 would give an answer 60 times too big.

An everyday picture

Think of an escalator in a shopping mall. Shoppers step on at a steady rate, and each rides for about the same time. The number of people standing on the escalator at any moment is how fast they step on, multiplied by how long each ride lasts.

Worked example: Customers in a coffee shop

A coffee shop gets λ=30\lambda = 30 customers per hour. Each customer stays W=6W = 6 minutes on average. We need the same time unit as the rate, so we use hours.

  1. Convert the time: 66 minutes =660= \frac{6}{60} hours =0.1= 0.1 hours.
  2. Apply the law: L=λW=30⋅0.1=3L = \lambda W = 30 \cdot 0.1 = 3 customers.
  3. Second case, a web server: λ=200\lambda = 200 requests per second and W=0.05W = 0.05 seconds. So L=200⋅0.05=10L = 200 \cdot 0.05 = 10 requests in flight.

Answer: On average 3 customers are inside the coffee shop at any moment. The same rule says a web server that gets 200 requests per second, each taking 0.05 seconds, has about 10 requests in progress at once. Both results are averages, not exact counts.

The numbers in this example are recomputed by script every time the site is built.

Common mistakes

Where you will meet it

Questions people ask

Does Little's law need the arrivals to be evenly spaced?

No. It works with averages over a long time, so bursts and quiet periods are fine. It does need the system to be steady, which means it is not filling up forever.

What if I know the count and the time but not the rate?

Rearrange the formula to λ=LW\lambda = \frac{L}{W}. For example, if 3 customers are inside on average and each stays 0.1 hours, then 30.1=30\frac{3}{0.1} = 30 customers arrive per hour.

Why is it called Little's law?

It is named after John D. C. Little, who published a general proof of the formula in 1961.

Sources

  1. Little's law, Wikipedia
  2. Queueing theory, Wikipedia

| All Computer Science formulas

Published 2026-10-22. Plain-text copy for AI agents and readers: computer-science/littles-law.md.