Math

Random Number Generator

Generate a random number between min and max.

CALCULATOR

Enter your numbers

Instant results

THE NUMORIX GUIDE

How to use the Random Number Generator

Last reviewed September 14, 2026

What this calculator does

The engine draws U = Math.

Formula and method

The engine draws U = Math.random() in the half-open interval [0,1), then returns floor(U*(max-min+1))+min, producing an integer endpoint-inclusive range.

Variables and inputs

Min defaults to 1 and Max to 100. The UI accepts numeric bounds with min <= max, while the engine floors the generated result.

Worked example

For min=1 and max=100, if a pseudorandom draw were U=0.37, the result would be floor(0.37*100)+1 = 38. A new button press draws again.

How to interpret the result

Each output is intended to be an equally likely integer in the inclusive range, subject to the behavior and quality of the browser's pseudorandom generator.

Common mistakes to avoid

Do not assume a previous result changes the next probability, and do not use this tool for secrets, lotteries, or security-sensitive tokens.

Assumptions and limitations

Math.random is not a cryptographic random source, and the engine does not validate integer bounds before flooring. There is no seed or reproducibility control.

Practical use and checks

Use the Random Number Generator for a casual integer draw, a classroom exercise, or a quick simulation input. Set the minimum and maximum both to 7 as a deterministic check; every draw should be 7. For a range of 1 through 6, each click is intended to return one of the six inclusive integers, so 0.37 as an internal uniform draw would map to 3 under the usual formula. Repeated results are normal because the tool samples with replacement; a prior roll is not removed from the next range. The output should be treated as a pseudorandom convenience, not as a measurement or a guarantee of equal outcomes in a tiny sample. A ten-draw list can look uneven even when the generator is behaving as intended. The implementation uses browser Math.random, has no seed or reproducibility control, and is not appropriate for passwords, authentication tokens, money games, regulated raffles, or security-sensitive choices. Bounds should be integers when an integer result is wanted; decimal bounds are floored through the engine's arithmetic and can surprise. It also does not record a proof of fairness or an audit trail. For a consequential selection, use a documented cryptographic or independently supervised random process and preserve the seed, draw method, and participant rules.

Sources and references

COMMON QUESTIONS

Frequently asked questions

Can the same number appear twice?

Yes. Each draw is independent in the intended model and does not remove previous values.

Can I use this for a password or raffle?

No. Browser Math.random is not designed as a cryptographic source or audited raffle mechanism.