What this tool does
This Random Number Generator produces a single whole number between 1 and 100 every time you press Pick. The range is fixed, so there are no boxes to fill in: just click and read the big number. A small counter labelled "Pick # N" keeps track of how many numbers you have drawn since the last reset, which is handy for games, raffles, classroom activities, sampling, or simply making a decision.
How to use it
Press Pick to draw a new number. Each press is an independent draw, so the same value can appear more than once across picks (this is expected, not a bug). Press Reset to set the counter back to 0; your next pick will then be labelled "Pick # 1".
The formula explained
The generator uses the standard uniform-integer formula: $$\text{randomNumber} = \text{min} + \left\lfloor U \times (\text{max}-\text{min}+1) \right\rfloor$$ where \(U\) is a pseudo-random float in the half-open interval [0, 1). With min = 1 and max = 100 this becomes $$\text{randomNumber} = 1 + \left\lfloor U \times 100 \right\rfloor$$ Using floor (not rounding) keeps every integer equally likely — rounding would bias the two endpoints. Because \(U\) never quite reaches 1, \(\left\lfloor U \times 100 \right\rfloor\) tops out at 99, so the result tops out at exactly 100 and never reaches 101. Every number therefore has the same probability of $$P = \frac{1}{100} = 0.01 = 1\%$$
Worked example
Suppose the engine produces \(U = 0.752\). Then $$\text{randomNumber} = 1 + \left\lfloor 0.752 \times 100 \right\rfloor = 1 + \left\lfloor 75.2 \right\rfloor = 1 + 75 = 76$$ shown as "Pick # 1". Press Pick again with \(U = 0.009\) and you get \(1 + \left\lfloor 0.9 \right\rfloor = 1 + 0 = 1\), shown as "Pick # 2".
FAQ
Can the same number come up twice? Yes. Each pick is independent, so duplicates across separate picks are normal and valid.
Are 1 and 100 both possible? Yes, both endpoints are included. You can draw exactly 1 or exactly 100.
Is this cryptographically secure? No. It is a pseudo-random generator (PRNG) suitable for games and everyday choices, but not for security, lotteries with money, or cryptography.