Pick a Number — How to Use the Random Number Generator
This random number generator can produce pseudorandom numbers within a given range. You can pick numbers from −999,999,999,999,999 to 999,999,999,999,999, choose to generate integers or decimals (up to two decimal places), include or exclude the minimum and maximum values, disallow duplicates (random number generator with no repeats), and sort results from smallest to largest.
Single Random Number Generator
If you want to generate one random number, choose a minimum value and a maximum value, then click Generate. To generate again with the same settings, simply press the button again — a new pseudorandom number will be produced each time.
By default, minimum and maximum values are included in the range, but you can uncheck Include minimum value or Include maximum value in the Generator Options section to exclude them.
Random Number List Generator
Select Multiple numbers in the Generate field, then enter how many numbers you need (up to 1,000). You will instantly see a sequence of random numbers.
- To avoid duplicates, uncheck Allow duplicates — useful for lottery picks, random sampling, or shuffled lists.
- To sort the output, check Sort results (ascending) — results will be ordered from smallest to largest.
Unit / Label Field
You can optionally attach a unit or label to your numbers. Type any symbol or word in the Unit / Label field:
- Metric system: m, cm, mm, km, kg, g, L, mL
- US / Imperial system: ft, in, mi, lb, oz, gal
- Currencies: $ (USD), ₽ (RUB), € (EUR), £ (GBP), ¥ (JPY / CNY), CHF, C$, A$, ₹, ₺, R$
- Other: %, pcs, pts, or any custom label
The label is shown as a suffix after each generated number: 42 m, 15 $, 3.14 kg.
Possible Applications of the Random Number Picker
- Random 4-digit number: Set min = 1,000 and max = 9,999.
- Pick a number from 1 to 10: Set min = 1 and max = 10.
- Random phone number digits: Select Multiple numbers, count = 7 (or 10 for US), min = 0, max = 9.
- No-repeat raffle draw: Set your range, select Multiple numbers, uncheck Allow duplicates.
- Generate 5 random numbers: Select Multiple numbers and enter 5 in the count field.
- Random price: Set type to Decimal, enter a price range, and type $ or ₽ in the Unit field.
- Random measurement: Set a range and type m or ft in the Unit field.
What Is RNG, and How Do Random Number Generators Work?
RNG (random number generator) is a device or algorithm that produces a sequence of numbers that cannot be predicted — each outcome has the same probability of being chosen.
Rolling dice is a physical random number-generating method: each result has a probability of P = 1/6. Flipping a coin is another: heads or tails each have a 50% probability. As you observe more outcomes, the distribution converges to even — this is known as the law of large numbers.
True Random Number Generators and Pseudorandom Number Generators
There are two main approaches to generating random numbers:
- True random number generators (TRNG) rely on physical phenomena — background radiation, thermal noise, or other hardware sources. They are inherently unpredictable and are used for cryptographic key generation.
- Pseudorandom number generators (PRNG) use a deterministic algorithm that takes a seed (often part of the current system time) and applies a mathematical function to produce numbers that appear random. For gameplay, graphics, simulations, and most everyday uses, PRNGs are perfectly adequate.
This calculator uses PHP's random_int() function, which draws from the operating system's cryptographically secure pseudorandom source (CSPRNG) — the same source used for secure key generation. The results are not "truly" random in the physics sense, but they are statistically indistinguishable from random for all practical purposes.
FAQs
What does RNG mean?
RNG stands for random number generator. It is an algorithm that produces a sequence of numbers where each outcome has the same probability of being chosen. RNG is widely used in games, simulations, cryptography, and statistics.
What is the difference between TRNG and PRNG?
TRNG (true RNG) uses an unpredictable physical process as its source of entropy. PRNG (pseudorandom number generator) uses a deterministic algorithm seeded with an initial value. PRNGs are fast and suitable for most purposes; TRNGs are used when cryptographic security is paramount.
What is a pseudorandom number?
A pseudorandom number is an outcome that appears unpredictable but is actually produced by a well-defined mathematical algorithm. Given the same seed, a PRNG will always produce the same sequence — this is why keeping the seed secret is important in cryptographic applications.
Can I use this generator for lotteries or gambling?
This generator is suitable for casual draws, raffles, classroom activities, and games. For regulated gambling or legal lotteries, a certified hardware TRNG should be used to meet legal requirements.