Guess the secret number with higher/lower hints. Multiple difficulty levels with score tracking.
What Is Number Guessing Game?
The number guessing game is a classic logic game where the computer picks a random number within a range and you try to guess it. After each guess, you receive feedback: "too high" or "too low". Using binary search strategy (always guessing the middle of the remaining range), you can find any number in 1–100 in at most 7 guesses.
This deceptively simple game teaches binary search — one of the most fundamental algorithms in computer science. It is also a great introduction to logarithmic thinking: the maximum number of guesses needed is log₂(n), so doubling the range only adds one more guess.
How to Use This Tool
Select the number range (1–100, 1–500 or 1–1000).
Enter your guess in the input field.
Read the feedback: "Too high", "Too low" or "Correct!".
Use the feedback to narrow down the range and make your next guess.
Try to guess the number in as few attempts as possible.
Tips & Best Practices
Always guess the middle of the remaining range — this is the binary search strategy and minimises worst-case guesses.
For 1–100, start at 50. If too high, try 25. If too low, try 75. Keep halving.
The optimal maximum is 7 guesses for 1–100, 9 for 1–500 and 10 for 1–1000.
Track your guess history to avoid repeating numbers.
Common Use Cases
Learning binary search through an interactive, intuitive game.
Quick mental exercise and number sense practice.
Teaching algorithms and logarithmic thinking in computer science education.
Fun classroom activity for maths and logic lessons.
Frequently Asked Questions
How many guesses do I get?
All three difficulties are free: Easy (1-50) gives 10 guesses, Medium (1-100) gives 7, and Hard (1-500) gives 9. Premium adds a custom number range, hot/cold hints and a persistent best-score leaderboard.