Generate random numbers, roll any dice, pick lottery numbers, or create custom ranges. History saved, TXT export, works perfectly on mobile.
True randomness — in the mathematical sense — is impossible for a deterministic computer. What software produces instead is pseudorandomness: a sequence generated by a deterministic algorithm that is statistically indistinguishable from genuine randomness for practical purposes. The standard JavaScript Math.random() function uses an implementation of the xorshift128+ algorithm in most modern browsers. It seeds itself from system entropy sources (timing data, hardware events) when the page loads, producing a starting state that is effectively unpredictable for everyday use.
The generation formula for an integer in range [min, max] is: Math.floor(Math.random() × (max − min + 1)) + min. This maps the [0, 1) output of Math.random() uniformly across your requested range. Each integer has an equal probability of 1 / (max − min + 1). For most applications — games, raffles, random sampling, teaching — this level of randomness is entirely sufficient. Cryptographic applications (generating encryption keys, password salts) require a cryptographically secure PRNG from the Web Crypto API, which draws from OS-level entropy pools. This calculator is designed for practical everyday uses where crypto-strength is unnecessary.
Single Number is the simplest and most used mode. Set a minimum and maximum, get one integer. Perfect for: picking a random winner by number (assign each contestant a number, generate one), choosing a starting player in a board game, settling a dispute ("highest number goes first"), selecting a random chapter to read, or any situation requiring one unbiased choice. The result fills the screen large so it's clearly visible from a distance — useful in classroom settings where everyone needs to see the number.
Multiple Numbers generates a batch of integers at once with optional uniqueness and sorting. With "No Duplicates" enabled, the algorithm uses a Fisher-Yates shuffle on the available number pool — guaranteed uniform distribution without repetition. Use this for selecting multiple raffle winners (generate as many numbers as prizes), creating a randomized list of questions or tasks, randomizing the order of a to-do list, or generating a random test dataset. With sorting enabled, results appear in ascending order for easy cross-referencing against a numbered list of entries.
Dice Roller supports D4, D6, D8, D10, D12, D20, and D100 — the complete set of polyhedral dice used in tabletop RPGs. Roll up to 12 dice simultaneously. D6 results display as visual dice faces with classic dot patterns for immersion. All other die types show the number in a clean styled box. The total sum appears below the individual rolls, which is what Dungeons & Dragons and Pathfinder typically require: "roll 2D6 for damage" means sum two six-sided dice.
Lottery Picker includes Powerball, Mega Millions, EuroMillions, Lotto 6/49, and a fully custom lottery format. Main numbers are drawn without replacement from their pool, then sorted ascending — exactly how real lottery draws work. Bonus balls (Powerball, Mega Ball, Lucky Stars) are drawn from a separate pool independently. Results display as styled lottery balls for visual clarity, with bonus numbers in gold to distinguish them from main numbers. The custom lottery option lets you define any combination of main and bonus pick counts and ranges.
Custom Range adds two features unavailable in the other modes: negative number support and decimal output. Set your minimum to any negative integer for ranges like −50 to 50. Enable decimals to get results with four decimal places, which is useful for Monte Carlo simulations, probability experiments, or generating randomized fractional values for statistical sampling. Generate up to 200 numbers at once in custom mode.
The standard set of polyhedral dice used in tabletop games covers seven distinct shapes, each with specific use cases in game mechanics:
| Die | Faces | Shape | Common Uses |
|---|---|---|---|
| D4 | 1–4 | Tetrahedron | Dagger damage, healing word, low-damage spells |
| D6 | 1–6 | Cube | Standard board games, ability score generation (4D6 drop lowest), hit dice for small classes |
| D8 | 1–8 | Octahedron | Longsword/rapier damage, cleric hit dice, medium weapons |
| D10 | 1–10 (or 0–9) | Pentagonal trapezohedron | Barbarian hit dice, heavy crossbow, paired with another D10 for percentile |
| D12 | 1–12 | Dodecahedron | Greataxe damage, barbarian weapon, hit dice for barbarians |
| D20 | 1–20 | Icosahedron | Attack rolls, saving throws, skill checks — the core mechanic of D&D 5e |
| D100 | 1–100 | Percentile (two D10s) | Wild magic surge tables, percentage-based skill checks, random encounter tables |
Standard dice notation combines these: NdX means roll N dice with X sides each. 2d6 means two six-sided dice (result: 2–12). 3d8+5 means three eight-sided dice summed plus a fixed modifier of 5 (result: 8–29). 4d6 drop lowest (the classic ability score method) means roll four D6s and discard the lowest result, summing the remaining three (range: 3–18, mean around 12.24).
A random number generator cannot improve your odds of winning the lottery — no strategy can, because the draws are independent and uniformly random. However, understanding the mathematics reveals why some choices are strategically smarter despite having identical winning odds. The probability of winning Powerball's jackpot is 1 in 292,201,338. This is calculated using the combination formula C(69,5) × C(26,1) = 11,238,513 × 26. Every single combination of five main numbers plus one Powerball has exactly this probability.
Where strategy enters is in jackpot sharing. If your winning combination is also played by many other people, you split the prize. Combinations based on dates (birthdays, anniversaries) cluster heavily in the 1–31 range because months and days don't exceed 31. If you play numbers above 31, you don't increase your probability of winning, but if you do win, you're statistically less likely to share the jackpot with multiple other winners. A random number generator with a full range (1–69 for Powerball main numbers) distributes picks uniformly across the entire number space, naturally avoiding the birthday clustering problem.
Mega Millions odds are 1 in 302,575,350 (C(70,5) × C(25,1)). EuroMillions stands at 1 in 139,838,160. Lotto 6/49 at 1 in 13,983,816 is considerably better odds for a jackpot than the American lotteries, though the prizes are correspondingly smaller. All of these make buying multiple tickets marginally improve your absolute odds but not enough to overcome the house edge — lotteries return roughly 50 cents on every dollar in prize money.
Running a fair raffle with this tool is straightforward. Assign each entry a sequential number starting from 1. Note the total count. Generate one random number between 1 and the total. That number corresponds to the winner. For multiple prizes, switch to Multiple mode, enable No Duplicates, and generate as many numbers as there are prizes. The no-duplicates guarantee means each entrant can win at most once. Copy or export the results immediately for a transparent, auditable record of the draw.
A/B testing requires randomly assigning users to groups without bias. Generate a 1 or 2 for each user (1 = Group A, 2 = Group B) using Multiple mode with a range of 1–2. Over large samples this produces roughly equal group sizes. For more granular splits — 70% control, 30% treatment — generate numbers 1–100 and assign 1–70 to control and 71–100 to treatment.
In statistics, random sampling means every member of a population has an equal chance of being selected. Number your population 1 through N, generate the required sample size using Multiple mode with No Duplicates enabled to prevent any individual being selected twice. This produces a simple random sample meeting the assumptions of most inferential statistical tests. The Fisher-Yates shuffle algorithm used for unique selection is O(n) and produces provably uniform distributions across all possible samples.