Random Number Generator

Draw fair random numbers between any two values you choose.

Last updated 2026-11-26 · How we calculate this

Choose Your Range

A whole number from −1,000,000,000 to 1,000,000,000. It can come up in the draw.
A whole number no lower than the lowest number, up to 1,000,000,000. It can come up in the draw.
From 1 to 1,000 numbers.
Choose whether the same number can come up more than once.
Show the numbers in the order drawn or from smallest to largest.

Your Numbers

Choose your range and how many numbers you want, then press Generate. The highest number must be at least the lowest, and both must be whole numbers.

The generator draws whole numbers only, from −1,000,000,000 to 1,000,000,000 and up to 1,000 at a time. Nothing is stored or recorded, so for an official prize draw, keep your own record of the result, for example a screenshot with the time showing, and check your local rules on running raffles.

Quick Answer

Set the lowest and highest numbers, choose how many you want and press Generate. Every whole number in the range, including both ends, has the same chance of being picked. From 1 to 100 there are 100 possible numbers, so each one has a 1 in 100 chance on any single draw.

How to Use This Calculator

Choose a range, say how many numbers you need and whether a number may come up more than once, then press Generate. The numbers come from your browser's built-in secure random source, the same kind used for encryption, and every number in the range is equally likely. Use it to pick a raffle winner, roll a virtual die, choose lottery numbers, split people into groups or settle who goes first.

  1. Enter the lowest and highest numbers.
  2. Choose how many numbers you want.
  3. Pick whether repeats are allowed and how the numbers are ordered.
  4. Press Generate, and press it again for a fresh draw.

The Formula

Chance of each number = 1 ÷ (highest − lowest + 1)

Each draw takes a secure random value and maps it onto the range in a way that gives every whole number exactly the same share, so no number is favored. With "No repeats", a number that has already come up is drawn again until a new one appears, which works like pulling tickets from a hat without putting them back. The chance shown is for the first draw; with no repeats, each later draw has one fewer number to choose from.

Worked Example

A six-sided die: lowest 1, highest 6, one number. Each face has a 1 in 6 chance on every roll.

Lottery numbers: lowest 1, highest 49, six numbers, no repeats, smallest first. The chance of a ticket matching all six is 1 in 13,983,816.

A raffle with tickets numbered 1 to 250: one number picks the winner, and each ticket has a 1 in 250 chance. Draw three with no repeats for first, second and third place.

Frequently Asked Questions

Are the numbers truly random?

They come from the cryptographically secure random source built into your browser, which is designed to be unpredictable even to someone who has seen earlier results. That is stronger than the simple random functions many websites use, and it is fair for games and everyday draws.

Can a number come up twice?

With "Allow repeats" it can, just as a die can land on 4 twice in a row. Choose "No repeats" when each result has to be different, such as raffle winners or lottery numbers. With no repeats you can draw at most as many numbers as the range holds.

How do I pick lottery numbers?

Set the range your game uses, such as 1 to 69, the count of main numbers, and "No repeats". Choose "Smallest first" so the numbers are easy to copy onto a slip. Random picks have the same chance of winning as any other set, including numbers you choose yourself.

Can I use negative numbers?

Yes. The lowest number can be below zero, so a range of −10 to 10 holds 21 possible numbers, including 0. That is handy for test data, board games with penalties, or picking a random temperature or offset.

Is it fair for a giveaway?

Each entry number has the same chance, so the draw itself is fair. Number your entries first, for example in the order they arrived, then generate one number per prize with no repeats. Share a screenshot of the draw so entrants can see the result.

Why don't the numbers change until I press Generate?

A draw happens only when you ask for one, so a result never changes while you are reading it. Changing the range or any setting clears the old numbers, because they may no longer fit the new settings. Press Generate again for a fresh set.

Sources: MDN Web Docs, Crypto: getRandomValues() method; NIST, Random Bit Generation