Random Number Generator

Draw one number or a whole list — set any range, choose integers or decimals, block repeats, and sort what comes out.

# Just enter your values below — results update automatically.

One whole number, two limits. Both the lower and the upper figure can be drawn, and the range can run into thousands of digits.

Whole numbers only on this tab. Negatives are fine. For decimals or a list, use Full Options.

Your number
—
Set a range and press Generate
Reading the settings
SettingEffect on the draw
LimitsBoth ends are reachable, so 1 to 6 behaves like a die and not like a five-sided one.
How many1 to 999 values in a single press. Above 1, the repeat and sort controls appear.
RepeatsAllowed acts like rolling a die; blocked acts like drawing tickets from a hat.
SortingRearranges the finished list. It never changes which numbers were drawn.
Decimal placesEach extra place multiplies the pool of possible results by ten.
Picking the right setup
TaskSettings that fit
Prize drawNumber every entry, draw as many winners as you have prizes, repeats blocked.
Lottery lineRange matching the ticket, six numbers, repeats blocked, sorted ascending.
Dice roll1 to 6, one number at a time, repeats allowed.
Survey sample1 to the number of rows, as many as your sample needs, repeats blocked.
Test dataDecimal, the places your field stores, repeats allowed, left as drawn.
# Just enter your values below — results update automatically.

Up to 999 numbers per draw. Integers or decimals, repeats on or off, sorted or in the order they came out.

numbers

Repeats allowed?

Sort the results?

Result type

digits

1 to 999 places. Results carry exactly this many, trailing zeros kept.

Your draw
—
Set your options and press Generate

What a random number generator actually does

Ask for a number between 1 and 100 and what you want, precisely, is a number nobody could have predicted before you asked, with all one hundred outcomes equally likely. Those are two separate promises. The first is unpredictability. The second is uniformity: 3 should turn up as often as 87 over a long run, and any tool that quietly favours the middle of the range is broken even if its output looks scattered.

A generator holds up its side of the bargain only if both promises survive the settings you choose. Widening the range must not skew the odds. Asking for fifty numbers instead of one must not make early draws behave differently from late ones. Switching to decimals must not push results toward round figures. Those are the properties this page is built around, and the section below shows exactly how the number is produced so you can judge it rather than take it on faith.

The method behind the draw

Every draw on this page is a whole-number draw underneath, even when the answer looks like a decimal. The range you type is first converted into a count of equally spaced steps, one step is picked at random, and the step is converted back into the number you see.

step size  =  10−places
outcomes  =  (upper − lower) ÷ step + 1
result    =  lower + step × R,  where R is a whole number from 0 to outcomes − 1

For whole numbers the step is 1, so a range of 1 to 100 gives 100 outcomes and the result is 1 + R. For decimals to three places the step is 0.001, so a range of 0 to 1 gives 1,001 outcomes rather than an unbounded smear of real numbers. Adding + 1 to the count is what makes both end points reachable — leave it out and the upper limit can never be drawn, which is the most common bug in hand-rolled generators.

Picking R fairly is the part that takes care. The raw randomness your browser supplies arrives as bytes, and a byte covers 0 to 255. Folding 256 possibilities into, say, 100 buckets by taking a remainder gives the first 56 numbers a slightly larger share than the rest — a small bias, but a real one that grows as the range gets awkward. This page avoids it by discarding any draw that lands outside the usable window and rolling again, so every outcome keeps exactly the same weight. All of the arithmetic runs in exact integer form, which is why a range thousands of digits wide still returns a number that is genuinely inside it.

Two generators, and which one you want

The Single Integer tab is the short path: two limits, one whole number, nothing else to think about. Use it for a coin-toss substitute, a seat number, a page to open at, or any moment where one figure settles the question.

The Full Options tab is for everything with more shape to it. It draws up to 999 numbers in one go, produces decimals as well as integers, lets you set how many decimal places you want, blocks repeats when each result has to be distinct, and sorts the list before showing it. A six-number lottery line, a random sample of rows from a spreadsheet, or a set of test values for a piece of software all live on this tab.

What every control changes

ControlWhat it changes
Lower and upper limitThe window numbers are drawn from. Both ends are reachable. The lower figure has to be the smaller one; the page says so rather than quietly swapping them.
How manySize of the list, from 1 to 999. Anything above 1 reveals the repeat and sort controls, since neither means anything for a single number.
Repeats allowedWhether a value can be drawn more than once in the same list.
Sort resultsPresentation only. Sorting arranges the list after the draw and never changes which numbers came up.
Result typeInteger gives whole numbers. Decimal opens the places field and draws on a finer grid.
Decimal placesHow fine that grid is, from 1 to 999. Results always carry exactly this many places, trailing zeros included, so a column of them lines up.

Repeats allowed versus repeats blocked

This one setting separates two different physical acts, and picking the wrong one quietly produces the wrong answer.

Repeats allowed is a die. Every roll starts from a full set of faces and knows nothing about the rolls before it, so 4, 4, 4 is an unremarkable run rather than a fault. Use it when each draw is genuinely independent: simulated dice, generated test data, repeated trials of the same experiment.

Repeats blocked is a hat full of raffle tickets. Each ticket that comes out stays out, so the pool shrinks with every draw and no name can win twice. Use it for prize draws, lottery lines, sampling without replacement, and any assignment where one slot means one person.

Blocking repeats needs the range to be big enough to supply them. Ask for twenty different numbers between 1 and 10 and no method can deliver — the page says the range holds only ten values instead of returning a list with hidden duplicates in it. Widening the range fixes it, and so does switching to decimals, which multiplies the pool by ten for every place you add.

Where a random draw is the right tool

  • Prize draws and giveaways. Number the entries, draw with repeats blocked, and the process is visible to everyone watching.
  • Sampling. Pulling 40 random row numbers out of 5,000 gives a sample whose statistics can be defended, which a hand-picked selection never can.
  • Classrooms. Cold-calling by drawn number takes the choice out of the teacher's hands, which is the point.
  • Games and simulations. Replacing a lost die, generating map coordinates, deciding turn order, or feeding a simulation the noise it needs.
  • Assignment and tie-breaking. Splitting people into groups, allocating shifts, or settling a draw without anyone having to argue for their preference.
  • Software testing. Random inputs across a range surface the edge cases that hand-written test values consistently miss.

Randomness is the right answer when every option genuinely deserves an equal shot, or when you need a decision nobody can be accused of steering. It is the wrong answer when the options are not equal — a draw cannot tell you which job offer to take, and dressing a judgement call up as a coin toss only hides who made the choice.

Why this is wrong for passwords and keys

The numbers here come from the randomness source built into your browser. It is a good source, seeded by the operating system from genuinely unpredictable events, and it is far stronger than the simple arithmetic generators that older tools relied on. It is still not the right instrument for security work.

A password or an encryption key has to stay unguessable against someone who studies your output deliberately and has time and hardware to spend on it. That threat model demands a generator that has been audited for it, entropy accounting you can point at, and a way of handling the result that never leaves it lying in a browser tab. None of those are things a calculator page can promise. Use a password manager for credentials and a purpose-built library for keys. For a draw, a sample or a game, the source here is entirely adequate — the distinction is the use, not the quality.

What this page does not do

Every generator makes trade-offs worth stating plainly:

  • The numbers are pseudo-random, not physically random. They come from an algorithm expanding a seed, not from atmospheric noise or radioactive decay. They pass the standard statistical tests; they are not drawn from a physical process.
  • Nothing is saved. There is no history and no record of past draws. Reload the page and everything is gone, which is deliberate but means an audit trail has to be your responsibility — screenshot or download the PDF while the result is on screen.
  • Every outcome carries equal weight. There is no way to make some numbers more likely than others, so a weighted or non-uniform distribution is outside what this tool covers.
  • Formal draws have rules of their own. A regulated lottery, a licensed sweepstake or a legally binding ballot usually has to follow a defined procedure, and no web page satisfies that on its own.

If you need summary statistics from the numbers you draw, the statistics calculator and the standard deviation calculator take a list directly. For the odds behind a draw, the probability calculator and the permutation and combination calculator handle the counting side, and the sample size calculator tells you how many rows you should be pulling in the first place.

Frequently asked questions

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

Open the Single Integer tab, put 1 in the lower limit and 100 in the upper limit, then press Generate. Every whole number from 1 to 100 has the same chance of coming up, and both end numbers are included in the draw.

Can I get several random numbers at once?

Yes. Switch to the Full Options tab and set how many numbers you want, up to 999 in a single draw. The numbers appear together as one list, so there is no need to press Generate repeatedly.

How do I stop the same number appearing twice?

Ask for more than one number, then set Repeats allowed to No. Each value is then removed from the pool once it is drawn, the way raffle tickets are removed from the hat. If you ask for more numbers than the range can hold, the page tells you instead of silently repeating.

Can this generate decimals rather than whole numbers?

It can. On the Full Options tab, set the result type to Decimal and choose how many decimal places you want, from 1 up to 999. Every number comes back with exactly that many places, trailing zeros included.

Are the numbers here safe to use for a password or an encryption key?

No. This page uses the randomness source built into your browser, which is excellent for games, draws and sampling but is not audited for cryptographic use. For passwords and keys use a dedicated password manager or a tool designed for that job.

Are these numbers truly random?

They are pseudo-random. A short unpredictable seed is stretched by an algorithm into a long sequence that passes statistical tests for randomness but is produced by a formula rather than by a physical process. For a coin toss, a raffle or a sample of survey rows, the difference has no practical effect.

Does the generator remember what it drew last time?

No. Every press of Generate is an independent draw with no memory of the previous one, so the same number can legitimately appear twice in a row. Nothing is stored, and nothing leaves your browser.

What is the largest number this can handle?

The Single Integer tab works on whole numbers thousands of digits long, well past the point where ordinary calculator arithmetic loses precision, because it does the draw in exact integer arithmetic rather than in floating point.

This generator produces pseudo-random numbers in your browser for general use — games, draws, sampling, teaching and testing. It is not a certified randomness source and is not suitable for passwords, encryption keys, regulated gaming or any legally binding selection. Nothing you enter is transmitted or stored. See our about page for how these tools are built and checked, and our privacy policy for what we do and do not collect.