Skip to content
Embed

Paste this on your site. The attribution link is required and is what makes embedding free.

Random Number Generator — Free Online Number Picker

Generate random numbers for lotteries, raffles, games, and everyday decisions.

Generated Numbers

8898316320
Count5
Sum300
Average60.00
Smallest20
Largest98

Common Random Number Ranges Reference

Use Case Min Max Count Duplicates
Coin Flip 1 2 1 N/A
Dice Roll (6-sided) 1 6 1-5 Yes
Powerball Main Numbers 1 69 5 No
Mega Millions Main 1 70 5 No
Raffle (200 tickets) 1 200 1-10 No
Student Group Assignment 1 Class size All No

Related Calculators

About this calculator

How Random Number Generation Works

Random Number = Min + (Random Value x (Max - Min))
Possible Unique Values = (Max - Min) x 10^Decimals + 1
Average (expected) = (Min + Max) / 2

Generation Process Explained

  • Pseudo-Random Generation: The generator uses a pseudo-random number generator (PRNG) built into JavaScript. It produces a random floating-point number between 0 (inclusive) and 1 (exclusive), then scales it to your specified range. While not truly random in the mathematical sense, PRNGs pass rigorous statistical randomness tests and are indistinguishable from true randomness for practical purposes.
  • Range Scaling: The raw random value (0 to 1) is multiplied by the range width (max minus min), then the minimum value is added to shift the result into your desired range. For decimal numbers, the result is rounded to the specified number of decimal places using standard rounding rules.
  • Duplicate Prevention: When duplicates are not allowed, each generated number is checked against all previously generated numbers in the set. If a duplicate is found, a new random number is generated and checked again. This process continues until a unique value is produced or a safety limit of attempts is reached, ensuring the generator does not enter an infinite loop when the range is nearly exhausted.
  • Statistics Calculation: After all numbers are generated, the tool calculates the sum by adding all values, the average by dividing the sum by the count, and identifies the smallest and largest values. These statistics update each time you generate a new set.

Step-by-Step Example

Generate 6 unique numbers from 1 to 49 for a lottery pick (0 decimal places, no duplicates):

  1. Possible unique values: 49 - 1 + 1 = 49 values in the range
  2. Generate 6 unique values: for example, 7, 23, 31, 42, 15, 38
  3. Sum: 7 + 23 + 31 + 42 + 15 + 38 = 156
  4. Average: 156 / 6 = 26.00
  5. Smallest: 7, Largest: 42

The expected average for numbers from 1 to 49 is 25, so our sample average of 26 is close to the theoretical value. With larger samples, the average converges closer to the expected value.

Sources

Disclaimer: This calculator is for informational and educational purposes only. Results are estimates and may not reflect exact values.

Last updated: November 3, 2026