If you ask an AI to pick a number between 1 and 50, it often chooses 27: Why?

When we ask AI models like ChatGPT, Claude, Gemini or Perplexity to pick a random number between 1 and 50, a surprising trend emerges—many of them answer with the number 27. This unexpected consistency across models has sparked curiosity about how randomness works in large language models (LLMs).

Why do AIs keep picking 27?

At first glance, 27 might seem like a truly random choice. However, LLMs are not generating numbers at random—they’re selecting outputs based on patterns learned from human-generated data. According to AI expert Andrej Karpathy, most LLMs tend to “sound the same”, especially when asked simple or open-ended questions. This reflects a deeper issue: they replicate human biases learned from the data they were trained on.

One Reddit user pointed out that 27 feels “human-random”—it’s not too low, not too high, and it’s mathematically interesting (3³). Another theory suggests that 27 serves as an optimal midpoint in a decision tree, following principles from game theory. In games that simulate random number selection, some models might default to 27 because it’s central and “safe.”

Another contributing factor is the pervasive popularity of the digit 7. In multiple human-based studies where people were asked to choose numbers at random, numbers ending in 7—like 7, 27 or 77—appeared disproportionately often. LLMs echo this tendency, as they’ve been trained on millions of human examples with the same patterns.

Not all models give the same answer—some, like Grok, reportedly favor 42. But the dominance of 27 is a clear sign that AI randomness is often just human-like predictability in disguise.