Skip to main content
RT
RoughTools.com
free online toolsNo signup required
🎲

Free Random Number Generator

Generate random integers or decimal numbers in any range. Set minimum, maximum, and quantity — with optional unique (no-repeat) mode. Free, private — all generation happens in your browser.

⚡ Instant results🔒 100% private🆓 Always free🚫 No signup🎯 Uniform distribution
Configure your options above and click Generate — results appear instantly.

About This Random Number Generator

The Random Number Generator produces pseudorandom numbers within any range you specify — integers or decimals, one at a time or in batches, with or without repeats. It is built for everyday use: running a fair raffle, rolling virtual dice, selecting random samples for data analysis, assigning participants to experimental groups, or simply making a random decision when you are stuck.

True Randomness vs Pseudorandomness

All digital random number generators are technically pseudorandom — they use deterministic algorithms that produce sequences which pass statistical tests for randomness but are not random in the physics sense. True randomness requires a physical entropy source: atmospheric noise (used by random.org), thermal noise in electronic circuits, radioactive decay timing, or quantum tunnelling events.

For the overwhelming majority of use cases — games, simulations, raffles, sampling, decision support — pseudorandom numbers are perfectly adequate and statistically indistinguishable from true random in any practical test. This tool uses the browser's crypto.getRandomValues() API when available, which sources entropy from the operating system and is suitable for security applications (generating tokens, nonces, and session IDs).

How JavaScript Random Number Generation Works

The classic Math.random() function in JavaScript returns a floating-point number in [0, 1). To generate a random integer in [min, max], the standard formula is:

Math.floor(Math.random() × (max − min + 1)) + min

The crypto.getRandomValues() API fills a typed array with cryptographically strong random bytes sourced from the OS entropy pool (e.g., /dev/urandom on Linux, BCryptGenRandom on Windows). These bytes are then mapped to the desired range using rejection sampling to avoid modulo bias — ensuring a perfectly uniform distribution.

Seeding RNGs — When Reproducibility Matters

A seed is a starting value for a pseudorandom number generator. The same seed always produces the same sequence of numbers. Seeds are valuable in scientific simulations and software testing where you need reproducible results — you can document the seed and regenerate the exact same random sequence later. Browser-based RNGs (including this tool) are seeded automatically from OS entropy and do not expose seed control, which is appropriate for fairness-critical applications where reproducibility would allow prediction.

Privacy Notice

All number generation happens entirely in your browser. No inputs or outputs are transmitted to any server, stored in any database, or shared with third parties. See our Privacy Policy for full details.

Quick Reference

Input / ParameterDescriptionExample Value
Min valueLowest possible number in the output range (inclusive)1
Max valueHighest possible number in the output range (inclusive)100
CountHow many random numbers to generate in one click5 numbers
Include endpointsWhether min and max can appear in output (always yes)Yes (inclusive)
Unique modeRequire no duplicates in the generated setOn for raffles
OutputList of generated random numbers ready to copy or export47, 3, 91, 22, 68

When to Use This Calculator

🎁
Office raffle or giveaway

Number participants, set the range, generate a winner. Fair, instant, and defensible — everyone has an equal chance.

🎲
Game dice rolls and board games

Simulate any die from d4 to d20 by setting the maximum to 4, 6, 8, 10, 12, or 20. Generate multiple dice simultaneously.

👥
Random team selection

Generate unique random numbers to assign players or students to teams without bias, favouritism, or predictable patterns.

📋
Statistical sampling

Select a random sample from a numbered list of items, participants, or records for surveys, audits, or quality control checks.

🔬
A/B test group assignment

Randomly assign participants or sessions to control and treatment groups to ensure unbiased experimental results.

💡 Pro Tips

1

For cryptographic purposes — generating tokens, session IDs, API keys, or passwords — never use Math.random(). It is not cryptographically secure. Use crypto.getRandomValues() or a language-level CSPRNG (Python's secrets module, Node's crypto.randomBytes()). This tool uses crypto.getRandomValues() when available.

2

When choosing lottery numbers, generate as many sets as you like — each set is equally likely to win. There is no hot or cold number, no lucky pattern, and no strategy that improves your odds. The only variable you control is how many tickets you buy, which linearly increases your chances.

3

For a fair raffle with named participants, the correct method is: list all participants, number them 1 to N, set min=1 and max=N, generate 1 random integer, and award the prize to the participant at that index. This ensures every participant has exactly a 1-in-N chance.

4

"Feeling random" and being statistically random are completely different things. Humans are terrible random number generators — we avoid repeating digits, avoid patterns, and overweight certain numbers. For anything requiring genuine unpredictability, always use a computer-generated RNG.

Frequently Asked Questions

🎲
Probability Calculator
Calculate event probabilities and odds
📊
Statistics Calculator
Mean, median, mode, standard deviation
📏
Sample Size Calculator
Required sample size for surveys and studies

Your input is processed locally in your browser and is never stored, transmitted, or shared with any server. See our Privacy Policy.

Share This Tool

X / TwitterWhatsAppLinkedIn