Random Number Generator

Pick random numbers between any two values: one or up to 1,000 at a time, whole numbers or decimals, with or without repeats.

Your random number
–

    Numbers come from your browser’s cryptographic random generator, without bias toward any value.

    Calculated in your browser. Nothing you enter is sent anywhere.

    How to use the random number generator

    1. Enter the minimum and maximum. Both are included.
    2. Choose how many numbers you want and how many decimal places.
    3. Tick No repeats if each number may appear only once, and Sort to list them from low to high.
    4. Press Generate. Press it again for a new draw.

    The result also shows how many different values are possible and the chance of any particular one. With several numbers, use Copy numbers to paste them elsewhere.

    Ideas for using random numbers

    UseSettings
    Roll a die1 to 6
    Roll two dice1 to 6, 2 numbers
    Flip a coin0 to 1 (0 = heads, 1 = tails)
    Pick a winner from 250 entries1 to 250
    Lottery 6 from 491 to 49, 6 numbers, no repeats, sorted
    Random percentage0 to 100, 2 decimal places
    Shuffle a list of 201 to 20, 20 numbers, no repeats

    How it works

    A computer can't flip a coin, so it uses a random number generator. Ordinary generators in many programs are predictable if you know their starting point. This page uses the browser's cryptographic generator, which draws on unpredictable sources such as hardware timings.

    Turning random bits into a number in your range needs care. Taking the remainder after division (the "modulo" method) makes some values slightly more likely than others. The generator here throws away the few draws that would cause that imbalance and tries again, so every value in your range has exactly the same chance. For decimals, it picks a random whole number of hundredths (or thousandths, and so on) in the range.

    Nothing is sent to a server: the numbers are made on your device.

    Frequently asked questions

    Are the numbers truly random?

    They come from your browser's cryptographically secure random number generator (the Web Crypto API), the same source used to create encryption keys. It's unpredictable and, unlike simple generators, suitable for draws and games. Each number in the range is equally likely: the calculator avoids the small bias that simple methods introduce.

    How do I pick lottery numbers?

    Set the minimum and maximum to the lottery's range, set how many numbers, and tick No repeats and Sort. For example, 6 numbers from 1 to 49. Every combination is equally likely, so no set of numbers is luckier than another.

    Can I use this for a giveaway or raffle?

    Yes. Number your entries from 1 to the total and generate one number (or more with No repeats for several winners). For transparency, share your screen or record the draw.

    Are both ends of the range included?

    Yes. A range of 1 to 6 can give 1, 2, 3, 4, 5 or 6, just like a die.

    Randomness: W3C Web Cryptography API, crypto.getRandomValues(). Uniform integers are drawn by rejection sampling to avoid modulo bias; our tests check the method gives each value equally often.

    Last reviewed: . Results are estimates for information only.