How Random Number Generators Work, in Plain English

When you press the button on a random number generator and get a 7, where did the 7 come from? The honest answer is more interesting than you might expect.

Computers are not naturally random

A computer follows instructions exactly, which is the opposite of random. So to get unpredictable numbers it has to borrow unpredictability from somewhere. Simple tools use a formula that produces numbers that look random. Better tools collect small, messy details from the device itself, such as tiny timing differences, and mix them in.

Two kinds of random numbers

The first kind is made by a formula that starts from a seed number. If you know the seed and the formula, you can predict every number that follows. That is fine for a video game, but it is not what you want for a prize draw. The second kind uses unpredictable input from the device and is built so that nobody can work out the next result. Modern browsers include this stronger kind, and it is what SpinPicker uses.

Fair means every number has the same chance

A fair 1 to 10 generator should give each number a one in ten chance, every time. A common mistake is to squeeze a big random value into a small range in a careless way, which quietly favours some numbers. A well-made tool avoids that by throwing away the awkward values and trying again, so the final result is evenly spread.

Why results can look suspicious

People expect random results to look mixed up, with no streaks. Real randomness has streaks. If you roll a 1 to 10 generator a hundred times, seeing the same number twice in a row is normal, and it will happen around ten times. Our article on streaks and patterns goes into this in more detail.

How to spot a weak tool

  • It asks you to pay or sign up just to pick a number.
  • It sends your list somewhere before showing a result.
  • It never explains how results are chosen.
  • It keeps showing the same few numbers more often than you would expect over many tries.

What to remember

A good random number generator is boring in the best way. Every number has an equal chance, nobody can steer the outcome, and your information stays on your device. If you want to see it in action, try the 1 to 10 generator and press the button a few dozen times.

Try the tools

Keep reading