Random Number Generator

Generate random numbers within specified ranges and parameters.

Random Generation

Smallest possible number

Largest possible number

Number of decimal places (0 for integers)

🎲 Quick Presets

Generated Results

Single Random Number

Click Generate to create random values

Random Generation Tips

  • • Use cryptographically secure methods for passwords
  • • Larger ranges provide better randomness distribution
  • • Avoid using generated numbers for cryptographic purposes
  • • Save important results before generating new ones
  • • Consider excluding duplicates for sampling

How it works

A random number generator picks a number within a range you set, with each value equally likely. Computers use pseudo-random algorithms seeded from an unpredictable source, which are statistically random enough for games, sampling, and picking winners.

Random within a range

result = min + ⌊ random() × (max − min + 1) ⌋        (random() is 0 ≤ x < 1)
min, max
the inclusive bounds

Worked example

  • Pick a number from 1 to 100
  1. Scale a 0–1 random value across the range

Any integer 1–100, each with ~1% chance.

Good to know

  • These are pseudo-random — deterministic from a seed, but unpredictable in practice for everyday use.
  • For security (keys, tokens) you need a cryptographically secure generator, not a basic one.
  • Allow or forbid duplicates depending on whether you're sampling with replacement.

Related Calculators