Generators

Random Number Generator

Generate random numbers in any range, with or without repeats.

Results are provided for general informational use. Verify important financial, health or legal figures before relying on them.

About this Random Number Generator

The Random Number Generator picks one or many numbers between a minimum and a maximum that you choose. Both ends of the range are included, you can ask for whole numbers or up to six decimal places, and you can switch on a no-repeats option when every number must be different. It uses the cryptographic random source built into your browser and a method that gives every possible value exactly the same chance.

People use random numbers for far more than games. Teachers pick students, organisers draw raffle tickets, developers create test data, researchers choose survey participants and friends settle arguments with a dice roll. A generator that is fair and quick removes human bias from these choices, because people are poor at producing randomness on their own and tend to favour numbers such as 7 and 17.

How the calculation works

For whole numbers the tool counts the values in the range, which is maximum minus minimum plus one, and draws a uniform random position in that range. Each value has a probability of one divided by that count. Decimals are generated by scaling the range, for example two decimal places multiply it by 100, drawing a whole number and dividing back. With no repeats the tool shuffles the possible values and takes the first ones, so no value can appear twice.

How to use it

  1. Enter the minimum and maximum of the range, both of which can be picked.
  2. Choose how many numbers you need and how many decimal places, if any.
  3. Tick No repeats if every number must be different, and Sort if you want them in order, then press Generate and copy the result.

Practical example

To choose five different raffle tickets from 1 to 50, enter a minimum of 1, a maximum of 50, a count of 5 and tick No repeats. The tool might return 38, 7, 21, 49, 14. Each ticket had a one in 50 chance on the first draw, and the same ticket cannot be chosen twice.

For a decimal example, set the minimum to 0, the maximum to 1, two decimal places and a count of three. A possible result is 0.42, 0.87, 0.05. Each of the 101 values from 0.00 to 1.00 is equally likely.

Things to double-check

Check the range before you generate. If you want ten values between 1 and 10 without repeats, you will get all ten numbers in a random order, which may not be what you expect. Decimal results are rounded to the places that you choose, and very large counts are limited to 1,000 per press to keep the page responsive.

How the generator works

Computers cannot flip a coin, so they rely on a source of unpredictability. Modern browsers collect noise from the operating system, such as timing of hardware events, and feed it into a cryptographically secure random generator. This tool asks that generator for 64 random bits and turns them into a position in your range. If the random value falls in a small leftover zone that would favour lower numbers, the tool throws it away and draws again. This is called rejection sampling, and it is what makes the result uniform instead of slightly biased toward the start of the range.

Inclusive ranges and probability

Because both ends are included, the number of possible values is the maximum minus the minimum plus one. For 1 to 100 that is 100 values, so each value has a probability of 1 percent on every draw. For 0 to 9 there are ten digits with 10 percent each. The average you should expect over many draws is the midpoint, which is the minimum plus the maximum divided by two. For 1 to 100 that is 50.5. In a short list the average will vary, and that variation is a normal property of random data rather than a fault in the generator.

Whole numbers and decimals

Choose zero decimal places for whole numbers such as ticket numbers, ages or dice rolls. Choose one to six decimal places when you need values such as 3.14 or 0.482. The tool scales your range by ten to the power of the decimal places, draws a whole number in the scaled range and places the decimal point back. This gives every allowed decimal value the same chance. For example, with two decimals between 0 and 1 there are 101 possible values. Remember that decimals are rounded to the places shown, so they are not suitable for measurements that need unlimited precision.

With repeats and without repeats

When repeats are allowed, every draw is independent, so the same number can appear twice in a row. This is how dice and coins behave. Without repeats, each number can appear only once, as in a lottery draw where balls are not put back. The tool achieves this by shuffling the available values and taking the first few. If you ask for more different numbers than exist in the range, the tool tells you, because the request is impossible. Use no repeats for raffles, seating plans and drawing lots, and allow repeats for simulations and games.

Everyday uses

A random number generator is a small tool with many uses. Teachers can choose a roll number to ask a question. Organisers can draw a winning ticket or assign teams. Game masters can roll a die with a range of 1 to 20. Programmers can create test data, such as random ages or prices. Photographers and writers use random numbers for creative prompts. Families use them to decide who goes first or who does the chore. In each case the value is that nobody can argue that the choice was biased, because the process treats every number alike.

Choosing numbers for lotteries and games

Many people use a generator to fill in a lottery ticket. The tool can do it, for example six different numbers from 1 to 49 with no repeats. It is worth knowing the odds: there are 13,983,816 ways to choose 6 numbers from 49, so any single ticket has about a one in 14 million chance of matching all six. A random pick is no more or less likely to win than the numbers of a birthday, although random picks are less likely to be shared with other players. The generator cannot predict or improve your chances.

Randomness myths

Random does not mean evenly spread. A short random list often contains clusters, repeats and gaps, and that is normal. The gambler's fallacy is the belief that a number is due because it has not appeared lately. In an independent draw the chance is the same every time, so after five heads in a row the next flip is still 50 percent heads. The birthday paradox shows how surprising coincidences are: with only 23 people there is about a 51 percent chance that two share a birthday. Do not read patterns into short random sequences.

Secure randomness versus ordinary randomness

Programming languages often provide a simple generator, such as Math.random in JavaScript, that is fast but predictable if an attacker learns its internal state. Such generators are fine for animations and games but not for security. This tool uses the browser's cryptographic generator, which is designed to be unpredictable. That makes it suitable for choosing a winner fairly, though not for secrets by itself. If you need a password, an identifier or a token, use the Password Generator or the UUID Generator, which are built for that job.

Fair sampling for surveys and experiments

Researchers often need a simple random sample, where every member of a group has the same chance of being chosen. You can number your list from 1 to the group size, generate the number of different values that you need and choose the people with those numbers. Using a generator protects you from the unconscious bias of picking people who are easy to reach. For serious research, record the range, the count and the date of the draw, so that others can understand how the sample was made, and follow your institution's ethics rules.

Common mistakes

A common mistake is to forget that the range is inclusive, which leads to an off-by-one error when picking from a list. Another is to number a list from 0 while generating from 1, so the last item is never picked. People also ask for more unique numbers than the range holds, mix up decimal places with the size of the range, or reject a result because it looks too regular. If a draw has legal or financial consequences, do not rely on a web tool alone, and keep a record of who witnessed the draw.

Tips, privacy and limits

Write down the range and rules before you press the button, so that the process is fixed in advance. For raffles, show the screen to the participants. All numbers are produced inside your browser and are not sent to Dekuz or stored. Results cannot be reproduced, and the tool is not an audited gaming system, so it should not be used for regulated lotteries, gambling or draws that require certification. If you find a result that seems wrong, or you would like another option, please tell us through the contact page.

Frequently asked questions

Are the numbers really random?

They come from your browser's cryptographically secure random generator and are mapped to your range without bias, so every value has the same chance. They are suitable for games, classroom activities and testing, but not for regulated lotteries.

Are the minimum and maximum included?

Yes. A range of 1 to 6 can return 1, 2, 3, 4, 5 or 6, just like a die.

Can I generate numbers without repeats?

Yes. Tick No repeats and the tool will give each number at most once, as long as the range holds at least as many values as you ask for.

Can I get the same sequence again?

No. The generator cannot be seeded, so each press gives a new unpredictable result. If you need a repeatable sequence for software tests, use a seeded generator in your own code.

Is it safe to use for passwords?

A number alone is a weak password. Use the Password Generator for secrets, because it combines letters, numbers and symbols and lets you choose a long length.

Keep exploring

More Generators

View category →