Home/Calculators/Random & Pickers/Random Number Generator

Random Number Generator

Draw a random whole number between any two values you choose.

random-number-generator
Result
—
In summary: A random number generator returns a whole number picked uniformly between your minimum and maximum, with both ends included. With the defaults of 1 and 100 every value from 1 to 100 has the same 1-in-100 chance of coming up. Press Roll again for a fresh draw.

How the random number is chosen

The tool takes your minimum and maximum, counts how many whole numbers sit between them (max − min + 1), and picks one of them with equal probability. Both endpoints are included, so a range of 1–6 behaves exactly like a fair die. Setting 0–1 gives you a coin-style bit; setting 1–49 gives you a lottery-style draw.

The dice roller covers the same ground with a different mechanism.

How to use it

Type the smallest value you want in Minimum and the largest in Maximum, then press Roll as many times as you like. Negative numbers and zero are fine. Each press is independent, so the same number can appear twice in a row — that is normal randomness, not a bug. If you need several numbers with no repeats, use the lottery number generator instead.

Worked example: to pick a winner from 240 entries, number the list, set the range to 1–240 and roll once — every entry has the same 1-in-240 chance.

When you need something similar but not identical, the random list picker is there.

Randomness and security

Every result on this page is produced in your own browser with JavaScript's built-in Math.random() pseudo-random generator. That is perfectly fine for games, giveaways, classroom picks and decision-making, but it is not cryptographically secure — never use it to generate keys, tokens or anything protecting real money or private data. Nothing you type is uploaded; the page never sends your inputs anywhere.

The random letter generator handles the same job in a slightly different way.

Frequently asked questions

Are the minimum and maximum included?
Yes. Both endpoints are part of the range, so 1 to 100 can return 1 or 100.
Can the same number repeat?
Yes. Each roll is independent, so repeats are expected — over many rolls each value appears about equally often.
Can I use negative numbers?
Yes. Any whole numbers work, for example -50 to 50, as long as the maximum is not below the minimum.
Is this random enough for a prize draw?
For informal giveaways, yes. It uses the browser's Math.random(), which is unbiased in practice but not cryptographically secure.
What if the maximum is lower than the minimum?
You get a dash instead of a number, because that range contains no whole numbers. Swap the two values, or set them equal to return that single value every time.
How this tool works

The formula behind this tool is written out in full in the sections above, so you can check the maths yourself. Every calculator on Calculorium is verified against worked examples with automated tests before it is published, and pages are reviewed as formulas or standards change. Nothing you type is sent anywhere — the calculation runs entirely in your browser. Read how we build and check these tools.

Last updated: October 2, 2026 · Calculations run in your browser. Estimates for information only.