Using Queuing Theory to Survive the Checkout Line
How Back-to-School Shopping Chaos Turned into a Learning Opportunity
It’s late summer, and that means parents and kids are all getting ready to go back to school. My oldest boy, a rising third grader, needed a new pair of sneakers. So, we bravely ventured to the outlet mall, drawn by the promise of variety and discounts. To set the scene, we went to the mall on the Sunday before school started—not in the morning or early evening, but in the middle of the afternoon. Peak hours. Pure mayhem. What were we thinking? I’m not sure, but here’s how we used queuing theory to make our wait a little more tolerable.
We arrived at the Nike outlet just before 2 p.m., and I immediately knew this was a bad idea. The store was packed. Aisles were crammed with people trying on sneakers, searching for the right size, or hunting for the perfect back-to-school outfit. A quick glance at the checkout line showed it was about four rows deep. It was going to be a long wait.
My son, however, was quick to decide. Within five minutes, he had found the perfect pair of sneakers—they fit, they were in his size, and he was happy. We made our way through the crowd to the back of the checkout line, which had grown to four and a half rows deep, winding through the apparel section. The line was so long that some people were taking photos, probably to share the chaos on social media.
I checked my watch—it was 2 p.m. I turned to my son and said, “Let’s play a game. Let’s see if we can use math to calculate when we’ll finish checking out. We’ll call it our ‘cycle time.’”
First, we needed to figure out the length of the queue. My son counted 65 people ahead of us. Realizing that not everyone in line was checking out—some were just accompanying others—we estimated that about 10 of those people wouldn’t be making a purchase. So, we had roughly 55 actual customers in front of us.
Next, we needed to calculate the average service time—how long it takes, on average, for someone to complete the checkout process. I asked my son to use my phone to time a few customers as they finished checking out. After a bit of observation, we determined that each customer took about two minutes to complete their transaction.
With this information, we could now estimate how long our wait would be. From where we stood, we could see that four cashiers were working. This meant that the store could process four customers every two minutes.
We then divided the number of people ahead of us (55) by the number of cashiers (4). This gave us approximately 14 rounds of checkout before it would be our turn. Since each round takes about two minutes, we estimated our total wait time to be 28 minutes.
Calculation: People per cashier = 55 people / 4 cashiers = 13.75 rounds.
Since each person takes around 2 minutes to complete the checkout process, we multiply 13.75 rounds x 2 minutes = ~28 minutes.
It was now 2:08 p.m., so we added our estimated 28-minute wait time, giving us a projected checkout time of 2:36 p.m.
I was pretty excited—we had a reasonable estimate of our wait time! I turned to my son and said, “See, math is fun.” He wasn’t convinced and let out a big sigh.
A few minutes later, I realized there was a flaw in our formula. We hadn’t accounted for the variability in our service time calculation. While most customers in front of us had one or two items, a few had a lot more. Their checkout process would undoubtedly take longer than the two minutes we had calculated, but by how much, we couldn’t say.
We also didn’t consider the possibility of a cashier going on a break, reducing the available capacity, or the chance of another cashier joining in, which would increase capacity. We could have adjusted our estimate slightly to account for these factors, but we decided to stick with our original formula, keeping in mind that there’s always some variability in how long each customer takes to check out.
As the line moved forward, I kept my son engaged by explaining how grocery stores handle this kind of variability. They use a combination of self-checkout lanes and “15 items or less” lanes to speed things up. These lanes not only add convenience for customers but also reduce the variability in checkout times, making it easier for stores to predict how many cashiers they need on hand to keep lines moving quickly. I even mentioned that at Wegmans (one of our favorite stores), cashiers have a screen that displays their “IPM,” or items per minute, which tracks how many items they scan each minute. It’s another way math is used to create a smoother checkout experience.
You might think this was a lot for my son to take in when he just wanted new sneakers—and you’d be right. But he’s used to my antics by now.
By 2:29 p.m., we were in the home stretch. We’d been waiting for 21 minutes and were getting close—really close.
A few minutes later, we were called up by the next available cashier. With only one item, our checkout process took less than a minute. Given that most customers likely had two or three items, our estimated service time of two minutes per customer seemed to be pretty accurate.
I checked my watch as we finished—2:34:33 p.m. Our quick math had put us within about a minute of the actual time it took, including both waiting and checking out.
In total, we waited in line for 26 minutes. That’s a long time to wait to buy sneakers, but given that it was “back to school” shopping weekend, the influx of customers was much higher than usual. The store might not find it cost-effective to reduce wait times on such an atypical day, but my wife’s advice to “avoid shopping on the Sunday before school starts” is probably the best way to skip the chaos.
However, if the store did want to reduce wait times on days like this, they could:
Add cashier capacity. By adding two more cashiers during peak hours, they could significantly cut down wait times—by as much as 36% in our case.
Implement mobile checkout. Letting customers check out via the Nike mobile app could reduce the length of the line and also decrease the variability in service times, as people with fewer items would likely opt for this faster checkout option.
As we left the store, my son asked a great question: “Dad, how many cashiers would they need to get the checkout done in five minutes?”
I broke it down for him. If we wanted to complete the entire cycle—waiting and service time—in five minutes, we’d need to handle 55 people in that time. With each person taking about two minutes to check out, that’s 110 minutes of work that would need to be done in just five minutes. To achieve that, they’d need 22 cashiers.
“That’s a lot of cashiers,” my son said.
Indeed it is.
You don’t have to work in a SOC (Security Operations Center) to understand or see queuing theory and its effects. It’s all around you all the time. Next time you’re stuck in a long line, try using math to estimate your wait time. Count the people, observe how long it takes for each one to check out, and see how close you can get. Adjust your estimate as you learn more about the situation. Are you counting too many people in the queue? Can you get more precise about the service time as you observe the process more and more? Give it a shot.
Queuing theory is all around us.
Thanks for reading!