Random Number Generator
Generate random integers or decimals from a stepped range with secure or seeded draws, weighted profiles, exclusions, and repeat controls.{{ summaryTitle }}
{{ summaryLine }}
Latest draw
Generated locally with the current pool and draw policy.
{{ verdictGuidance }}
The chart renderer is unavailable. The draw and session ledger remain available.
| Run | Values | Profile | Engine | Target hits | Copy |
|---|---|---|---|---|---|
| {{ row.id }} | {{ row.values }} | {{ row.profile }} | {{ row.engine }} | {{ row.targetHits }} |
A random draw is only meaningful after its candidate values and selection rules are fixed. Rolling a die, assigning test groups, choosing a lottery set, and replaying a software test may all produce numbers, yet they need different rules for range, repeats, weighting, and reproducibility.
The candidate pool comes from the minimum, maximum, and step. Both endpoints can be included when they land on that step. Decimal precision matters because 0 to 1 by 0.1 contains 11 candidates, while a much smaller step can create an impractically large pool. Exclusions remove candidates after the pool is built.
- Uniform draw
- Every currently eligible value has the same chance of selection.
- Weighted draw
- Values remain eligible, but their chances tilt toward low, high, central, or edge positions.
- With replacement
- Each pick uses the same pool, so repeats are possible and ordinary.
- Without replacement
- A selected value leaves the pool for the rest of a draw or session.
- Seeded sequence
- The same seed and settings recreate the same sequence for testing or demonstrations.
Short samples often contain clusters, gaps, and repeats even when the underlying process is fair. A distribution check can flag a large departure from the selected profile, but it cannot certify a random source from a handful of observations. Use fresh secure draws when unpredictability matters and seeded draws when repeatability matters.
How to Use This Tool:
Define the pool first, then choose the draw policy that matches the task.
- Choose Integer or Decimal, then enter the inclusive minimum, maximum, step, and decimal places. Check the Pool count before drawing.
- Select Uniform baseline for equal chances or a biased profile with its intensity. Add exclusions only for values that must never be selected.
- Choose Secure (Web Crypto) for fresh local draws or Seeded replay for a repeatable sequence. A seeded draw needs a nonblank seed of up to 64 characters.
- Set the quantity and replacement policy. Use Unique within draw or Session no-repeat only when the remaining pool is large enough.
- Select Generate, read the latest values, and use Distribution evidence only after enough runs have accumulated to make a pattern check useful.
Interpreting Results:
The Latest draw is the selected value set. Sorting changes only its display order, while a target watchlist counts matches without changing selection odds. Coverage is the share of eligible values seen during the current session.
- Building sample means fewer than 20 values have been observed and no stronger warning threshold was crossed.
- Monitor drift means the absolute mean z-score is at least 2 or the approximate chi-square p-value is below 0.05.
- Investigate pattern means the absolute mean z-score is at least 3 or the approximate p-value is below 0.01.
- Within expected noise means none of those warning rules fired. It is not proof that a source is fair or secure.
Technical Details:
The draw begins with a finite stepped domain. Decimal values are converted to scaled integers so pool membership, exclusions, and step alignment can be checked without repeatedly comparing rounded decimal strings.
Formula Core:
For decimal precision d, the scale is 10 raised to d; integer mode uses a scale of 1. Candidate positions advance from the scaled lower endpoint by the scaled step.
Here a is the scaled minimum rounded upward, b is the scaled maximum rounded downward, and Δ is the scaled step. Excluded values are removed from the resulting sequence, so the final eligible count can be smaller than n.
A weighted profile assigns a positive weight to each ordered candidate. If p runs from 0 at the lowest value to 1 at the highest and A is four times the selected intensity as a fraction, the profiles use these rules.
| Profile | Weight | Effect |
|---|---|---|
| Uniform | 1 | Equal chance for every eligible value |
| Favor lower | 1 + A(1 - p) | Largest weight at the low endpoint |
| Favor higher | 1 + Ap | Largest weight at the high endpoint |
| Favor center | 1 + A(1 - |2p - 1|) | Largest weight near the middle |
| Favor edges | 1 + A|2p - 1| | Largest weights near both endpoints |
The expected mean and variance use normalized weights, not observed counts.
Rule Core:
Secure draws use cryptographically strong browser random values and reject modulo bias when choosing a uniform index. Seeded replay uses a deterministic pseudorandom sequence, so the same seed and unchanged settings reproduce the same order after a reset. Weighted draws select in proportion to the current weights; without-replacement policies remove chosen values before later picks.
Ranges may span from -1,000,000,000 to 1,000,000,000, quantity is limited to 1 to 1,000 values, decimal precision to 1 to 6 places, and the eligible domain to 120,000 positions. A step must align with the chosen precision. The draw is rejected when the range is reversed, every value is excluded, a unique quantity exceeds the pool, or session no-repeat exhausts the remaining values.
Limitations and Privacy Notes:
Generated values and session history remain in the current browser tab and are not added to a shared URL. A seed is a replay setting, so do not put sensitive text in it. A browser secure draw is appropriate for ordinary unpredictable selection, but the generator is not a certified lottery, gambling, cryptographic-key, or audit system.
- Biased profiles are intentional and must not be described as fair draws.
- Seeded replay is predictable by design and should not protect secrets or prizes.
- Random outcomes have no monetary value, and short-run diagnostics do not prove fairness.
Worked Examples:
Three weighted candidates
For integers 1 to 3 with a step of 1, Favor higher values, and 50% intensity, the weights are 1, 2, and 3. The expected mean is 2.3333, but a single draw can still return any eligible value.
Decimal no-repeat session
A range from 0.0 to 0.2 with a step of 0.1 contains 0.0, 0.1, and 0.2. With Session no-repeat enabled, three one-value runs exhaust the pool and a fourth run requires a reset or a larger range.
FAQ:
Why did my unique draw stop?
The requested quantity exceeds the unused candidate pool. Lower the quantity, remove exclusions, widen the range, or reset a no-repeat session.
Does sorting change the random draw?
No. Ascending or descending order changes only how selected values are displayed; it does not change their selection odds.
References:
- Web Cryptography Level 2, W3C, April 2025.
- Pseudorandom number generator, NIST Computer Security Resource Center.
- Chi-Square Goodness-of-Fit Test, NIST/SEMATECH e-Handbook of Statistical Methods.