On my birthday, my phone told me the time was 12:57 and its battery was 57% charged. This immediately reminded me of the so-called Birthday Paradox, and it made me want to calculate the odds of observing this correspondence.
Question: When I glance at my phone and see the battery level and the time, what are the odds the percentage and the minutes are the same?
It’s almost certainly not a realistic assumption, but without precise data to say otherwise, let’s assume that whenever I check my phone, I’m equally likely to view the battery percentage at any value 1 to 100, (with 0 being impossible), and let’s also assume any time past the hour is also equally likely (0 minutes to 59 minutes). That is, considering—
—we wish to find . To do so, we will first find the probability of this event not happening, i.e. .
The sample space for the battery percentage can be divided into two interesting intervals:
1. On the interval , there is no way for the minutes to match the battery value, since the clock will never show 60, 61, … up to 100 minutes past the hour1. In other words, given that the battery percentage is on this interval, there is a 100% chance that the minutes will not match it. The probability we will have a non-match in this way is
2. On the interval , the battery percentage might match the minutes. The minutes value has one way to match any particular percentage on this interval and 59 ways to not match it. The probability we will have a non-match in this way is
Since these two event sets represent a partitioning of the overall event space, we can simply add their probabilities to find the overall probability of a non-match:
Finally, we will apply :
Answer
So, given our assumptions about no particular bias in the battery percentage or in the time past the hour, the odds of seeing those values match is about 1%. Unlikely, but not extremely unlikely. I think I can conclude that in the moment when I observed this coincidence, I felt about the right amount of surprise2.
What about the Birthday Paradox?
The Birthday Paradox (or the Birthday Problem) is a well-known observation that also considers the odds of observing a matching of two numbers out of several pairings. If you haven’t heard of it, get ready for one of those “paradoxes” that might not actually strike you as a paradox. The Birthday Paradox simply asks you to consider the question, “How large of a group of random people do you need to have before the odds exceed 50% that you have at least two people born on the same day of the year?”3
It then answers this question with 23, which is supposed to be a shockingly low quantity. Before I first learned the answer, I didn’t guess it to be 23, but I don’t think I was far off. I have met a few people who called this paradox mind-blowing, but my suspicion is that they are somehow mistaking the question for asking for the odds that they will share a birthday with someone. Like playing tag in the dark, it’s intuitive that the odds of a collision start going up very fast as you add more people.
You’ve probably already seen the Birthday Paradox if you’re reading this, but I’ll write out a calculation here anyway on the occasion of my birthday.
To find the probability of at least two people with same birthday, we will first find the complement of this probability, where all birthdays are distinct. If we have only one person in total, there’s a 100% chance of all birthdays being distinct.
If there are two people, the second guy needs to have a different birthday from the first guy. There are 364 ways for this to happen and one way for it not to happen.
If we add a third guy, he needs to have an additional different birthday from the first two distinct birthdays. There are 363 ways for this to happen and two ways for it not to happen.
The pattern here is clear.
This can be rewritten with factorials for aesthetic purposes, but it doesn’t make the calculation any easier. Continuing to increase , you eventually find that this product crosses 50% at .
Taking 100% minus this quantity, this means the odds of at least two people with the same birthday exceed 50% at 23 people, as promised. The probability exceeds 90% at 41 people and 99% at 57 people. Obviously, it will not hit 100% until 366 people.
Other ways to find
To solve the Birthday Problem, you could try each value of starting with 1, adding another factor to the product until you find the solution. Maybe this is a practical method if you don’t have a computer, though it wouldn’t be fun. If you have a computer that can evaluate directly, you could exploit the function’s obvious monotonicity to do a binary search. But what about an analytic approach? I don’t have a closed-form solution. But there’s this neat approximation that uses only high school math. I’ll substitute for 365 because it’s shorter. As the probability is given in the problem as 0.5, we want to invert the function I wrote earlier:
Sums can be easier to deal with than products. Let’s take the natural logarithm of both sides. This transforms our product into a sum.
Let’s rewrite this slightly.
Now recall the identity, convergent for :
Taking (and observing that ) we can substitute this into our previous expression.
Reverse the order of summation.
Now is constant inside the inner summation, so we can pull some factors out.
Now the inner summation is recognizable as the triangular numbers, the pyramidal numbers, and so on as increases. We still have an infinite series, but let’s write out the first few terms.
Now substituting the well-known figurate number formulas for these inner sums gives us4:
As we add more terms, the denominators grow by roughly a factor of , which is good. The numerators grow by roughly a factor of , which is bad, but overall it’s good because we know and . Therefore we can convince ourselves this will converge with reasonable speed. Now let’s truncate this series after the first term and solve for .
The negative root is obviously irrelevant, as the number of people must be on . Plugging in , our approximation works out to:
This is remarkably close to the answer we got earlier of 23. However, this closeness seems more like a fluke due to our choice of parameters than to the power of the approximation, as adding more terms to brings the number down slightly, not up.

- If you consider 100% (or alternatively 60%) battery to match 0 minutes past the hour, the final answer changes to exactly 1%. ↩︎
- The correct amount of surprise in this case is about 6.668 bits, i.e. almost as surprising as flipping a fair coin 7 times and getting all 7 heads. ↩︎
- You’re supposed to assume every year has 365 days, on which everyone is equally likely to be born. ↩︎
- Remember we are evaluating these figurate number formulas at , not . ↩︎
