Age Guesser

The question—
Possible range—
Questions asked—
Your age—

How Age Guesser is calculated: Binary search: each Yes/No answer halves the range 1-100, so any age is found in 7 questions or fewer. First question: Is your age greater than 50?

What is an age guesser?

An age guesser is a game that finds your exact age by asking yes or no questions. Think of your age, any number from 1 to 100, and answer each question honestly. The first question is always the same: is your age greater than 50? Answer Yes or No, and the next question narrows the range. Seven questions at most, and the game tells you your age.

It feels like a magic trick, but there is no trick and no secret. The game uses binary search, the same method a computer uses to find a word in a dictionary: split the range in half, throw away the half that cannot contain the answer, and repeat. Every answer cuts the possibilities in half, so the range collapses fast.

This version runs entirely in your browser. Nothing is uploaded, nothing is stored, and your age is never sent anywhere. The game does not know your age in advance: it works it out from your answers, one halving at a time, and you can watch the range shrink in the results box as you play.

How the age guesser works: binary search in plain words

The method is binary search. Start with every age from 1 to 100, a range of 100 numbers. The first question splits it in half: is your age greater than 50? A Yes means your age is in 51 to 100. A No means it is in 1 to 50. Either way, half the numbers are gone after one question.

Each question repeats the same move on the smaller range. The game asks about the middle of what is left, and your answer throws away the half that cannot contain your age. After two questions the range is 25 numbers wide. After three, about 13. After six, two numbers are left, and the seventh question settles it.

The maths behind the limit is simple: 2 to the power of 7 is 128, which is more than 100, so 7 questions are always enough to pin down any age from 1 to 100. Some ages take fewer: 100 is found in 6 questions, and 50 takes 6 as well. The worst case is 7, and the game never needs an eighth.

Halving is the fastest possible strategy, and that is why the game never asks a question like "Is your age 37?" A direct guess has a 1 in 100 chance of being right and wastes the question when it is wrong. A halving question always removes half the range, so every question earns its keep.

The first question, and why it is always 50

The first question is always "Is your age greater than 50?" because 50 is the middle of 1 to 100. Splitting the range in half is the fastest possible move: any other first question would leave one side bigger than the other, and the game would need more questions on average to finish.

The middle moves with the range. If you answer No to 50, the range is 1 to 50, and the middle is 25, so the next question is "Is your age greater than 25?" If you answer Yes, the range is 51 to 100, the middle is 75, and the next question is about 75. The question is always the middle of what is left.

This is the same idea behind guessing a number in a game of higher or lower, and it is also how a phone book used to work: open it in the middle, check which half your name is in, and repeat. The age guesser just does it with ages, and it does the halving for you.

A worked example: guessing 37, then 73

Take the age 37. Question 1: greater than 50? No, so the range is 1 to 50. Question 2: greater than 25? Yes, so the range is 26 to 50. Question 3: greater than 38? No, so the range is 26 to 38. Question 4: greater than 32? Yes, so the range is 33 to 38.

Question 5: greater than 35? Yes, so the range is 36 to 38. Question 6: greater than 37? No, so the range is 36 to 37. Question 7: greater than 36? Yes, so the range is 37 to 37. One number is left, and it is 37. Seven questions, exact answer.

Now take 73. Greater than 50? Yes, so 51 to 100. Greater than 75? No, so 51 to 75. Greater than 63? Yes, so 64 to 75. Greater than 69? Yes, so 70 to 75. Greater than 72? Yes, so 73 to 75. Greater than 74? No, so 73 to 74. Greater than 73? No, so 73 to 73. Again seven questions, and again the exact age. The game was tested for every age from 1 to 100 in advance: all 100 ages are found, and none takes more than 7 questions.

Who plays the age guesser, and why

Friends play it at parties, because it looks like mind reading and it takes less than a minute. One person thinks of an age, the group watches the questions, and the reveal at the end gets a reaction every time. It is a good icebreaker precisely because nobody believes seven yes-or-no answers can pin down an exact age.

Teachers use it to show binary search without a computer. A class can play along on paper, tracking the range as it shrinks, and the lesson lands because every student can see the halving happen. It is the shortest honest demo of why splitting a problem in half beats checking one number at a time.

Parents use it with children who are learning numbers. Answering "greater than" questions is good practice for comparing numbers, and the game gives the practice a point: the machine is trying to catch your age, and you want to see if it can. An age calculator works out an exact age from a birth date, and a date age calculator does the same between any two dates.

Age guesser vs age calculator

The guesser and the age calculator answer different questions. The calculator takes a date of birth and works out an age in years, months, and days. It is exact, and it needs your real birth date. The guesser takes no personal information at all: it finds your age from seven yes-or-no answers, and it never asks when you were born.

That difference is the point. The calculator is a tool for forms, records, and birthdays. The guesser is a game and a demo: it shows how little information is needed to pin down a number, as long as each answer cuts the possibilities in half. Seven careful questions carry as much information as a full date of birth.

If you need your real age for a form, use the calculator, or the date to age calculator for the same job in the tools section. If you want to see binary search work, or to impress a friend, play the guesser. A fitness age calculator goes a different way entirely: it estimates how old your body acts, not how old you are.

Common age guesser mistakes

The most common mistake is answering the wrong question. The game asks "greater than", not "equal to or greater than". If your age is exactly 50 and the question is "greater than 50?", the honest answer is No. Answering Yes to your own number sends the game into the wrong half, and it will guess wrong.

Second: changing your age halfway through. The game trusts your answers, and it has no way to know you switched from 37 to 40 at question four. Pick one age before the first question and keep it for the whole game.

Third: thinking the game reads your mind. It does not. It reads your answers, and each answer carries exactly one bit of information: yes or no. Seven bits can describe 128 different values, which is why seven questions cover 100 ages. There is no hidden data, no camera, and no trick.

Fourth: answering "maybe". The game only accepts Yes or No, because binary search only works when each answer removes a clean half. If you are not sure whether your age is greater than a number, stop and work it out: compare the two numbers first, then answer.

Fifth: playing with an age outside 1 to 100. The game only covers whole ages from 1 to 100, and an age of 0 or 101 has no question path that reaches it. If you are thinking of an age outside the range, pick one inside it, or the game will narrow to the nearest edge and stop.

How to use this age guesser

Think of your age first, any whole number from 1 to 100, and keep it in your head. Do not type it anywhere: the game never asks for it. Read the question in the results box, then press Yes or No. The range shown underneath shrinks with every answer.

Answer honestly and take your time. There is no timer, and a wrong answer is the only way the game fails. After at most seven questions the game shows your age. If it is wrong, one of the answers was wrong: press Yes or No again and the game restarts from the beginning.

Everything runs in your browser. No account, no form, no data sent anywhere: your age never leaves your device, because you never type it. Play as often as you like, and try it on a friend: think of their age, answer for them, and watch the game find it.

One tip: try the edges. Age 1 takes the full 7 questions, and age 100 takes 6. If you want to see the method at its best, pick an age near the middle, like 50, which the game finds in 6 questions. The questions are the same either way; only your answers change.

Frequently Asked Questions

Each answer halves the range, and 2 to the power of 7 is 128, which is more than 100. The first question splits 1 to 100 into two halves of 50. The second splits the remaining half, and so on. After seven halvings only one number is left. The game was checked for every age from 1 to 100: all of them are found, and none takes more than 7 questions.

No. It starts knowing only that your age is between 1 and 100, and it works out the rest from your Yes and No answers. You never type your age, and nothing is uploaded or stored. The guess comes purely from the seven answers, using binary search.

The game will guess the wrong age, because it trusts your answers completely. There is no way for it to detect a wrong answer halfway through. If the final guess is wrong, press Yes or No again: the game restarts, and you can play again with careful answers.

Because 50 is the middle of 1 to 100, and splitting the range in half is the fastest possible move. Any other first question would leave one side bigger than the other, and the game would need more questions on average. Every later question is the middle of whatever range is left.

More free tools

More calculators and utilities from Sortrun — free, no sign-up.