⚡ QuickTools
🎲

Random Number Generator

Generate random numbers using three statistical distributions — Integer (discrete uniform), Float (continuous uniform), and Normal (Gaussian bell curve). Supports seeded output for reproducibility, no-duplicates mode, sort order, and instant statistics including mean, median, standard deviation, and mode.

What Is a Random Number Generator?

A random number generator (RNG) produces sequences of numbers that lack any predictable pattern. This tool uses a seeded Linear Congruential Generator (LCG) — a fast, deterministic pseudo-random algorithm used in programming languages and simulation software worldwide. It supports three distinct statistical distributions for different use cases.

🎲
Integer Mode
Roll dice, pick lottery numbers, generate random IDs, shuffle lists, or run randomised trials.
📐
Float (Uniform)
Probability simulations, Monte Carlo methods, random sampling from a continuous range.
🔔
Normal (Gaussian)
Model real-world measurements, simulate test scores, generate synthetic data following a bell curve.

How to Use This Generator

  1. 1
    Choose a Distribution
    Integer for whole numbers, Float for decimals spread uniformly across a range, Normal for bell-curve distributed values.
  2. 2
    Set Count & Range
    Enter how many numbers to generate (up to 10,000) and the minimum/maximum bounds. For Normal mode, set the mean and standard deviation instead.
  3. 3
    Configure Options
    Choose decimal places (float mode), a sort order, and whether duplicates are allowed (integer mode). Toggle a fixed seed for reproducible output.
  4. 4
    Generate & Copy
    Click Generate Numbers. Results appear instantly with all values displayed as chips. Click Copy All to grab the full list as a comma-separated string.
  5. 5
    Review Statistics
    A statistics panel shows count, min, max, sum, mean, median, standard deviation, and mode — instantly useful for data analysis.

How the Distributions Work

🎲

Integer (Uniform Discrete)

Each integer in the range [min, max] has an equal probability of being selected. Formula: value = min + floor(rng() × (max − min + 1))

Example: Rolling a standard die — 6 integers [1, 6], each with exactly 1/6 probability.

📐

Uniform Float (Continuous)

Every value in [min, max) is equally likely. Used in probability simulations and Monte Carlo integration. Formula: value = min + rng() × (max − min)

🔔

Normal / Gaussian Distribution

Uses the Box-Muller transform to convert two uniform random numbers into normally-distributed values. The result clusters around the mean (μ) with spread controlled by standard deviation (σ).

Z = √(−2 ln U₁) × cos(2π U₂)    then    X = μ + σZ

68% of values fall within μ ± 1σ  |  95% within μ ± 2σ  |  99.7% within μ ± 3σ

Worked Examples

① Lottery Quick Pick — 6 unique integers from 1 to 49

Settings: Distribution = Integer, Count = 6, Min = 1, Max = 49, No duplicates = ✓, Sort = Ascending

71423313847

② Monte Carlo π Estimation

Generate pairs of uniform floats in [0, 1] and check if x² + y² ≤ 1 (inside the unit circle). The ratio of interior points × 4 approximates π. With 10,000 pairs this typically gives π ≈ 3.14 ± 0.01.

③ Simulate Test Scores — Normal distribution μ=70, σ=12

Settings: Distribution = Normal, Count = 100, Mean = 70, Std Dev = 12. Expected result: ~68 scores between 58–82, ~95 between 46–94, mean ≈ 70.

Within μ ± 1σ
~68 scores
58 – 82
Within μ ± 2σ
~95 scores
46 – 94
Within μ ± 3σ
~99.7 scores
34 – 106

Frequently Asked Questions

Related Tools

Related Tools