Random Number Generator

Pick a random number between any two values — or generate a whole list of them. Choose whole numbers or decimals, allow or block repeats, and sort the output. Every number comes from your browser's cryptographic random source, so each value in the range is exactly equally likely.

How to Use the Random Number Generator

1. Tap a quick range such as 1–10 or 1–100, or type your own minimum and maximum.

2. Set how many numbers you need — up to 10,000 at once.

3. Switch on No repeats for raffles, seat draws, or sampling without replacement.

4. Press Generate. Copy the list or share a link that reproduces the same settings.

How the Numbers Are Generated

Most quick random tools call Math.random(), a fast pseudo-random formula whose output is fully determined by a hidden starting seed. This generator instead reads from crypto.getRandomValues(), the same cryptographically secure source browsers use to create encryption keys. It is seeded by the operating system's entropy pool, so results cannot be predicted from earlier draws.

A second, subtler problem is modulo bias. Turning a random 32-bit value into a number from 1 to 100 with a plain remainder makes the smallest numbers very slightly more common, because 2³² is not a multiple of 100. The generator rejects the few raw values that would cause this imbalance and draws again, so every whole number in your range has probability exactly 1 ÷ (max − min + 1).

P(any single value) = 1 / (max − min + 1)

Expected average = (min + max) / 2

Unique draws possible = max − min + 1

With No repeats switched on, the generator performs a partial Fisher–Yates shuffle of the range, which is equivalent to drawing numbered balls from a bag without putting them back. Every possible set of results is equally likely.

Worked Example: Drawing Raffle Winners

A school sold tickets numbered 1 to 250 and needs 3 winners. Set the minimum to 1, the maximum to 250, how many numbers to 3, and switch on No repeats so no ticket can win twice.

  1. Each ticket's chance of being drawn first is 1 ÷ 250 = 0.4%.
  2. A given ticket's chance of winning one of the three prizes is 3 ÷ 250 = 1.2%.
  3. The number of possible winner groups is C(250, 3) = 2,573,000 — see the combination calculator for the counting.

Because the draws are unique and uniform, every one of those 2,573,000 groups is equally likely, which is exactly what a fair raffle requires.

Common Uses

  • Random sampling: pick which rows, students, or survey respondents to include in a simple random sample.
  • Games and giveaways: draw raffle tickets, choose who goes first, or pick a winner from numbered entries.
  • Classroom activities: call on students fairly or generate practice data for a mean, median, and mode exercise.
  • Simulation: model chance events, then compare the results with the exact odds from the probability calculator.

Frequently Asked Questions

Is this random number generator truly random?

It uses crypto.getRandomValues(), the browser's cryptographically secure generator, which is seeded from hardware and operating-system entropy. Its output cannot be predicted from past numbers, which is stronger than the Math.random() function most online pickers use. For everyday draws, sampling, and games it is indistinguishable from true randomness.

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

Tap the 1–10 quick range button. The generator immediately returns one whole number from 1 to 10, each with an equal 10% chance. Press Generate again for a new number.

Can I generate random numbers without repeats?

Yes. Switch on No repeats and every number in the result will be different. This works like drawing numbered balls from a bag without replacing them. You cannot ask for more unique numbers than exist in the range — for example, at most 10 unique whole numbers between 1 and 10.

Are the minimum and maximum included?

Yes. Both endpoints are included for whole numbers, so a 1–100 range can return 1 and can return 100. For decimals, values are drawn from the continuous range and rounded to the number of decimal places you choose.

Can I use this for a lottery or a giveaway?

You can use it to draw lottery-style numbers or giveaway winners, since each number is equally likely and unique draws are supported. The results are generated in your browser and are not recorded, so for an official drawing, record the screen or draw in front of witnesses.

Embed This Calculator

Add this free calculator to your course page or LMS.

Adjust the height value to fit your page.