Impact-Site-Verification: 1fce05f2-a6cf-4f31-8ca1-aaddc332516c

Random Number Generator

Inclusive integer or decimal draws for class demos and worksheets—with an honest security disclaimer.

Inclusive range
Optional seed
Not crypto

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.

Jump to calculator · Sources & review

How to Generate Random Numbers

Set the inclusive bounds, how many values you need, and whether you want integers or decimals.

1

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

min:1
max:6
count:5
mode:integer
seed:42

Draws

Reproducible five rolls in 1…6

Same seed → same sequence for grading or screenshots.

Single fixed bound

Range settings

min:10
max:10
count:3
mode:integer

Draws

10, 10, 10

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

No. Use the Web Crypto API (crypto.getRandomValues) or a dedicated CSPRNG.

Still have questions about this calculation?

Try the Calculator

Inclusive Sampling

Uniform unit samples U ∈ [0, 1) map into the closed interval you requested.

Formula

min ​+​ ⌊U ​×​ ​(​max − min ​+​ 1​)​⌋

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.