Arithmetic & Numbers

Random Number Generator 1-100

Pick a random number from 1 to 100, or set any minimum and maximum.

Try

From 1 to 1,000.

More options Type of number, Order, Seed
Type of number

The same seed and settings always give the same numbers. Generate picks a fresh seed.

Result

Random whole number from 1 to 100: 39

Random whole number from 1 to 100

39

Possible values
100
Chance of each value per draw
1 in 100 (1%)
SeedEnter it again later to reproduce this result.
20261021

Each of the 100 possible values had the same chance, 1 in 100, on every draw.

Not suitable for cryptography, passwords, gambling or legally regulated draws: the numbers are pseudorandom and anyone with the seed can reproduce them.

Step-by-step working (3 steps)
  1. Count the possible values

    The values are from 1 to 100: 100 in all, both ends included.

  2. Start the generator from the seed

    The seed "20261021" is hashed into the starting state of the xoshiro128** generator, so the same seed always gives the same sequence.

  3. Draw each number independently

    Each draw picks one of the 100 values. Raw outputs that would favor some values (modulo bias) are rejected and redrawn.

Every whole number in the range is equally likely: the chance is 1N\frac{1}{N} with N=max−min+1N = \text{max} - \text{min} + 1, so 1 in 100 for 1 to 100. Draw up to 1,000 numbers, with or without repeats, sorted or in draw order.

By Hira Noor, mathematicianLast reviewed Free, no sign-up, runs in your browserReport a problem

How to use this calculator

  1. The generator opens set to one whole number from 1 to 100. Press Generate for a new number as often as you like.
  2. To change the range, enter the minimum and the maximum. Both ends are included, and negative numbers are allowed. The buttons above the form fill common ranges such as 1 to 10 and 1 to 1,000.
  3. Enter how many numbers you want, from 1 to 1,000. Tick No repeats when each value may appear only once, as when picking names, tickets or students.
  4. Open More options to switch to decimals and set the decimal places, to sort the numbers, or to type a seed.
  5. Press Copy to copy every number. To reproduce a list later, note its seed: the same seed and settings always give the same numbers.

Formulas

Uniform whole numbers

P(X=k)=1b−a+1,k=a,a+1,…,bP(X = k) = \frac{1}{b - a + 1}, \quad k = a, a + 1, \ldots, b

Plain-text formula: P(X = k) = 1/(b − a + 1), k = a, a + 1, …, b

aa
minimum
bb
maximum

Each whole number from a to b has the same chance; from 1 to 100 that is 1100\frac{1}{100}. Draws use rejection sampling, which discards the few raw generator outputs that would otherwise make some values slightly more likely (modulo bias).

Decimals with d places

X=k10d,k;uniform on;⌈10da⌉,…,⌊10db⌋X = \frac{k}{10^{d}}, \quad k;\text{uniform on};\lceil 10^{d} a \rceil, \ldots, \lfloor 10^{d} b \rfloor

Plain-text formula: X = k/10^d, k;uniform on;⌈10^d a⌉, …, ⌊10^d b⌋

A decimal is drawn as a whole number of steps of size 10−d10^{-d}, so every value with d decimal places in the range is equally likely, including the endpoints.

Chance of at least one repeat

P(repeat)=1−∏i=0n−1(1−iN)P(\text{repeat}) = 1 - \prod_{i=0}^{n-1} \left(1 - \frac{i}{N}\right)

Plain-text formula: P(repeat) = 1 − ∏_{i = 0}^(n − 1) (1 − i/N)

nn
number of draws
NN
number of possible values

For n draws with repeats allowed from N possible values. This is the birthday problem: with N=100N = 100 and n=10n = 10 it gives about 37%.

Long-run average

E[X]=a+b2E[X] = \frac{a + b}{2}

Plain-text formula: E[X] = (a + b)/2

Over many draws the mean approaches the middle of the range, 50.5 for 1 to 100. A small sample can be well away from it.

Reading the result

Random does not mean evenly spread. Ten draws from 1 to 100 contain at least one repeat about 37% of the time, and clusters and gaps are normal. Use No repeats when duplicates are not allowed.

For two or more numbers the result lists the smallest, the largest and the mean, and for 20 or more it adds a chart of how they are spread across the range. Expect uneven bars in small samples; they level out as the count grows.

Odds for numbers from 1 to 100

Each number from 1 to 100 has a 1 in 100 chance on every draw, whatever came before. Repeats are more likely than most people expect: the chance of at least one repeat passes 50% at 13 draws, for the same reason that two people in a group of 23 probably share a birthday.

Probabilities for whole numbers from 1 to 100
EventProbability
A given number, such as 37, on one draw1 in 100 (1%)
An even number on one draw1 in 2 (50%)
A number from 1 to 10 on one draw1 in 10 (10%)
A given number at least once in 10 draws, repeats allowed9.56%
A given number among 10 drawn with no repeats1 in 10 (10%)
At least one repeat in 5 draws9.65%
At least one repeat in 10 draws37.18%
At least one repeat in 13 draws55.72%
At least one repeat in 20 draws86.96%

Random numbers from 1 to 100 with no repeats

With No repeats the generator runs a partial Fisher–Yates shuffle over all the possible values and keeps the first ones, so every subset, and every order of it, is equally likely. Asking for all 100 numbers from 1 to 100 returns them in a random order, which is how to shuffle a list of 100 names or tickets.

You cannot draw more distinct values than exist: 10 different whole numbers between 1 and 6 is impossible, and the generator says so instead of looping forever.

How does a random number generator work?

A random number generator turns a source of unpredictability into numbers. True (hardware) generators measure a physical process, such as electronic noise or the atmospheric radio noise that RANDOM.ORG uses. Pseudorandom generators, used by almost all software, start from a number called the seed and apply a fixed formula that produces a long sequence passing statistical tests for randomness.

This page combines the two. Each press of Generate takes a fresh seed from your browser’s cryptographically secure random source. The seed is hashed into the starting state of xoshiro128**, a pseudorandom generator by David Blackman and Sebastiano Vigna, which produces the numbers. Rejection sampling then maps its 32-bit outputs onto your range without bias.

A pseudorandom sequence is predictable only to someone who knows both the seed and the algorithm. That suits games, classroom picks, informal raffles, simulations and random sampling, and rules it out for passwords, encryption and regulated lotteries.

Common ranges

As a random number picker the generator works for any range; the buttons above the form fill the most used ones. The chance of each value is one over the number of values in the range.

Common ranges for random whole numbers
RangeTypical useChance of each number
1 to 6Rolling a die1 in 6 (16.67%)
1 to 10Quick picks and guessing games1 in 10 (10%)
1 to 20A 20-sided die, small classes1 in 20 (5%)
1 to 50Raffle tickets, class lists1 in 50 (2%)
1 to 100Percentile rolls, number guessing, sampling1 in 100 (1%)
1 to 1,000Large ticket books, random IDs1 in 1,000 (0.1%)

Worked example

Pick 10 different raffle tickets numbered 1 to 100

A class raffle sold tickets numbered 1 to 100. Draw 10 winning tickets so that no ticket wins twice.

  1. Enter minimum 1, maximum 100 and how many 10, tick No repeats, and under More options sort from smallest to largest.
  2. There are 100 possible values, so each ticket has a 10 in 100, or 1 in 10, chance of winning.
  3. The generator runs a partial Fisher–Yates shuffle over 1 to 100 and keeps the first ten values, so no ticket can be drawn twice.
  4. With the seed 20261021 the sorted result is 11, 31, 37, 39, 45, 46, 52, 53, 80, 89.

Answer: Tickets 11, 31, 37, 39, 45, 46, 52, 53, 80 and 89 win. Keeping the seed lets anyone check the draw later; pressing Generate gives a different, equally likely set.

Frequently asked questions

How do I pick a random number between 1 and 100?

The generator opens set to one whole number from 1 to 100. Press Generate and read the number in the result. Each of the 100 numbers has the same 1 in 100 chance on every press, and both 1 and 100 can come up.

How do I get random numbers from 1 to 100 with no repeats?

Enter how many numbers you want, up to 100, and tick No repeats. A Fisher–Yates shuffle then picks distinct values, so no number appears twice. Asking for all 100 gives the numbers 1 to 100 in a random order.

Are the numbers truly random?

They are pseudorandom: each press of Generate takes a fresh seed from your browser’s secure random source, and a deterministic algorithm (xoshiro128**) turns it into numbers. They behave like random numbers for everyday and statistical use, but anyone who knows the seed can reproduce them.

Is every number equally likely?

Yes. Rejection sampling removes modulo bias, so each whole number from the minimum to the maximum, or each decimal with the chosen number of places, has exactly the same probability on every draw.

Why do I see repeated numbers?

Repeats are normal when they are allowed. In 10 draws from 1 to 100 there is about a 37% chance that some number appears twice. Tick No repeats to prevent them.

Why do people pick 37 when asked for a random number?

People asked for a “random” number from 1 to 100 tend to avoid round numbers, multiples of 10 and repeated digits, and lean towards odd numbers with mixed digits, such as 37 or 73, because they feel random. People are poor at producing randomness, which is why a generator is used. Here 37 has exactly the same 1 in 100 chance as 50 or 100.

Can I use this for a raffle or a lottery?

For an informal raffle, a classroom draw or a game, yes: number the entries, tick No repeats, draw as many winners as you need and keep the seed as a record. Do not use it for a regulated lottery, gambling or anything with legal requirements, or for passwords: those need certified or cryptographically secure generators and audited procedures.

Can I get the same numbers again?

Yes. The result depends only on the settings and the seed, so entering the same seed later, or opening a shared link, reproduces the same list. A blank seed uses a fixed default.

What is the largest range I can use?

The minimum and maximum can be anywhere from −10¹⁵ to 10¹⁵, and you can draw up to 1,000 numbers at a time.

Binomial Distribution Calculator

Exact and cumulative binomial probabilities for up to a million trials, with steps, a table and a graph.

Statistics & Probability

Statistics Calculator

Mean, median, mode, five-number summary, IQR, outliers and SD with steps, a histogram and a box plot.

Statistics & Probability

Percentage Calculator

Percent of a number, what percent, reverse percentages, change, increase, decrease and difference, with steps.

Arithmetic & Numbers

Scientific Calculator

Type or tap expressions with exact fractions, memory, variables, constants and complex mode.

Tools

Sources and further reading

  1. The Art of Computer Programming, Volume 2: Seminumerical Algorithms (Donald E. Knuth), Chapter 3: Random Numbers, Addison-Wesley
  2. xoshiro / xoroshiro generators and the PRNG shootout (David Blackman and Sebastiano Vigna) (opens in a new tab), Università degli Studi di Milano
  3. Introduction to Randomness and Random Numbers (Mads Haahr) (opens in a new tab), RANDOM.ORG
  4. Crypto: getRandomValues() method (opens in a new tab), MDN Web Docs

These numbers come from a pseudorandom generator and can be reproduced from the seed. Do not use them for cryptography, passwords, gambling, regulated lotteries or any draw with legal requirements.

Results are calculated in your browser with methods checked by automated tests, and are intended for learning and general use. For engineering, medical, financial, legal or safety-critical decisions, verify important values independently and follow the rounding rules your work requires. How accurate are these results?