Calculatorby CodingMarble
All calculators

Random Number Generator

Set the lowest and highest number, how many you need and whether repeats are allowed, then press Calculate to draw a fresh set of random numbers.

Up to 1,000 numbers at a time.

Your result appears here.

What is a random number generator?

A random number generator (RNG) picks numbers by chance so that every value in a range is equally likely. Set a minimum and maximum, choose how many numbers you want, and this online random number generator draws them instantly. It can pick a single random number from 1 to 100, generate a list with no repeats, include decimals, and sort the results. It is free, needs no app, and is useful for lucky draws, lotteries, tambola (housie), classroom games, sampling and deciding who goes first.

How to use the random number generator

  1. Enter the minimum and maximum. Both ends are included, so 1 to 10 can return 1 or 10.
  2. Enter how many numbers you need (up to 1,000).
  3. Choose No repeats for unique numbers, like drawing tickets from a box, or Allow repeats, like rolling a die several times.
  4. Pick whole numbers or up to 3 decimal places, and the order you want.
  5. Press Calculate for a new draw each time.
UseMinMaxCount / repeats
Random number 1–101101
Random number 1–10011001
Coin toss / yes or no (1 = yes, 2 = no)121
Dice roll161 per die, repeats allowed
Tambola / housie / bingo caller19090, no repeats (full calling order)
US bingo17575, no repeats
Lottery quick pick (6 of 49)1496, no repeats, sorted
6-digit code or PIN1000009999991
Zero through nine (single digit)091

For a tambola game, set 1 to 90, count 90 and no repeats: the list is a complete random calling order. Read the numbers out one by one and players mark their tickets.

Random numbers without repeating

With “No repeats”, each value can appear only once, exactly like pulling numbered chips out of a bag without putting them back. So the random number generator 1-100 no repeats can give at most 100 numbers. If you ask for more unique numbers than the range holds, the tool tells you instead of looping forever. Internally it uses a Fisher–Yates shuffle for large draws, which gives every ordering the same chance.

Random numbers with decimals

Choose 1, 2 or 3 decimal places to get values such as 3.7 or 42.19. For a random decimal between 0 and 1, set min 0, max 1 and 3 decimals. Each allowed value (0.000, 0.001, … 1.000) is equally likely.

How does a random number generator work?

Computers are deterministic, so most software uses a pseudo-random number generator (PRNG): an algorithm that starts from a seed and produces a sequence that looks random and passes statistical tests. This page uses your browser’s cryptographic generator (Web Crypto) where available, which is seeded from unpredictable system events and is much stronger than a simple PRNG. It also avoids “modulo bias”, so every number in your range has exactly the same probability.

True random number generators (TRNGs) instead measure physical noise – electronic noise, radioactive decay or quantum effects. A quantum random number generator uses the unpredictability of quantum measurements. For games, raffles and classroom picks, a good pseudo-random generator is more than enough; for cryptographic keys, use certified hardware or your operating system’s secure generator.

The random number formula

random integer = min + floor(r × (max − min + 1))

where r is a uniform random fraction from 0 (inclusive) to 1 (exclusive). With min 1 and max 6, r = 0.52 gives 1 + floor(0.52 × 6) = 1 + 3 = 4.

Random numbers in Excel, Python and JavaScript

  • Excel / Google Sheets: =RANDBETWEEN(1,100) for an integer, =RAND() for a decimal from 0 to 1. In Excel 365, =RANDARRAY(10,1,1,100,TRUE) gives 10 integers at once. Values recalculate each time the sheet changes.
  • Python: import random, then random.randint(1, 100) for an integer or random.sample(range(1, 101), 10) for 10 numbers without repeats. NumPy users can call numpy.random.default_rng().integers(1, 101, 10).
  • JavaScript: Math.floor(Math.random() * 100) + 1 gives 1–100.
  • Java: new Random().nextInt(100) + 1; C++: std::uniform_int_distribution with std::mt19937.

What is a random number table?

Before computers, statisticians used printed random number tables: long blocks of digits in which each digit 0–9 appears with equal chance and without pattern. To draw a sample, you start at a random point and read off digits in groups. A random number generator does the same job faster, and in statistics it is used for simple random sampling, assigning people to groups in experiments and Monte Carlo simulation. After you draw a sample, the average calculator and standard deviation calculator help summarise it.

Fairness tips for draws and contests

  • Number the entries first (1 to N), then draw with no repeats. Announce the range before drawing.
  • Screen-share or record the draw so participants can see it was done once.
  • Number patterns in past draws do not predict future ones; each draw is independent. No tool or trick can make you win a lottery or a colour prediction game, and apps that claim to “hack” an RNG are scams.

Random number generator 1 to 10 (and zero through nine)

For a random number generator from 1 to 10, set Minimum to 1 and Maximum to 10 and press Generate: each whole number between 1 and 10 has exactly a 1-in-10 chance. For a random number generator 1-10 draw of several unique numbers, set "How many" and keep "No repeats". For digits zero through nine, set Minimum 0 and Maximum 9.

Random number generator without repeating

With "No repeats", the random number generator without repeating works like drawing balls from a bag: once a number is drawn, it cannot come up again. You can draw at most as many numbers as the range holds, for example all 10 numbers from 1 to 10 in a shuffled order.

What is random number generation and how it works

What is random number generation? It is producing numbers that no one can predict, where every allowed value is equally likely. How a random number generator works: a pseudo-random generator starts from a seed and applies a formula to produce a long sequence that looks random; a cryptographic generator, like the one this page uses, mixes in unpredictable events from your device so the next number cannot be guessed.

Random number generator formula

How to calculate a random number generator output in a range: take a uniform random value r between 0 and 1 and use floor(r × (max − min + 1)) + min. With r = 0.734, min 1 and max 10: floor(0.734 × 10) + 1 = 8. A classic pseudo-random formula is the linear congruential generator: Xn+1 = (a × Xn + c) mod m.

Random number generator in Python, JavaScript, Java, C and C++

  • Random number generator in Python: import random; random.randint(1, 10) includes both ends. Use random.sample(range(1, 91), 6) for no repeats and the secrets module for security.
  • Random number generator in JS / JavaScript: Math.floor(Math.random() * 10) + 1; use crypto.getRandomValues() when it must be unpredictable.
  • Random number generator in Java: ThreadLocalRandom.current().nextInt(1, 11) (the upper bound is exclusive).
  • Random number generator in C: srand(time(NULL)); int n = rand() % 10 + 1; (fine for games, slightly biased and not secure).
  • Random number generator C++: std::mt19937 g(std::random_device{}()); std::uniform_int_distribution<int> d(1, 10); d(g);

Random number generator xkcd joke

The famous xkcd comic "Random Number" shows a function that always returns 4, "chosen by fair dice roll". It is a reminder that a number being random once does not make a generator random.

Random number generator for tambola, housie, bingo and lottery

For tambola or housie in India, use a random number generator for tambola with range 1 to 90, How many = 90, "No repeats" and order "As drawn". You get all 90 numbers in a shuffled order and call them one by one, so no number can come up twice. A random number generator for bingo uses 1 to 75 for US-style bingo or 1 to 90 for UK-style. For a lottery-style pick, such as 6 numbers from 1 to 49, set How many to 6 and sort smallest to largest. Every combination is equally likely, so no pick improves your odds.

Random number generator with names

To pick a random name, number your list (1 = Asha, 2 = Rahul, …) and generate a number in that range. For a visual draw, the spin the wheel tool works as a random number generator wheel you can spin with names or numbers.

Random number generator yes or no, dice and spin

  • Yes or no: set 1 to 2 and decide first that 1 = yes and 2 = no.
  • Dice: 1 to 6 with repeats allowed is one die; for several dice and totals use the dice roller.
  • Spin: a spin wheel with equal slices is the same as a random number generator over the slice numbers.

Random number generator with OTP-style codes

For a practice 6-digit code, set 0 to 999999 and pad with leading zeros (4821 becomes 004821). Real OTPs for logins and payments must be created and checked by the service's server, not by a public web page.

Random number generator table

To build a random number generator table for sampling, generate the count you need (for example 50 numbers from 1 to 500 without repeats) and copy them into a spreadsheet column. Sort them if you want to find the chosen items quickly.

Random number generator verification for fair draws

A single result cannot prove fairness. For random number generator verification in a contest, announce the range and rules first, record the screen during the draw, and keep the output. To test a generator itself, draw thousands of numbers and check that each value appears about equally often, for example with a chi-square test.

Random number generator app for mobile in India and elsewhere

This page works as a random number generator app on mobile: open it in any phone browser, in India or anywhere, with no download or sign-up. The numbers are generated on your device.

Frequently asked questions

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

Set the minimum to 1, the maximum to 100 and the count to 1, then press Calculate. Each number from 1 to 100 has an equal 1% chance.

Can I generate random numbers without repeats?

Yes. Choose No repeats and every number in the list will be different, like drawing tickets from a box. You can draw at most as many numbers as the range contains.

Is this random number generator truly random?

It uses your browser’s cryptographic random generator where available, which is unpredictable and unbiased for practical purposes. It is pseudo-random rather than based on physical noise, which is fine for games, raffles and sampling.

How do I use it as a tambola or housie number generator?

Set 1 to 90, count 90 and no repeats. The list is a full random calling order; call the numbers out one at a time.

How do I get random decimal numbers?

Choose 1, 2 or 3 decimal places. For example, min 0, max 1 and 2 decimal places gives values like 0.37.

What is the formula for a random number?

A random integer between min and max is min + floor(r × (max − min + 1)), where r is a uniform random fraction between 0 and 1.

How do I generate random numbers in Excel?

Use =RANDBETWEEN(min, max) for whole numbers or =RAND() for decimals between 0 and 1. The values change every time the sheet recalculates.

Can a random number generator be predicted or hacked to win games?

No. Each draw is independent, and past results do not predict the next one. Apps claiming to predict lottery or colour prediction game results are not trustworthy.

How do I get a random number between 1 and 10?

Set Minimum to 1 and Maximum to 10 and press Generate. Each number from 1 to 10 has a 10% chance.

What range should I use for tambola or housie?

Use 1 to 90, How many = 90 and No repeats, then call the shuffled list in order.

Last updated 2026-09-18

Related calculators

Designed & built with care by This calculator site, LovePDF and LoveImage are made in India by the CodingMarble team — websites, web apps and SEO-first tools.Visit CodingMarble