Math

Free Random Number Generator

Uniformly random integers or decimals in any range.

  • Free Forever
  • No Registration Required
  • Instant Results
  • Downloadable Reports
  • Mobile Friendly

Inputs

Result

Random number

19

Sum19.0000
Mean19.0000

Your result is ready.

Download your free detailed report — inputs, result, formula and explanation included.

Estimates only. Verify with a professional for consequential decisions.

  • Always Free
  • No Hidden Costs
  • No Account Required
  • Unlimited Calculations
  • Instant Reports

Short answer

For an integer between min and max inclusive: floor(random × (max − min + 1)) + min. For a decimal: random × (max − min) + min.

What is the Random Number Generator?

A pseudo-random number generator producing uniformly distributed integers or decimals over a range.

How does the Random Number Generator work?

Scale a uniform [0,1) sample by the range width and shift by the minimum. Floor for integers.

Formula

int: floor(rand · (max − min + 1)) + min; dec: rand · (max − min) + min

Variables

  • randUniform [0, 1) — from Math.random()

Explanation

Browsers use PRNGs (typically xorshift128+ or PCG variants) — suitable for games and testing, not cryptography.

Examples

Example 1: 1 to 100, integer

One draw uniformly from {1, 2, …, 100}.

Applications

  • Games and simulations
  • Test data generation
  • Random sampling

Advantages

  • Configurable range and count
  • Integer or decimal output

Limitations

  • Not cryptographically secure — do not use for keys, tokens, or lotteries

Common mistakes

  • Using Math.random() for security-sensitive contexts

Tips

  • For security, use crypto.getRandomValues() in a dedicated tool

Related concepts

The Random Number Generator sits inside the Math Calculators hub, in the statistics & probability cluster. Describing data and quantifying uncertainty. Understanding the terms below makes the output easier to interpret and easier to compare against neighbouring measures.

distributiondispersionsignificancesamplepopulationexpected value

Practical use cases and industry applications

Understanding Random Number Generator

A pseudo-random number generator producing uniformly distributed integers or decimals over a range. Within math calculators, random number generator belongs to the statistics & probability cluster, where it shares terminology and assumptions with closely related tools.

Learning how random number generator is calculated

Browsers use PRNGs (typically xorshift128+ or PCG variants) — suitable for games and testing, not cryptography. Working through the variables one at a time — rand — makes the result reproducible by hand and easier to sanity-check.

Using random number generator to make a decision

Games and simulations Test data generation Random sampling Because outputs depend on the assumptions you enter, run more than one scenario before committing to a figure.

How random number generator compares with related measures

distribution, dispersion, significance, sample all describe adjacent aspects of statistics & probability. Comparing this calculator's output against those measures — using the related tools listed on this page — prevents a single metric from being read in isolation.

Frequently asked questions

Is this truly random?

No — pseudo-random. Statistically indistinguishable from random for casual purposes but predictable in principle.

Related calculators

More statistics & probability tools

We value your privacy

We use cookies to run the site, remember your preferences, and — with your permission — show relevant ads and measure traffic. See our Cookie Policy.