Random number between 1 and 2

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

Probability facts for 1–2

QuestionAnswer
Chance of one specific number1 in 2 (50%)
Chance of an even number1 of 2 = 50%
Chance of a prime number1 primes = 50%
Average result (expected value)1.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 1. 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
150% (1/2)
250% (1/2)

Similar ranges

Frequently asked questions

What is the chance of guessing a number between 1 and 2?
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.