Random Number Generator

Generate random integers or decimals within a range, with uniform or normal (Gaussian) distribution, and optional unique values.

Random Number Generator
Integer Decimal
5
Uniform Normal (bell curve)

📐 How to Use

  1. Set the minimum and maximum values for the range.
  2. Choose "Integer" or "Decimal" and set decimal places if needed.
  3. Set how many numbers to generate (1–1000).
  4. Choose "Uniform" (every value equally likely) or "Normal" (values cluster around the middle, bell-curve distribution).
  5. Enable "Unique values only" to avoid repeats (only available for integers, when the range is large enough).
  6. Click Generate — copy individual values or all at once.

🎯 When to Use This

  • Drawing raffle or lottery numbers for an informal prize, where unique values stops the same ticket being picked twice in one round.
  • Generating a sample of plausible latencies or test scores on the normal setting, so a chart or statistics exercise shows a bell curve instead of a flat band.
  • Choosing which spreadsheet rows to spot-check, by generating a unique set of row numbers between 1 and the length of the sheet.
  • Assigning people to groups or a running order, when you want an impartial answer and nobody wants to argue about who decided it.

❓ Frequently Asked Questions

QWhat is the difference between uniform and normal distribution?
Uniform distribution means every number in the range has an equal chance of being picked — like rolling a fair die. Normal (Gaussian) distribution means numbers near the middle of the range are more likely, and numbers near the edges are rarer — like the classic bell curve.
QHow does "unique values only" work?
When enabled, each generated number is guaranteed to be different from the others — useful for things like lottery numbers or random sampling without replacement. This option requires the range to contain at least as many values as you want to generate.
QIs this suitable for cryptography or security?
No — this tool uses JavaScript's standard random number generator, which is suitable for games, sampling, and general-purpose randomness, but not for generating cryptographic keys, passwords, or security tokens. Use the Password Generator for that.
QCan I generate decimal numbers?
Yes — switch to "Decimal" mode and set how many decimal places you want (0–10).
QIs my data sent to a server?
No. All numbers are generated locally in your browser using JavaScript. Nothing is sent to or stored on any server.

ℹ️ About This Tool

Two distributions cover most needs. A uniform draw gives every value in the range the same chance, as sampling and a fair die require. A normal draw clusters values around a mean with a spread set by the standard deviation, which is how measured quantities such as response times or heights behave. The Box-Muller transform turns two uniform values into a normally distributed one, by way of a square root of a logarithm and a cosine.

Set a minimum and a maximum; values out of order are swapped for you. Integer mode rounds the draw, decimal mode rounds to between 0 and 10 places, and the count runs from 1 to 1000. Normal mode centers the curve on the midpoint and sets the standard deviation to one sixth of the range, so it spans about six deviations. Unique values, for integers only, draws until the set is full, then shuffles.

⚠️ Notes & Limits

  • Integers come from rounding a continuous draw, so the two endpoints are produced about half as often as the values between them. For an exactly uniform integer range that is a real bias.
  • Normal mode clamps anything outside the range back to the boundary, piling roughly a tenth of a percent of draws onto each endpoint. The result is not a true truncated normal.
  • With unique values on, the tool keeps drawing until it has enough distinct ones. Requesting a count close to the size of the range, especially on normal, makes that loop slow.
  • Decimal places go to ten, but double-precision arithmetic carries only about 15 to 17 significant digits, so across a wide range the last places shown are rounding artifacts.