Connect via MCP →

Enter Calculation

Generate a random whole number between 1 and 100. Each pick is independent, so repeats can occur.

Formula

Formula: Random Number Generator (1 to 100)
Show calculation steps (1)
  1. Probability of a specific number

    Probability of a specific number: Random Number Generator (1 to 100)

    With 100 equally likely outcomes, any chosen number appears with probability 1 in 100.

Advertisement

Results

Pick # 1
45
random integer between 1 and 100
Pick number 1
Range 1 to 100 (inclusive)
Probability of any specific number 1%

Press Pick for a new independent draw; Reset sets the counter back to 0. Repeats are possible.

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.

Grid of 100 equal squares with one highlighted, showing each outcome equally likely
Each of the 100 numbers is equally likely, a 1% chance per pick.

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\%$$

Advertisement
Diagram mapping a uniform value U between 0 and 1 onto integers 1 to 100
A uniform random value U is scaled and floored to produce an integer from 1 to 100.

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.

Last updated: