Excel RANDBETWEEN vs Online Random Number Generator
Table of Contents
Excel has built-in random number functions: RAND() and RANDBETWEEN(min, max). They work, they are fast, and they are useless for security. For 80% of uses they are fine. For the other 20%, you want a cryptographic random source like free random number generator.
This page covers when each one is right and the practical differences.
How Excel RANDBETWEEN Works
The formula is =RANDBETWEEN(1, 100). It returns a uniformly distributed integer between the two arguments, inclusive. Every recalculation (F9 or any sheet change) generates a new value.
Under the hood, RANDBETWEEN uses Excel's pseudo-random number generator (PRNG) — a deterministic algorithm seeded from the system clock. It is fast, reproducible if you know the seed, and statistically uniform across the requested range.
What it is not: cryptographically secure. Anyone with access to the seed (or the system clock at the time of generation) can reproduce the entire sequence. This is fine for spreadsheet samples and bad for password generation or lottery picks.
When RANDBETWEEN Is the Right Tool
- Generating sample data for a tutorial. "Make me 100 random ages between 18 and 65" — RANDBETWEEN, done.
- Random sample selection from a list. Use RANDBETWEEN to assign each row a random number, sort, take the top N.
- Testing formulas. Throwaway random data for a what-if scenario.
- Monte Carlo simulations. Many iterations of random scenarios for statistical modeling.
- Anything where speed matters more than security. RANDBETWEEN can produce millions of values per second.
For these uses, opening a browser and clicking Generate is slower than just typing the formula.
Sell Custom Apparel — We Handle Printing & Free ShippingWhen to Use an Online Generator Instead
- Lottery quick picks. Pseudo-random can be predicted; cryptographic random cannot.
- Raffle and giveaway winners. You want a defensible "we used a secure source" story.
- Password generation. Never use RANDBETWEEN for passwords. The seed is recoverable.
- Random sampling for research where bias matters. Cryptographic random has no modulo bias; some PRNGs do.
- Decision-making where you do not have Excel open. A browser tab is faster than launching Office.
our random number generator is the right tool when you need real randomness or when Excel is overkill.
RANDBETWEEN Annoyances to Know
- It recalculates on every change. Type something in a different cell and your random numbers all change. Use Paste Special → Values to freeze them.
- Older Excel versions had a bias bug. Pre-2010 RANDBETWEEN had a documented modulo bias for certain ranges. Modern Excel fixed it but the reputation lingers.
- It is not seedable. You cannot reproduce a specific sequence the way you can with Python's random module. For reproducible research, use Python.
- The "no duplicates" feature requires extra formulas. Built-in RANDBETWEEN allows duplicates. To avoid them you need helper columns and SORT/UNIQUE tricks.
our random number generator handles "no duplicates" with a single checkbox. For one-off needs, the online tool is faster.
Generate Random Numbers Now
Set your range, pick how many, optionally avoid duplicates. Cryptographically secure, runs in your browser, nothing logged.
Open Random Number GeneratorFrequently Asked Questions
Is RANDBETWEEN cryptographically secure?
No. Excel uses a pseudo-random generator. Fine for samples, not safe for passwords, tokens, or lottery picks.
How do I freeze RANDBETWEEN results in Excel?
Copy the cells, then Paste Special → Values into the same cells. The numbers become static and no longer recalculate.
Can RANDBETWEEN avoid duplicates?
Not directly. You need helper columns with rank/match formulas, or use the modern array functions (SORTBY, RANDARRAY) in newer Excel.

