Random Number Generator — Unbiased, With No Repeats

This tool needs JavaScript to draw numbers. Everything runs in your browser; nothing is uploaded.

Range

Result

Nothing drawn yet.

This session

Draws you make will be listed here, newest first.

    The numbers come from your own browser and are never sent anywhere. Closing the tab clears the log.

    About the Random Number Generator

    Set a range, say how many numbers you want, and draw. If the numbers must not repeat — a raffle, an order of speakers, teams from a list of desk numbers — turn that on and the tool will refuse an impossible request rather than quietly handing you a duplicate.

    Two things here are worth the extra sentence. The draws are unbiased, which is less common than it sounds: the usual shortcut takes a big random number and takes the remainder after dividing by the range size, and unless that size divides evenly, the low end of the range comes up very slightly more often. This tool discards the values that would land in the uneven tail and draws again, so every number really is equally likely.

    The second is the log. Most generators replace the previous result with the next one, which is exactly wrong when someone is watching you draw. The last five draws stay on screen until you close the tab.

    Nothing is sent anywhere. The randomness comes from your browser's own cryptographic source, and the log lives in the page, not on a server.

    How to use it

    1. Type the two ends of the range. Both ends are included, and negative numbers are allowed.
    2. Set how many numbers to draw. One is the default; up to a thousand fit on the page.
    3. Turn on no repeats for anything where one number should not come up twice — a raffle, an order, an assignment of people to slots.
    4. Press Draw. Use lowest first if you want the result as a set, or leave it as drawn if the order itself matters.
    5. Draw again as many times as you like. Each result joins the session log above the previous one, so nothing is lost while people are watching.

    Questions

    Is the Random Number Generator free, does it need an account, and does anything get sent anywhere?

    It is free, needs no account, and sends nothing. The numbers come from the random source built into your browser, the drawing happens on your own machine, and the log is held in the page. Close the tab and it is gone, which also means we could not show you an old draw even if you asked.

    Is it actually random, or just random enough?

    It uses the browser's cryptographic random source rather than the ordinary one, and it maps those values onto your range without introducing bias. The usual shortcut — take a remainder — makes low numbers marginally more likely whenever the range does not divide evenly. This one discards those values and draws again, which costs nothing you can notice and removes the bias entirely.

    What does no repeats actually do?

    It keeps a drawn number from appearing again in the same draw. It does not carry across separate draws, so pressing Draw twice can give you the same number in both. If you need a run of separate picks to stay distinct, draw them all at once with no repeats and read them in order.

    Can I use this for a raffle or a giveaway?

    Yes, and the log and the no-repeats option are there for exactly that. Number your entries, draw as many winners as you need in one go with no repeats, and the result stays visible while you announce them. What we cannot give you is proof for someone who was not watching — no online drawing tool can, because the result appears on your screen alone.

    Are lottery numbers from a generator any better than picking your own?

    No. Every combination has the same chance regardless of how it was chosen, and no tool can change that. Random draws also have no memory, so a number coming up last week does not make it less likely this week. Choosing numbers no one else picks does not improve your odds either — it only changes how many people you would split a prize with.

    Why does it refuse some ranges?

    Three requests have no sensible answer, so the tool says why instead of guessing. A first number larger than the second is a range backwards. Fractions are not whole numbers. And asking for more values than the range holds with no repeats is impossible — ten distinct numbers cannot come out of a range of five — which would otherwise leave the tool searching forever.