Home Random number

Random number

1 through 100 has a span of 100. 1 through 6 draws again for the top 4 values in 32 bits, so 1, 2, 3, 4, 5, and 6 stay equally likely. The count runs from 1 to 100, and each end runs from -1,000,000,000 to 1,000,000,000.

Why this exists

A plain remainder gives the early numbers an extra chance from the values that do not divide evenly. Those values are dropped and drawn again.

From 1 through 6, a raw 0 becomes 1 and a raw 5 becomes 6. 4,294,967,292 is dropped and the next value is used.

  1. 01How to use it

    Minimum 1, maximum 100, and count 1 show one whole number from 1 through 100.

    Press All different and Draw again to take a new set of unrepeated numbers with the same ends.

    Copy puts only the drawn numbers on the clipboard. The span line stays on the page.

  2. 02What you get

    The span of 1 through 100 is 100.

    1 through 6 keeps 1, 2, 3, 4, 5, and 6 equally likely.

    Three different numbers from 1 through 2 stops.

    Entered1 through 6

    1 through 6 span 6
    1 through 100 span 100
    3 different, 1 through 2 stops
    5 and 5 5
  3. 03Worth knowing

    This screen does not make a password. The screen that chooses character kinds and a length is separate.

    Closing the tab clears the drawn numbers. Nothing is sent to a server.

    A decimal such as 1.5 is not read. 1,000 is read as 1000.

    Equal ends return only that whole number. 5 and 5 return 5.

Questions

QIs 1 through 6 fair?
AYes. The top 4 values are drawn again, so 1, 2, 3, 4, 5, and 6 stay equally likely.
QHow many numbers can one draw make?
AFrom 1 to 100.
QCan I draw 3 different numbers from 1 through 2?
ANo. The span is 2, so it stops.
QAre the numbers saved?
ANo. They are drawn in this browser and are not sent to a server.

How this page works it out

This page draws whole numbers from a minimum through a maximum. The span is the maximum minus the minimum plus 1, so both ends are included. 1 through 6 is 6, and 1 through 100 is 100. One draw makes from 1 to 100 numbers, and Draw again makes a new set with the same ends.

A 32-bit value runs from 0 through 4,294,967,295, which is 4,294,967,296 values. Values at the top that do not divide evenly by the span are dropped and drawn again. 1 through 6 drops 4,294,967,292 through 4,294,967,295. A raw 0 becomes 1 and a raw 5 becomes 6, so 1, 2, 3, 4, 5, and 6 stay equally likely. All different skips a number that was already drawn. Three different numbers from 1 through 2 stops.

Each end runs from -1,000,000,000 to 1,000,000,000. Commas are removed, so 1,000 is read as 1000. A decimal, a minimum above the maximum, and a count of 0 or 101 stop. Equal ends return only that whole number. 5 and 5 return 5. This screen does not make a password. The numbers come from this browser’s cryptographic random source and are not sent to a server.

  • # random
  • # 1 through 100
  • # dice
  • # span