← All text tools

Number Guessing Game

Guess a secret number in as few tries as possible with higher or lower hints, a range and attempt limit you choose, and the best possible tries as par.

  • Free
  • No sign-up
  • Works on any device

About Number Guessing Game

The page secretly picks a whole number in the range you choose, and you try to find it in as few guesses as possible. After each guess you are told whether the number is higher or lower, and the known range narrows. You can set an attempt limit, or leave it at 0 for unlimited tries. Par is the number of guesses that a perfect halving strategy always needs: for 1 to 100 it is 7, because 2 to the power of 7 is 128, enough to cover 100 numbers. Beat par and you were lucky.

How to use Number Guessing Game

  1. Set the smallest and largest number, and an attempt limit if you want one.
  2. Type a guess and press Guess, then use the higher or lower hint.
  3. Aim for par, the number of tries that always works if you guess the middle each time.

Why use this tool?

Also known as

Frequently asked questions

What is par in this game?

Par is the worst-case number of guesses when you always split the remaining range in half. It equals the whole number part of log base 2 of the range size, plus one.

Is the secret number truly random?

Yes. It is chosen with your browser's secure random generator, and every number in the range has the same chance.

Can I play with a very small or large range?

Yes, any range of whole numbers up to about a billion, including negative numbers. A range of one number is guessed in one try.

Is Number Guessing Game free?

Yes. Number Guessing Game on Toolipedia is free to use, with no sign-up and no watermark.

Is it safe to use?

Yes. Everything is worked out in your browser, and nothing you enter is sent to our server.

Does it work on my phone?

Yes. It works in any modern browser on Android and iPhone, as well as on tablets and computers. There's nothing to install.

Do I need an account?

No. Just open the page and use the tool. There's no sign-up and no email needed.

Can I put Number Guessing Game on my own website?

Yes. Use the Embed on your site button under the tool to copy a short piece of code and paste it into your page. It is free, needs no account, and the tool keeps working inside your page.

Related tools