Random Number Generator

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

Random Number Generator tool

About the Random Number Generator

Choosing a winner, assigning seats, picking a random sample or generating test data all need numbers that nobody can predict or influence. This random number generator produces one or many whole numbers between a minimum and maximum you set, with an option for unique values only, so no number repeats in a draw. It uses your browser's cryptographic random generator rather than a predictable formula, which matters when fairness is in question. Results can be sorted and copied for record-keeping. For drawing names instead of numbers, use the Random Name Picker, and for a visual draw, Spin the Wheel.

Turning on uniqueness stops any value from repeating within one batch, the behaviour a ticket draw or a numbered prize list demands. Leave it off and every number is drawn independently, so repeats can happen; that is the correct behaviour when simulating dice or coin tosses, where each throw is a fresh event. Sorting the output afterwards makes long lists of winners or sample rows much easier to read and check.

Numbers come from the cryptographic generator built into your browser, combined with rejection sampling so every value in your range is exactly as likely as any other. That may sound like a fine detail, but the common shortcut of taking a remainder gives the low end of a range a slightly better chance than the high end, which is unacceptable when a draw has to be fair. For giveaways and classroom draws, announcing the range and the rules before you generate the number keeps the result fair and transparent.

How to use the Random Number Generator

  1. Set the lowest and highest numbersBoth ends of the range can appear in the results.
  2. Choose how many to drawAsk for anything from a single value to a thousand values per press.
  3. Decide about repeatsSwitch on unique numbers for a draw, or leave repeats allowed for dice-style rolls.
  4. Generate the numbersPress the button for a new set, then copy it to the clipboard or download it as a text file for your records.

Random Number Generator features

  • Ranges that may start below zero
  • Between 1 and 1000 numbers at a time
  • Switch to forbid repeated values
  • Optional sorting of the results
  • Your choice of separator in the output
  • Cryptographic randomness without remainder bias
  • Clear warning when a unique batch is bigger than the range

Common uses

  • Choosing winners from a numbered entry list
  • Picking numbers for a lottery ticket
  • Rolling virtual dice or tossing virtual coins
  • Selecting random invoice or row numbers for a spot check or audit
  • Settling a decision nobody wants to make

Random numbers in practice: choosing students fairly, survey samples, audit checks, random group assignment and transparent draws

By the FreeToolsWorld editorial team · Updated November 2026 · How we write and check our guides

Random numbers remove personal choice from decisions that should be fair: who answers next, which households to survey, which records to audit, which group each participant joins. This guide uses random numbers to choose students in a class and covers survey sampling, audit checks, assigning groups for experiments, transparency and record-keeping.

A worked example: choosing students fairly

A teacher with 42 students wants five to present answers without anyone feeling singled out. Generating five unique numbers between 1 and 42 and calling the matching roll numbers takes seconds. Because the selection is random and visible on screen, students accept it as fair, and over weeks every student gets roughly equal chances to participate.

Survey samples

A researcher surveying 50 households from a list of 600 numbers the list and generates 50 unique random numbers in that range. A random sample avoids the bias of choosing convenient households, such as those nearest the road, which might differ systematically from the rest. Results from random samples can be generalised to the whole list with known uncertainty.

Audit checks

Businesses can check quality by sampling records at random, such as 20 invoices from 1,000 issued in a month. Random selection means no one can predict which records will be checked, which encourages accuracy throughout, and problems found in the sample indicate how common they are overall.

Assigning groups

Experiments and trials assign participants to groups randomly, so differences between groups come from the treatment rather than from how people were chosen. A teacher testing two revision methods can assign students to each method randomly using odd and even numbers or unique draws.

Transparency for draws

For prize draws and competitions, fairness must be visible. Number entries in a published order, generate the winner live or on a screen recording, and announce the number and entry together. Transparency protects organisers from accusations of favouritism.

Keep a record

Write down or screenshot the numbers generated, with the date and purpose. If anyone later questions a selection, the record shows what happened. For research and audits, recording the sample is also part of good documentation.

Unique or repeated

Some tasks need unique numbers, such as choosing distinct households, while others allow repeats, such as simulating dice rolls. Choose the right setting before generating, since drawing with repeats for a sample may select the same household twice.

Ranges and edges

Check that the range matches your list exactly, from the first number to the last, including both ends. A range set one short silently excludes the last entry, which matters in prize draws and samples alike.

Common mistakes

  • Choosing samples by convenience instead of randomly.
  • Running private draws without any record.
  • Allowing repeats when unique numbers are needed.
  • Setting ranges that leave out the first or last entry.

Related tools

To pick names directly from a list, use Random Name Picker. For games, try Dice Roller, and to shuffle a whole list into random order, List Randomizer.

Teaching probability

Generating hundreds of numbers from 1 to 6 and counting how often each appears shows students that results even out over many trials, with each value close to one sixth of the total. Small batches vary widely, which demonstrates why short runs can look unfair even when they are random.

People are poor at randomness

When asked to pick a random number between 1 and 10, people choose 7 far more often than chance would suggest and rarely pick 1 or 10. Human choices carry hidden patterns, which is why fair selection needs a generator rather than someone thinking of a number.

Exam seating

Random seating plans for exams separate friends and reduce opportunities for copying. Generating a random order for roll numbers and assigning seats in that order takes minutes, and students accept it more readily than a plan chosen by a teacher.

Random inspection times

Managers checking processes, such as cleanliness or safety, can generate random times or days for inspections. Unpredictable checks give a truer picture than fixed schedules, which people naturally prepare for in advance.

Rules for redraws

Before a prize draw, publish what happens if the selected entry is ineligible or cannot be contacted, such as drawing again after 48 hours. Clear rules agreed in advance prevent disputes when a redraw becomes necessary.

Numbering entries

For a fair draw, give each entry exactly one number in a clear, published order, such as the order comments were posted. Removing duplicate and ineligible entries before numbering avoids awkward redraws and complaints afterwards.

Large ranges

Random numbers can cover very large ranges, such as choosing a reference between 1 and 1,000,000. For lists longer than a few hundred entries, generating numbers is far quicker than drawing names, as long as the list is numbered carefully and the numbering is kept for checking afterwards.

Privacy

Numbers are generated in your browser with its secure random generator. Nothing is stored or sent anywhere.

Frequently asked questions

How random are the numbers?

They come from the browser's cryptographic random generator, the same source used to create encryption keys, rather than the everyday Math.random function. Rejection sampling ensures that no part of the range is favoured.

What is modulo bias, and why avoid it?

A common shortcut takes a large random number and keeps the remainder after dividing by the size of the range. That makes the smallest values slightly more likely than the largest, which is unfair in a draw, so this tool discards and redraws instead.

Are the lowest and highest numbers included?

Yes, both ends are possible results. A range of 1 to 6 can produce a 1 and can produce a 6, exactly as you would expect when rolling a normal six-sided die.

Why can't I get 50 unique numbers between 1 and 10?

There are only ten different values in that range, so fifty without repeats is impossible. When a request asks for more unique numbers than the range contains, the tool explains the problem instead of trying forever.

Can I use it to run a prize draw?

The results are fair and unbiased. Whether that meets the rules of an official or regulated competition is a separate question, since those often require a documented, independently witnessed process.

Are my results saved anywhere?

No. Each set lives only on your screen until you leave or press the button again, so save a copy when the result needs to be kept.