Random Number Generator Tool
Generate random integers, decimals, normal samples, dice rolls, coin flips and lottery selections. Configure ranges, precision, counts, uniqueness and repeatable seeds, then inspect summary statistics, interactive histograms, frequency tables and downloadable results directly in your browser.
Generated entirely in your browser. No data is uploaded. Unseeded draws use browser cryptographic randomness when available. Not intended for security tokens or regulated gambling.
Table of Contents
Highlights
- Six modes: integers, decimals, normal, dice, coin and lottery
- Custom ranges, sample sizes, precision and no-repeat options
- Optional repeatable seeds for reproducible sequences
- Interactive frequency histogram, summary statistics and paginated tables
- Export results as CSV, JSON or TXT and charts as PNG
How Random Number Generator Works?
Uniform integer sampling selects each permitted whole number with approximately equal probability. The minimum is included; the maximum can be included or excluded. Uniform decimals are selected from a discrete grid determined by the chosen decimal places. For N equally likely possible outcomes, the probability of any particular outcome on a single draw is:
For normal samples, the generator uses the Box–Muller transformation to turn uniform random values into observations centred around the specified mean μ and spread defined by the positive standard deviation σ. Dice mode sums the configured number of dice with the selected side count; coin mode returns heads or tails with equal nominal probability. Lottery mode draws distinct values from 1 to the pool size without replacement.
| Setting or output | Meaning |
|---|---|
| Number of results | Sample size, from 1 to 10,000, except lottery mode where the selected pick count determines the draw size. |
| No repeated values | Prevents duplicate integers or decimals where this option applies. |
| Repeatable seed | Reproduces the same pseudorandom sequence when settings and seed are unchanged. |
| Mean and median | Sample average and central ordered value. |
| Standard deviation | Population-style spread of the generated sample, dividing squared deviations by the sample count. |
| Unique outcomes | Number of distinct observed values. |
The histogram groups outcomes into frequencies, with selectable bin counts for larger sets. The frequency table additionally shows each observed result's count and percentage share. Values can be sorted, copied or exported as CSV, JSON or TXT, while the chart can be saved as PNG.
Practical Use Cases
Teachers and students: Create samples of integers or decimals to illustrate probability, averages, medians, histograms and sampling variation.
Researchers and analysts: Generate repeatable synthetic samples with a text seed to test statistical workflows and compare outcome distributions.
Board game designers: Simulate repeated rolls of multiple dice, compare frequency patterns and check whether rare totals appear as expected.
Event organisers: Draw unique numbers from a defined pool for informal giveaways or participant selection, subject to applicable fairness requirements.
Software testers: Export number lists as CSV, JSON or TXT for testing sorting, validation and data-display interfaces.
Probability learners: Flip virtual coins repeatedly, then compare the observed heads and tails percentages with the theoretical 50/50 split.
Accuracy and Limitations
Unseeded results use the browser's cryptographic random source where available, otherwise Math.random(); seeded results use a deterministic pseudorandom sequence, not cryptographic security. Integer and decimal choices use finite-resolution random values, so perfect uniformity is not guaranteed. Normal values are rounded to the selected decimal places, and displayed standard deviation uses the sample's n divisor rather than the unbiased n − 1 estimator. Samples are capped at 10,000 results, decimal precision is limited to the offered options, and lottery draws contain at most 100 selected numbers from a pool of at most 100,000. Results are unsuitable for security credentials or regulated gambling.