Number Guessing Game

Test your intuition and logical thinking skills with this classic number guessing game

Range
1 - 100
Attempts Left
7
Attempts Used
0
Progress
Guess the Secret Number!
Game Statistics
0
Games Played
0%
Win Rate
-
Avg. Guesses
0
Best Streak

Best Scores by Difficulty

Easy
-
Medium
-
Hard
-

How to Use

The computer picks a secret number and only tells you 'higher' or 'lower' after each guess. Easy is 1–50 with 8 attempts, Medium is 1–100 with 7, and Hard is 1–200 with 8.
1

Choose Easy, Medium or Hard under 'Difficulty Level'.

2

Type a number and press 'Make Guess' or Enter.

3

Read the hint, 'Try a higher number!' or 'Try a lower number!'. The 'Still possible' box at the top narrows to the range the answer can still be in.

4

Find it before you run out of attempts to win. 'New Game' starts over.

Pro Tips

  • Always guess the middle of what's left. On 1–100 that's 50, then 75 or 25, then halve again. This finds any number in 7 guesses or fewer.
  • Numbers outside the range and repeated guesses get a warning and don't use up an attempt.
  • Playing with a friend instead? The person hiding the number can pick it with the Random Number Generator to keep it fair.

Use Cases

Ways people use the game:

Showing how binary search works

A hands-on version of the algorithm.

Example: Each guess halves the range, and 2⁷ = 128 covers 100 numbers. That's why 7 attempts are always enough on Medium.

Number sense for kids

Easy mode practices bigger and smaller.

Example: Read each hint aloud and ask, 'So what should we try next?'

A two-minute brain game

Chase streaks and low guess counts.

Example: 'Game Statistics' tracks win rate, average guesses, best streak and best score for each difficulty.

Frequently Asked Questions

Is there a way to always win?

Yes. Guess the midpoint of the remaining range every time. That needs at most 6 guesses on Easy, 7 on Medium and 8 on Hard, and each level gives you at least that many.

How do I unlock achievements?

'First Victory' comes with your first win, 'Game Veteran' at 10 wins, 'Streak Master' for 5 wins in a row, and 'Mastermind' for solving Hard in 5 guesses or fewer.

Are my stats saved?

Yes. Statistics and achievements are saved in this browser and stay after a refresh.

Why Use This Tool?

A round takes under a minute, and once you know the midpoint trick anyone can win, which makes it an easy way to learn binary search.

Related Tools