Basic statistics

Random Number Generator: Random Numbers in Any Range, With or Without Repeats, and Random Name Picker

Generate random numbers in any range, whole numbers or decimals, with or without repeats, or pick random names from a list for a lucky draw, a class activity or a study sample. It uses your browser’s cryptographic random generator, so results are fair and unpredictable. Nothing is saved.

✅ No login needed100% freeRuns in your browserNothing savedYour data stays on your device
Random Number Generator✅ Free · no login📚 Cite this tool
Your data never leaves your PC. Everything you type is calculated on your own computer or phone. Nothing is saved, not even in your browser, and it is gone when you close the page. Nothing is uploaded, stored or seen by Codanics, and no login is needed.
  • PriceFree, no login or sign-up needed
  • Your dataCalculated in your browser; nothing is saved
  • Works onPhone, tablet or computer, any modern browser
  • Made byDr. Muhammad Aammar Tufail, Codanics
  • Published24 November 2026
  • Last updated24 November 2026

📚 How to cite this tool

This tool is free. If it helped your thesis, paper, report or assignment, please cite it. It keeps the tools free and helps other students find them.

Citation · APA 7th edition

Tufail, M. A. (2026). Random number generator [Online tool]. Codanics. Retrieved 24 November 2026, from https://codanics.com/tools/random-number-generator/

In-text citation: (Tufail, 2026) · Narrative: Tufail (2026)

The access date is today’s date, filled in automatically. Author: Muhammad Aammar Tufail. Published 24 November 2026.

🚀 Follow Codanics channel on WhatsApp for more updatesNew free tools, scholarships, PhD positions and research tips, straight to your phone. Free lessons on YouTube too.

How to use the random number generator

  1. Enter the minimum, maximum and how many numbers you want. Choose whole numbers or decimals.
  2. Tick No repeats for unique numbers (like a lottery or a lucky draw), and choose the order.
  3. Press Generate. Press it again for a fresh set. Copy or download the numbers.
  4. To pick winners or students, open Pick from a list, paste the names, and press Pick or Shuffle whole list.

How does this random number generator work?

A random number generator picks numbers so that every allowed value has exactly the same chance of being chosen, and no draw can be predicted from earlier ones. This tool uses crypto.getRandomValues, the cryptographically secure generator built into your browser, rather than the ordinary Math.random.

It also avoids “modulo bias”. Taking a big random number and using the remainder can make small numbers slightly more likely. The tool rejects and redraws the few values that would cause this, so 1 to 100 really is fair.

The maths behind a fair draw

QuestionFormulaExample (1 to 100)
Number of possible valuesmax − min + 1100
Chance of one number on one draw1 ÷ values1 ÷ 100 = 1%
Ways to draw 10 without repeats (any order)C(100, 10)about 17.3 trillion
Chance of at least one repeat in 10 draws with repeats1 − (100 × 99 × … × 91) ÷ 100¹⁰about 37%

That last line surprises people: with repeats allowed, a duplicate shows up in more than a third of 10-number draws from 1 to 100. Tick No repeats if you need unique numbers.

Common uses

  • Lucky draws and giveaways: number the entries and draw winners without repeats, or paste names into the list picker.
  • Classroom: pick a student to answer, or shuffle the order of presentations.
  • Research sampling: choose 30 households from a list of 500 for a simple random sample (number them 1 to 500 and draw 30 unique numbers).
  • Games and decisions: roll a die (1 to 6) or toss a coin (1 to 2).

Tips for fair results

  • Decide the rules (range, number of winners, repeats) before you press Generate, and keep the first result.
  • For a public lucky draw, share your screen or record it.
  • For clinical trial allocation, use a proper randomisation list with blocks, not single draws.
  • Nothing is stored, so if you need a record, copy or download the numbers straight away. Pressing Generate again gives a completely new, independent set.
Assigning participants to treatment groups? Use the randomization list generator. Planning how many people to sample? Try the margin of error calculator.
Learn the statistics behind these numbers. Codanics has free statistics, R and Python lessons on YouTube and full courses for researchers.

Frequently asked questions

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

Set the minimum to 1, the maximum to 100 and how many to 1, then press Generate. Each number from 1 to 100 has the same 1% chance.

Can I generate random numbers without repeats?

Yes. Tick “No repeats”. The tool draws unique numbers using a Fisher–Yates shuffle. You cannot ask for more unique numbers than the range contains.

Is this random number generator truly random?

It uses crypto.getRandomValues, the cryptographically secure random source in your browser, with rejection sampling to remove bias. It is suitable for draws, games and sampling. For regulated lotteries, follow the official rules.

How do I pick a random winner from a list of names?

Open the “Pick from a list” tab, paste one name per line, set how many winners you need and press Pick. Keep “No repeats” ticked so nobody wins twice.

Can I use it to select a random sample for research?

Yes. Number your population list from 1 to N and draw the sample size you need without repeats. Then select the matching rows. This gives a simple random sample.

Are my numbers or names saved?

No. Everything happens in your browser. The names you paste and the numbers you draw are not saved or uploaded.

Do I need to log in or create an account to use the random number generator?

No. There is no login, no sign-up and no email required. Open the page and start using it straight away, for free, on any device.

How do I cite this tool in my thesis or paper?

Use the citation box on this page. In APA 7th edition: Tufail, M. A. (2026). Random number generator [Online tool]. Codanics. Retrieved [date you used it], from https://codanics.com/tools/random-number-generator/. BibTeX, RIS (EndNote, Mendeley, Zotero), MLA, Harvard, Chicago and Vancouver formats are also available.

Free guides and courses from Codanics

More free tools

See all free Codanics tools → · Codanics on YouTube · WhatsApp channel

Made by Dr. Muhammad Aammar Tufail, Codanics. First published 24 November 2026, last updated 24 November 2026. Found a bug or have an idea for a new tool? Tell us on the WhatsApp channel or in the comments on YouTube. Results are for learning and planning; check important analyses with a statistician or your supervisor.