Free · No sign-up · Instant

Random number generator

Generate random numbers in any range — set your min, max, and count. Block duplicates for raffles or allow repeats for dice-style rolls. One click, no sign-up.

Enter a valid integer
Must be greater than minimum
Enter a number from 1 to 200
Press Space to regenerate
Ad
Write with confidence
Fix grammar, improve clarity, and choose the right words — everywhere you write.
Try free →
Free plan · No credit card
Generating…
    Saved numbers (0) Copy saved
    Click the heart on any number to save it here
    Advertisement · 336×280
    Grammarly — write with confidence
    Grammar, tone & clarity. Used by 30 million people. Works in Google Docs, Gmail, Word and more.
    Try Grammarly free

    More word tools

    Every word generator you need, all free

    Other tools

    Numbers, names, games and more

    Advertisement · 336×280
    Grammarly — write with confidence
    Instantly improve grammar, spelling, clarity, and tone. Works everywhere you write online.
    Try Grammarly free

    What is a random number generator?

    A random number generator (RNG) produces numbers with no predictable sequence. You define the minimum and maximum values, choose how many numbers you want, and the tool picks from within that range. The result is as fair as drawing numbers from a hat — each integer in the range has an equal chance of appearing on every pick (when duplicates are allowed). Toggle off duplicates and the tool switches to a drawing-without-replacement model, guaranteeing no number appears twice.

    Lottery and raffle use: duplicates off

    The most common use for a no-duplicate RNG is picking raffle winners or simulating lottery draws. Set your range to match the ticket pool (e.g. 1–200 for a 200-ticket raffle), set count to however many prizes you're giving away, turn duplicates off, and click Generate. Every ticket number in the output is unique — no one wins twice from the same draw. For lottery simulations like Powerball (1–69, pick 5) or Mega Millions (1–70, pick 5), the same setup applies; just adjust min, max, and count to match the game format.

    Dice rolls and games: duplicates on

    When you want to simulate dice or any situation where the same result can come up multiple times, keep duplicates on. A single die is range 1–6, count 1. Two dice? Count 2, same range. A d20 from D&D? Range 1–20, count 1. You can also use this to generate random scores, pick a random page number from a book, or select a random question from a numbered list. The sort toggle is useful here — turn it on to see results in numerical order rather than the raw draw order.

    Classroom and teaching uses

    Teachers use random number generators constantly: picking a random student (1 to class size), assigning groups, generating practice problems, or deciding the order of presentations. Set count to 1 and regenerate as needed, or generate all student numbers at once with duplicates off for a fair random order. The tool requires no account, no install, and works on any device — making it practical for classroom use without setup time.

    Statistical sampling and simulations

    Researchers and analysts use random number generators to create random samples from a population, assign participants to control and treatment groups, or seed Monte Carlo simulations. For sample selection, set your range to the size of your population, turn duplicates off, and generate however many samples you need. Copy all and paste directly into your spreadsheet. The sort option makes it easier to cross-reference results against a numbered list.

    How the randomness works

    This tool uses JavaScript's Math.random(), a pseudorandom number generator (PRNG) that produces outputs passing standard statistical randomness tests. It is seeded from the system clock and hardware entropy, making its output unpredictable in practice. For everyday uses — games, raffles, classroom activities, sampling — it is more than sufficient. For cryptographic key generation or security-critical applications, a dedicated hardware RNG or crypto.getRandomValues()-based solution is the appropriate choice.

    Frequently asked questions

    What is a random number generator?
    A random number generator picks integers from a range you define, with no predictable pattern. Set a minimum, a maximum, and how many you want. Toggle duplicates off for drawing-without-replacement scenarios like raffles; keep duplicates on for dice-style rolls where the same result can come up again.
    Are the numbers truly random?
    This tool uses Math.random(), a pseudorandom number generator built into every modern browser. It is seeded from hardware entropy and produces outputs that pass statistical randomness tests — more than sufficient for games, raffles, sampling, and classroom use. For cryptographic applications, use a dedicated hardware-based RNG.
    How do I use this as a lottery picker?
    Set Min to 1 and Max to the highest number in the lottery (e.g. 69 for Powerball's white balls). Set Count to the number of balls drawn (e.g. 5). Turn duplicates off. Click Generate. For games with a bonus ball from a separate range, run a second generation with that range and count 1.
    What is the difference between allowing and blocking duplicates?
    With duplicates allowed, each pick is independent — like rolling a die repeatedly, the same number can come up multiple times. With duplicates blocked, each number can appear at most once — like drawing tickets from a hat without putting them back. Use no-duplicate mode for raffles, group assignments, or any scenario where fairness requires each option to appear only once.
    Can I generate a random number between 1 and 10?
    Yes — set Min to 1, Max to 10, Count to 1, and click Generate. You can use any range: 1–6 for a standard die, 1–20 for a D&D d20, 1–100 for a percentage, or any custom range you need.

    Who uses this tool

    Teachers & facilitators
    Pick random students, assign groups, set presentation order, and generate practice problems — all without bias or the appearance of favoritism.
    Raffle & event organizers
    Draw winners fairly with duplicates off. Set the range to your ticket count, pick as many winners as you need, and get a clean list instantly.
    Game players & dungeon masters
    Roll virtual dice for any polyhedral — d4, d6, d8, d10, d12, d20, d100. Generate multiple dice at once or simulate draws from a numbered deck.
    Researchers & analysts
    Create random samples, assign participants to groups, and seed simulations. Copy results directly into a spreadsheet with one click.