Random number generator guide

How to use the Random Number Generator

Picture a teacher choosing one student from 30 names, then a volunteer making ten practice raffle picks without repeats. Random numbers feel simple until one repeated result, missing endpoint, or excluded value changes the outcome. The Random Number Generator is built for those everyday choices, with settings you can check before you copy the answer.

Open the random number generator
Guide image for Random Number Generator showing custom ranges, unique picks, exclusions, sorted results, and copy-ready number lists.
Random Number Generator guide artwork supports the walkthrough for min and max ranges, quantity, unique results, exclusions, sorting, copy, history, and everyday randomness limits.View in the smoke-kawaii gallery

Quick answer

Enter the lowest and highest whole numbers that are allowed, choose how many results you need, then decide whether repeats are allowed. Turn on Unique results for no repeats, add excluded numbers when some values should be skipped, and turn on Sort results when you want a clean low-to-high list.

The Random Number Generator keeps the result private in your browser tab and gives you a copy button when the list is ready.

What each input means

  • Minimum is the smallest number the generator may return.
  • Maximum is the largest number the generator may return.
  • Quantity is how many numbers you want in this run.
  • Exclude numbers removes specific values from the allowed set.
  • Unique results prevents repeats inside one generated list.
  • Sort results changes the final display to low-to-high order.

Minimum and maximum are inclusive. If you enter 1 and 30, both 1 and 30 are valid results. That matters for classroom lists, numbered tickets, board-game spaces, and any task where every endpoint should still be possible.

Example: one classroom pick

Say a teacher has 30 numbered students and needs one quick starter question pick. Enter minimum 1, maximum 30, and quantity 1. If the result is 18, student 18 is the pick.

Do not rerun just because you expected a different number. A random result can feel surprising and still be valid. Rerun only if your class rules say a second draw is allowed.

Example: a unique sorted list

For a practice raffle list, enter 1 to 100, set quantity to 10, turn on Unique results, and turn on Sort results. The generator will return ten different numbers and display them in a cleaner order.

Sorting does not change which numbers were picked. It only makes the list easier to read aloud, compare with a numbered sheet, or paste into notes.

Example: skip excluded numbers

If 13 and 44 are not allowed, enter them in Exclude numbers as 13, 44. With a 1 to 50 range, quantity 6, and Unique results on, the final list can include any allowed number except 13 and 44.

The range still needs enough values left. A 1 to 5 range cannot produce 5 unique results if you exclude 2 numbers, because only 3 allowed numbers remain.

Examples from the tool page

Classroom pickMinimum 1, maximum 30, quantity 1

One student number from 1 through 30. If the answer is 18, use 18 as the pick and rerun only if your rules allow a new draw.

Practice raffle list10 numbers from 1 to 100, unique on, sorted on

Ten different numbers in order, which is easier to read aloud or compare with a numbered list.

Skip excluded numbers6 unique numbers from 1 to 50, excluding 13 and 44

A sorted list with no repeats and no excluded values, as long as the range still has enough allowed numbers.

How the random logic works

The tool tries to use the browser's cryptographic random values when that feature is available, then maps the random value into your allowed whole-number range. That helps avoid simple modulo bias, where some numbers can become slightly more likely than others because of careless remainder math.

If the secure browser method is not available, the tool can fall back to normal browser randomness. That fallback is fine for everyday picks and examples, but it is not a replacement for audited random drawings.

Common mistakes to avoid

  • Forgetting that the minimum and maximum can both appear.
  • Leaving Unique results off when repeats would be a problem.
  • Asking for more unique numbers than the range can provide.
  • Excluding numbers outside the range and expecting them to change the result.
  • Using this page for legal, security, gambling, or password decisions.

When this guide is not enough

This tool is for ordinary web utility tasks: classroom picks, practice raffles, simple games, sample values, and quick decisions. Do not use it for passwords, gambling, legal drawings, security decisions, or anything that needs a written audit trail.

For browser API context, MDN documentsCrypto.getRandomValuesandMath.random. Those sources explain why secure random values and ordinary random values are not the same thing.

History, privacy, and copying

Recent random results stay visible while you work so you can compare a few attempts without writing each one down. The history is kept only in the current browser tab and is not sent to a server by the generator.

Copy results copies the current list exactly as displayed, separated by commas. That is useful for notes, homework, a message, or a quick worksheet.

Frequently asked questions

Are the minimum and maximum numbers included?

Yes. A range from 1 to 10 can return 1, 10, or any whole number between them. Treat both ends of the range as possible picks.

Why did the same number appear twice?

Repeats are normal when Unique results is off. Turn on Unique results when each number should appear only once in the generated list.

What happens if I exclude too many numbers?

The generator needs enough allowed numbers left in the range. If you ask for 6 unique numbers but only 4 values are allowed after exclusions, lower the quantity or widen the range.

Is this good for a real raffle or contest?

Use it for practice, classrooms, simple games, and everyday choices. For legal drawings, paid contests, gambling, or anything that needs audited randomness, use a process with written rules and independent verification.

Does the page save my random results?

Recent results stay only in the current browser tab while you use the page. They are not sent to a server by the generator.