All calculators
MathsLive

Random Number Generator

Set the min, max and how many numbers you need.

Short answer

Numbers are generated using your browser's cryptographically-strong random source where available, otherwise Math.random(). Each change of any input regenerates the list.

Range

Fill in the fields above to see your result instantly.

Calculation method, coverage and version

Inputs used
Minimum, Maximum, How many numbers?, Unique numbers only.
Calculation approach
The calculator applies the rules and assumptions described in “How it works” to the values you enter. Rounding can cause small differences from an official or provider calculation.
Coverage
Maths. UK nations, tax treatment, local rules and provider criteria can differ; check the official sources shown below before acting.
Content version
No page-specific review date is currently published. Treat the result as indicative and verify current rules independently.
Not included unless explicitly requested: personal circumstances not entered, provider discretion, future rule changes, professional fees and case-specific exceptions. Read the full calculator methodology.

How it works

We use crypto.getRandomValues() when your browser supports it (most modern browsers), otherwise fall back to Math.random(). Each integer is uniformly distributed across your chosen range.

Worked example

Min 1, Max 6, Count 1, Unique off → simulates a single dice roll. Min 1, Max 49, Count 6, Unique on → a Lottery line.

Who should use this

  • Picking a winner from a list
  • Choosing test data
  • Random sampling for surveys

Common mistakes

  • ×Confusing 'unique' with 'sorted' — uniqueness doesn't change order
  • ×Setting count higher than the range allows when unique is on

Frequently asked questions

Are the numbers truly random?

Browser crypto-random is suitable for most uses. For cryptographic security, use server-side hardware-backed randomness.

Related calculators