Scheltrum

Random Number Generator

The box above gives a whole number from 1 to 100, both ends included, and redraws when you press the button. The pages under it fix the range so a link opens ready to use.

1 to 100 1

100 possible values, each equally likely. Tick nothing and repeats can happen; that is what random means.

Every page in this section

Do not use these numbers for anything secret

They come from your browser’s Math.random(). That is not a cryptographically secure random number generator: its results are produced from an internal state that someone who sees enough output can reconstruct, and then predict what comes next. It is fine for deciding who goes first, picking a seat, choosing a question, or settling something you are genuinely indifferent about. It is the wrong tool for anything where the outcome has value and someone has a reason to predict it: passwords, PINs, API keys, tokens, security codes, or a prize draw with real money behind it. For those, use a generator built on crypto.getRandomValues() or your operating system’s random device.

The odds

A range of 1 to 100 holds 100 values, so each has a 1 per cent chance, and 1 and 100 are as likely as anything in the middle. Any range of n values gives each one 1/n: 33.33 per cent on 1 to 3, 5 per cent on 1 to 20, 0.1 per cent on 1 to 1000. Draws are independent, so the last number has no effect on the next.

Repeats come sooner than you expect

People underestimate collisions badly in small ranges. Pull five numbers from 1 to 100 and there is already a 9.7 per cent chance two match. By ten draws it is 37.2 per cent, and by thirteen draws a repeat is more likely than not at 55.7 per cent. If you need distinct values, draw from a list and remove each one instead: the picker does that.

The ranges

If the range matches a die you own, the dice roller does the same job in one roll.