Number Guessing Game

A hidden number somewhere in your chosen range. Guess it in as few tries as possible using the higher/lower hints after each attempt. Starts easy, gets trickier on hard mode with a 1-500 range.

Guess a number between 1 and 100

How to use

  1. Pick Easy (1-50), Medium (1-100), or Hard (1-500). A random number is hidden in that range.
  2. Type any number in the box and press Enter or tap Guess.
  3. You'll get a clue after each guess: Too High, Too Low, or Correct! Adjust your next guess accordingly.
  4. Finish in as few guesses as possible. Your personal best is saved automatically.

The computer picks a secret number within a range you choose and you guess it. After each guess you get a hint: too high, too low, or how close you are in temperature terms (hot, warm, cold). Your goal is to find the number in as few guesses as possible. Smaller ranges are easier, 1-500 is a real challenge.

The optimal strategy is binary search: always guess the midpoint of your remaining range. If your range is 1-100, guess 50. If the answer is higher, guess 75. If lower, guess 25. This approach guarantees you find any number in 1-100 in at most 7 guesses mathematically. Using the hints wisely makes this more of a logic exercise than a pure guessing game.

Frequently Asked Questions

What ranges are available?

You can choose 1-50, 1-100, or 1-500. The larger the range, the more guesses you will need to narrow it down.

What do the hot and cold hints mean?

The hints tell you how close your guess was to the secret number. Very close means hot, moderately close means warm, far away means cold.

What is the fewest guesses needed for 1-100?

With optimal binary search strategy, any number from 1 to 100 can be found in at most 7 guesses.

Does the number change each round?

Yes. A new random number is picked at the start of each game.

Number Guessing Game - Guess the Secret Number | ToolHaven