AbraCalc

Number Guessing Game

Guess the secret number between 1 and 100. Get higher/lower hints. Fewest guesses wins.

I'm thinking of a number between 1 and 100. Can you guess it?
Embed this tool on your site

How to play

  1. The computer picks a secret number from 1 to 100.
  2. Type your guess and click Guess (or press Enter).
  3. You'll get a "Too high" or "Too low" hint after each guess.
  4. Narrow the range with each guess — binary search (start at 50) finds it in ≤7 tries.
  5. Correct! shows your guess count; try to beat your best.

The computer picks a secret number between 1 and 100. Type your guess and receive higher/lower hints. Try to find it in as few guesses as possible — the mathematical minimum is 7 with a perfect binary search strategy.

Frequently asked questions

What is the best strategy?
Binary search: always guess the midpoint of the remaining range. Starting at 50, then adjusting by half each time, you can always find the number in at most 7 guesses.
Is the number truly random?
Yes — Math.random() generates a new number each game with equal probability for 1–100.