OhMyCalc

Random Number Generator

Generate random integers or decimals within a range. Control quantity, precision, and whether repeats are allowed. Copy results with one click.

How to Use the Random Number Generator

  1. Configure the settings or parameters for your needs.
  2. Click the action button to generate or compute the result.
  3. Review the output and copy it if needed.
  4. Repeat or adjust settings for different results.

Quick Reference

FromTo
1 in 250%
1 in 616.7%
1 in 1010%
1 in 1001%
1 in 1,0000.1%
1 in 1,000,0000.0001%

Use Cases

Formula

Random integers in [min, max]: Math.floor(Math.random() × (max − min + 1)) + min. For decimals, the value is scaled to the range and rounded to the desired precision.

Frequently Asked Questions

Are the generated numbers truly random?
Browsers use a pseudo-random number generator (PRNG). The results are statistically uniform and suitable for games, sampling, and simulations, but not for cryptographic purposes.
What does 'no repeats' mean?
When enabled, each generated number will be unique — no value appears more than once. The count must not exceed the number of possible values in the range.
Can I generate decimal numbers?
Yes. Uncheck 'Integers only' and set the desired number of decimal places. The generator will produce numbers with that precision within your specified range.