Number Guess

Guess the secret number in few tries.

↑ This is Number Guess running right here in your browser — no download needed.

About the game

Number Guess is a logic game: the computer picks a secret number within a range, and you deduce it using higher-or-lower feedback.

How to play

Enter a guess; the game tells you if the secret is higher or lower. Narrow the range each turn until you find it.

Tips & strategy

['Always guess the midpoint to halve the range.', 'Track the known bounds after every hint.', 'Avoid random guesses; binary search is optimal.']

Advanced guide

Number Guess is won by binary search. After each hint, discard the half of the range that cannot contain the secret and guess the middle of the remainder. This guarantees finding any number in 1-100 within seven tries, with zero luck required.

History & origins

A staple programming exercise, Number Guess teaches the binary-search concept interactively.

Frequently Asked Questions

What is the fastest strategy?

Binary search - guess the middle of the current range every time.

How many guesses worst-case for 1-100?

At most 7, since 2^7 exceeds 100.

Can the range change?

Some versions vary the upper limit for difficulty.

What if I guess too high?

The game tells you 'lower', and you adjust the upper bound.

Is luck involved?

No - optimal play always finds it within log2(range) guesses.

Why is it educational?

It demonstrates efficient searching and feedback loops.

Where can I play Number Guess for free?

Right on this page — Number Guess is embedded above, free, legal, and with no download or sign-up. Play with your keyboard on desktop or touch controls on mobile. Your best score is saved in your browser, so it's still there next time. Every game here is original or open-source, with links that stay valid.

📝 Rate Number Guess

Played it? Give Number Guess a rating! It's saved in your browser and feeds live into the Game Rankings.

Related free games

Puzzle

Match-3

Swap adjacent gems to line up three.

Puzzle

Lianliankan

Match identical tiles through clear paths.

Puzzle

2048

Slide tiles to merge matching numbers and reach 2048.

Puzzle

Minesweeper

Clear the minefield using logical deduction.

Puzzle

Make 24

Combine four numbers with operators to make 24.

Puzzle

Mahjong Solitaire

Match free tiles to clear the layout.