Random Number Generator – 1 to 100 | dice83 

Random Number: 1 to 100

Every integer equally likely. Uniform distribution, generated in your browser.

1  …  100  ·  100 possible values
1 E[X]=50.5 100
or press Space
Statistics
0
Generated
Min Seen
Max Seen
Average
50.5
Expected
Distribution across range
Average convergence toward 50.5

The Mathematics of Uniform Random Integers

A uniform random integer generator assigns exactly equal probability to every value in its range. For 100 values (1 to 100), each integer has a probability of exactly 1/100 ≈ 1.00%. No value is favored. No pattern exists. Each generation stands statistically independent of every previous one, meaning the output "42" has zero influence on whether "42" appears next. Pierre-Simon Laplace formalized this principle in the 18th century as the foundation of classical probability theory, and it remains the starting point for every introduction to statistics.

Expected Value and Spread

The expected value of a uniform random integer over [1, 100] is the arithmetic midpoint: 50.5. Generate a thousand numbers from this range, compute their mean, and the result will sit remarkably close to 50.5. The convergence chart above makes this visible in real time. Jacob Bernoulli proved this convergence property in 1713; it remains one of the most important theorems in probability theory.

The standard deviation measures how far individual results typically stray from that center. For a uniform range of N values, the standard deviation equals √((N² − 1) / 12). For your range of 100 values, that works out to approximately 28.9. About two-thirds of results fall within one standard deviation of the expected value, and the remaining third occupies the outer edges. Every region receives its fair share: that is what "uniform" means.

The Birthday Collision Surprise

How many random numbers must you generate before two of them match? Intuition says the answer should be close to the range size. Mathematics disagrees. The birthday problem proves that collisions appear far sooner than expected. For a range of N values, the 50% collision threshold arrives after roughly √(N × π / 2) draws. For the range 1 to 100 (100 values), a duplicate becomes likely after approximately 13 draws. Watch the distribution histogram above: with enough generations, some buckets accumulate faster than others by pure chance. These clusters are genuine randomness, the opposite of bias.

Cryptographic Fairness

Every number on this page comes from crypto.getRandomValues(), the Web Cryptography API specified by the W3C and implemented in every modern browser. This is the same entropy source that generates encryption keys for online banking and TLS certificates. The randomness originates from hardware-level physical processes in your device: thermal noise in silicon, timing jitter in oscillators, and other quantum-mechanical phenomena that are fundamentally unpredictable.

The generator uses rejection sampling to eliminate modulo bias. A naive approach (random_value mod range) slightly favors smaller values when the range does not evenly divide the 32-bit source space. Rejection sampling discards values outside the largest exact multiple of the range and redraws, guaranteeing perfect uniformity across all 100 possible outputs. Your number is generated entirely on your device. The server delivered this page and its work is finished.

In the Classroom

Have each student visit /integer/20/1/10 and generate 20 numbers from 1 to 10. Each student tallies how many times each value appeared. Compare tallies across the room: every student gets a different distribution, yet the class average for each value converges toward 2.0 (20 draws ÷ 10 values). That tension between individual variation and collective convergence is the core lesson of statistical sampling.

For a more advanced exercise, use /integer/50/1/365 to simulate the birthday problem. Generate 50 numbers from 1 to 365 and check for duplicates. Nearly every student will find at least one collision, often several. Ask students to predict the threshold before generating, then compare predictions to the mathematical formula √(365 × π / 2) ≈ 24. The gap between intuition and reality opens a productive conversation about probabilistic reasoning. The tool requires no accounts, collects no student data, and works on any device with a browser.

Private by Architecture

The random integer engine runs entirely inside your browser. The server delivers this page. Your device creates every outcome. Your generation history stays in localStorage on your device, under your control alone. The server keeps no accounts, stores no results, and sets no tracking cookies. Sharing is inherently safe: the recipient gets the same tool configuration, and their device generates its own independent results from its own hardware entropy.

Customize Through the URL

The URL defines the tool completely. Type your range and count directly into the address bar:

Pick a Range

Common ranges as quick links, or type your own below.

How many?
Custom

Is Your Number Bigger?

Share the link. Same range, different result. See who draws higher.

Design excellence, every day.

Jury-selected work from the A' Design Award, presented fresh each morning.