Random Number Generator

Pick a range and how many numbers you need. Numbers come from your browser's cryptographic random generator (the Web Crypto API), with no bias toward any value, and nothing is sent to a server.

Repeats
Order
Quick picks
Your number
-

History

Your last draws on this page. They are not stored anywhere.

    Lottery odds

    The chance that one ticket wins the jackpot, worked out from the number of possible combinations.

    GameHow it is drawnJackpot odds
    Powerball (US)5 from 1-69, plus 1 Powerball from 1-261 in 292,201,338
    Mega Millions (US)5 from 1-70, plus 1 Mega Ball from 1-241 in 290,472,336
    EuroMillions5 from 1-50, plus 2 Lucky Stars from 1-121 in 139,838,160
    UK Lotto6 from 1-591 in 45,057,474
    EuroJackpot5 from 1-50, plus 2 from 1-121 in 139,838,160

    Game formats as of 2026. Operators change them from time to time; Mega Millions moved to 24 Mega Balls in April 2025.

    How the numbers are made

    Computers cannot flip coins, so most generate pseudo-random numbers from a formula and a starting seed. JavaScript's everyday Math.random() is fast but predictable enough that it should not be used for anything that matters. This page uses crypto.getRandomValues(), the generator browsers provide for encryption keys, which is seeded from the operating system's entropy pool.

    Turning random bits into a range fairly takes one more step. Taking the remainder (random % 6) favours small numbers slightly whenever the range does not divide evenly into 2³². We use rejection sampling instead: draws that fall in the uneven top slice are thrown away and redrawn, so every value has exactly the same chance.

    Unique numbers and shuffles

    With "no repeats" each number can come up only once, like balls taken from a drum. For large ranges the generator redraws duplicates; when you ask for most of a range it shuffles the whole range with the Fisher-Yates method and takes the first numbers, which is equally fair and faster.

    What lottery odds mean for your money

    At 1 in 292 million, buying one Powerball ticket twice a week for 50 years gives about a 1 in 56,000 chance of ever hitting the jackpot. Powerball puts about half of each ticket's price into the prize pool, so a $2 ticket is worth roughly $1 in expected winnings. The same $4 a week invested at 7% for 40 years grows to about $46,000. The compound interest calculator shows how.

    Questions people ask

    Is this truly random?

    It is cryptographically secure pseudo-randomness, the same quality used to create encryption keys. Nobody, including us, can predict the next number. For legally binding draws, such as a prize giveaway, check whether your jurisdiction requires a certified draw method.

    Can I pick lottery numbers with it?

    Yes, the quick picks follow each game's format. Random picks have exactly the same chance as any other combination, but they are less likely to be shared with other players than birthdays or patterns, so a win is less likely to be split.

    Can I generate negative numbers or decimals?

    Yes. Set a negative minimum, and choose up to 10 decimal places.