Guess the Number

Find the secret number with hot-and-cold hints, or flip the game around and let the computer guess yours.

Fun & Games Runs in your browser Free, no sign-up Two game modes
Tries0 Best–

I'm thinking of a number from 1 to 100.

Make your first guess
FreezingBoiling

How to play guess the number

  1. Choose a range1–50 for a quick game, 1–100 for a classic one, or 1–1000 for a real challenge.
  2. Make a guessType a number and press Guess. You'll be told to go higher or lower, plus how hot or cold you are.
  3. Find it in as few tries as possibleEvery guess is shown as a hot or cold chip, and your best score for each range is saved.

The best strategy: halve the range

The fastest method is to always guess the middle of the numbers that are still possible. For 1–100, start with 50. If the answer is higher, guess 75; if lower, 25, and so on. Each guess cuts the possibilities in half, so you can always find a number from 1 to 100 in 7 guesses or fewer, and one from 1 to 1000 in at most 10. The hot-and-cold meter gives an extra clue, so with a little luck you can do even better.

Computer guesses mode

Switch to Computer guesses to swap roles. Think of a secret number, press the button, and answer each guess with higher, lower or "that's it". The computer uses the halving strategy perfectly, so it always finds your number within the maximum number of tries. If your answers contradict each other, it will notice. It's a fun way to show children how smart searching works.

The maths behind the game

This game is a playful version of binary search, one of the most important ideas in computer science. Search engines, databases and even dictionaries use the same principle to find things quickly. The number of guesses needed grows very slowly: doubling the range adds only one extra guess. Practise mental maths next with the Math Quiz Sprint.

Frequently asked questions

How many guesses do I need for 1 to 100?

With the halving strategy you never need more than 7 guesses for numbers from 1 to 100.

Is the secret number random?

Yes. It is chosen with your browser's cryptographic random generator, so every number is equally likely.

What do hot and cold mean?

They show how close your guess is to the secret number. Boiling means you are within 2% of the range.

Is this good for kids?

Yes. It practises number sense, comparing numbers and logical thinking, and the computer mode shows a clever strategy.

More fun & games tools