Lucky Number Generator
Generate a set of lucky numbers within your chosen range.
Last updated · View algorithm, constants and default inputs (JSON)
About this calculator
Generating a set of numbers is only satisfying if the same request always gives the same set, so this generator is seeded and can optionally exclude repeats. Change the seed for a new set without losing the old one.
Worked example
calculated with the default values below
How many numbers 6 · Lowest number 1 · Highest number 49 · No repeats No repeats · Seed 88 Lucky numbers 42, 34, 20, 19, 10, 26 · Sorted 10, 19, 20, 26, 34, 42 · Sum 151 · Average 25.17
Disclaimer
These calculators give general estimates for information and entertainment. Platform algorithms, metrics and definitions change without notice, and none of these results are official figures from the platforms named.
Implementation source
This record describes the implementation used by this page. It is not independent validation. External references, when available, support only the stated formula or definition; estimates and custom rules retain their own assumptions.
Formula and variables
v₁, …, v_count: vⱼ = lo + floor(uⱼ × (hi − lo + 1)), uⱼ ∈ [0,1); U = 1 ⇒ vⱼ ≠ vᵢ ∀ i < j
- seed
- PRNG seed
- lo
- lowest value
- hi
- highest value
- u
- pseudo-random value in [0,1)
- v
- generated integer
- count
- how many numbers
- U
- unique-mode flag (1 = no repeats, 0 = repeats allowed)
Seeded Mulberry32-style pseudorandom generator. Unique mode requires range size ≥ requested count; otherwise input is rejected. Deterministic for a given seed; not a cryptographic RNG.
Frequently asked questions
What happens if the range is too small for unique numbers?
When No repeats is enabled, the range must contain at least as many integers as requested. The calculator shows an input error instead of silently returning duplicates. A seed makes a sequence repeatable; it is not cryptographically secure and does not predict lottery results.