Random number between 0 and 1

Press Generate for a random whole number from 0 to 1, inclusive. There are 2 possible results, so each has a 1 in 2 chance (50%).

Probability facts for 0–1

QuestionAnswer
Chance of one specific number1 in 2 (50%)
Chance of an even number1 of 2 = 50%
Chance of a prime number0 primes = 0%
Average result (expected value)0.5
Standard deviation0.50
Chance a given number shows up at least once in 10 picks99.9%
Average picks to see every number at least once3

How it works

The generator draws a uniform random integer from 0 to 1 with crypto.getRandomValues and adds 0. Rejection sampling removes the small bias that the plain “random modulo 2” trick would cause.

With two outcomes this is a coin flip: 50/50 each time, independent of previous results.

Every outcome

NumberProbability
050% (1/2)
150% (1/2)

Similar ranges

Frequently asked questions

What is the chance of guessing a number between 0 and 1?
1 in 2, or 50% per guess.
Can the same number come up twice in a row?
Yes. Each pick is independent, so the chance of an immediate repeat is 1 in 2.