Random Number Generator
Draws inclusive random integers or decimals in [min, max]. Optional seed uses mulberry32 for reproducible demos; unseeded draws use Math.random. Not for security use.
Limitation: Educational PRNG only.
How to Generate Random Numbers
Set the inclusive bounds, how many values you need, and whether you want integers or decimals.
Enter minimum and maximum (max ≥ min).
Inclusive means both ends can appear
A die labeled 1–6 can return 1 and can return 6. That is intentional.
What “Random” Means Here
This worksheet documents its generator: seeded mulberry32 for reproducible demos, or Math.random when no seed is provided. Neither is suitable for security.
Worked RNG Examples
Dice-style integers
Range settings
Draws
Same seed → same sequence for grading or screenshots.
Single fixed bound
Range settings
Draws
When min = max, every draw equals that value.
Seed for worksheets
Publish the seed with homework so every student regenerates the same sample set.
Frequently Asked Questions
Still have questions about this calculation?
Try the CalculatorInclusive Sampling
Uniform unit samples U ∈ [0, 1) map into the closed interval you requested.
Formula
Integer draw
min + ⌊U × (max − min + 1)⌋
Decimal draw
clamp(round(min + U × (max − min), p), min, max)
Security note
Use crypto.getRandomValues for secrets
Scientific Background
Assumptions: finite bounds and modest count. Limitations: browser Math.random quality varies; seeded mode is deterministic by design, which is useful for teaching and useless for secrecy.
Sources & review
Random Number Generator documents the references behind its formulas and assumptions. Always treat results as educational estimates, not personalized professional advice.
Last reviewed
July 22, 2026
Free Calculator Hub methodology
Free Calculator Hub
/methodology
See our methodology and corrections policy.