Random Number (seeded)
Deterministic pseudo-random integers from a seed (reproducible).
About this calculator
Despite the name, this is not a source of genuine randomness — it's a fully deterministic linear congruential generator (LCG), the same class of algorithm C's rand() historically used, seeded and stepped by `seed = (1664525 * seed + 1013904223) >>> 0` (line 18). Given the same Seed, Min, and Max every time, it produces the exact same three draws and Next Seed State every time — that determinism is why this calculator, unlike a truly nondeterministic random-number source, can carry mechanically-verified factual claims about its own behavior at all. It also swaps out-of-order bounds rather than erroring: `Math.min(lo, hi)` and `Math.max(lo, hi)` (lines 15-16) mean typing Min=100 and Max=1 quietly produces draws between 1 and 100, not an error or an empty range.
One coincidence worth knowing before reading too much into what changing the seed appears to do: at Seed=42, Min=1, Max=100, a seed of 37 and a seed of 46 both happen to produce 26 as the very first draw — purely by chance, since the LCG maps two different seeds into the same 1-to-100 bucket on that particular draw — while the second and third draws from those same two seeds diverge sharply (64 vs 46, 16 vs 32). What this does not account for: any statistical test of the LCG's own randomness quality (period length, correlation between successive draws) — it is fast and reproducible, not cryptographically or even statistically strong.
Inputs
Results
Draw 1
26
How to Use This Calculator
- Enter a seed value to initialize the pseudo-random number generator.
- Set the minimum and maximum bounds for the output range (inclusive).
- View three deterministic random draws and the next seed state.
- Using the same seed always produces the same sequence, making results reproducible.
How the result changes with Max (inclusive)
| Max (inclusive) | Draw 1 |
|---|---|
| 50 | 13 |
| 75 | 19 |
| 150 | 38 |
| 250 | 64 |
What each input means
- Seed
- Change seed for different sequence.
- Min (inclusive)
- Lower bound.
- Max (inclusive)
- Upper bound.
How this is calculated
Formula
LCG: seed = (1664525 × seed + 1013904223) mod 2³² | result = min + floor(random × (max − min + 1))Engine last updated . Checked against 3 independently-derived tests — how we verify calculators. Built by Paul Gunder, a software engineer, not a licensed financial, medical, or legal professional.
Frequently Asked Questions
Is this calculator actually using JavaScript's built-in random-number function?
No — it's a seeded linear congruential generator, a fully deterministic algorithm (line 18) that produces the identical sequence of draws every time you supply the same Seed, Min, and Max. That's a deliberate design choice for reproducibility: two people using the same seed and range get exactly the same three numbers, which a truly nondeterministic source could never guarantee.
What happens if I set Min higher than Max, like Min=100 and Max=1?
The calculator does not error or return an empty range. It computes `a = Math.min(lo, hi)` and `b = Math.max(lo, hi)` (lines 15-16) before generating any draws, so it silently reorders the two bounds and produces numbers between 1 and 100 regardless of which field you called "Min" and which you called "Max."
Why did Draw 1 come out identical for two noticeably different seed values?
It's a coincidence specific to that particular pair of seeds and this particular range, not evidence that Seed doesn't matter. A seed of 37 and a seed of 46 both happen to land on 26 as their first draw within a 1-to-100 range — but their second and third draws diverge immediately (64 vs 46, then 16 vs 32), confirming the seed drives every draw; the first one just landed on the same bucket by chance.
Does the Min or Max bound affect Next Seed State?
No — Next Seed State is purely the internal LCG value after three update steps (line 18 run three times), and that recurrence never references Min or Max at all; only Seed itself determines where the sequence starts and where Next Seed State ends up.
Related Calculators
The questions that sit next to this one — chosen by subject, including calculators filed under a different category.
Password Generator
Generate secure random passwords with customizable length and character sets. See password strength and entropy.
Math & StatisticsPercentage Calculator
Calculate percentages easily — find a percentage of a number, percentage increase/decrease, and percentage change between two values.
Math & StatisticsFraction Calculator
Add, subtract, multiply, or divide fractions. Get simplified results, mixed numbers, and decimal equivalents.
Math & StatisticsStandard Deviation Calculator
Calculate the mean, median, standard deviation, and variance for a set of numbers. Supports both population and sample calculations.
More in Math & Statistics.