Skip to content

Random Number Generator

One random integer between two limits, or many integers and decimals with the precision you choose.

Random Number Generator

One random integer between two limits. It handles very large integers — up to 5,000 digits.

Example

This is a sample result, not your calculation. Enter your own values to replace it.

Set the limits, then generate a number.

Check the limits

Enter whole numbers for both limits.

Comprehensive Version

One or many random integers or decimals, with up to 999 digits of precision.

numbers
Type of result to generate?
digits

Example

This is a sample result, not your calculation. Enter your own values to replace it.

Set the range and how many you want, then generate.

Check the settings

Enter numbers for both limits, how many to generate, and the decimal places if you want decimals.

Two generators

  • The first returns one random integer between a lower and an upper limit. It handles very large integers — up to five thousand digits, far past what ordinary arithmetic in a browser can hold.
  • The Comprehensive Version returns one or many numbers, as integers or as decimals with up to 999 digits of precision, optionally all distinct and optionally sorted.

Both limits are inclusive, so 1 to 100 can return 1 and can return 100, and it does not matter which way round you enter them.

Copy and regenerate

Every result carries Copy and Regenerate. Regenerate draws again from the same settings without going back to the form; Copy puts exactly what is on screen on your clipboard, one number per line. Change a setting and the shown numbers are marked out of date rather than silently replaced — a draw you were reading does not vanish because you nudged a limit.

Where the randomness comes from

Numbers are drawn in your browser through the Web Crypto API, the same source used for cryptographic keys. Nothing is generated on a server, nothing you draw is stored or sent anywhere, and reloading the page gives you a blank generator rather than a number somebody else could have seen.

Each draw uses rejection sampling rather than a remainder. Taking random % range is the obvious approach and it is subtly biased: unless the range divides the random space exactly, the low end of the range comes up slightly more often. For a raffle or a lottery pick that bias is the whole thing you were trying to avoid, so a draw landing in the uneven tail is discarded and taken again.

Distinct values, and sorting

Turn off Allow duplicates for draws where the same number must not appear twice — lottery picks, raffle winners, random seating. The generator refuses rather than looping if you ask for more distinct values than the range holds. Sort results orders them from low to high, which is how lottery numbers are usually written down; leave it off when the order of the draw is itself meaningful.

Decimals and precision

Precision is the number of digits after the point, and the answer carries all of them: ask for 50 and you get 50, with no rounding and no silent truncation. That works because the draw is an exact whole number scaled by a power of ten, not a floating-point multiplication — a double runs out of precision after about 15 digits, so a "random decimal to 50 places" computed the obvious way would be zeros after the sixteenth.

What random does not mean

Each draw is independent of the last. A run of high numbers does not make a low one more likely next time, and a number that came up a moment ago is exactly as likely to come up again — which is why duplicates appear more often than people expect in a long list, and why turning them off is a deliberate choice rather than a correction.

Frequently asked questions

How random are these numbers?

They are generated with the Web Cryptography API, which provides cryptographically strong randomness — far more unpredictable than typical pseudo-random functions. Everything runs in your browser.

How do I generate a random number between two values?

Set the minimum and maximum to your range and generate — the result is a whole number from the minimum up to and including the maximum. For a number between 1 and 100, enter 1 and 100.

Can I generate numbers without repeats?

Yes. Tick the "Unique" box and every number in the result will be different. If you request more unique numbers than the range allows, the generator returns as many distinct values as possible.

Can I use this to pick lottery numbers?

Yes — set the range to your lottery's (say 1 to 49), choose how many numbers you need, and tick "Unique" so none repeat. It draws impartially, though of course it cannot improve your odds.

What is the difference between true and pseudo-random numbers?

Pseudo-random numbers come from a formula and are predictable if you know the starting seed. This generator uses the browser's cryptographic source, which draws on unpredictable system entropy — much closer to "true" randomness and suitable where fairness matters.

About this calculator

Method reviewed for accuracy on August 9, 2026

Built on transparent, unit-tested formulas that run entirely in your browser — see how we build our calculators.

Embed this calculator on your site — free

Add this free, mobile-friendly Random Number Generator to your own website. Paste the code where you want it to appear — it stays up to date automatically, and the frame resizes to fit.

Please keep the attribution link — it's what keeps these tools free to use and embed.