Skip to content
CalculatorAtlas

Random Number Generator

Tested

Random integers in a range, optionally repeatable with a seed.

Tested, not yet published. The formula for this calculator is implemented and passes its automated checks. This page stays non-indexable until it is reviewed and published.

Results

Enter your values and press Calculate. Results appear here.

  • • Result

Quick answer

Each value is min + ⌊u × (max − min + 1)⌋ where u is a pseudo-random number in [0, 1). With minimum 1, maximum 100 and seed 42 the calculator returns 61, 45, 86, 67, 18, which sum to 277, and the same seed gives the same list every time.

Enter the range, how many numbers you want, and optionally a seed. The calculator returns the numbers and their sum. It is a random number generator with an optional seed.

Related tools: Prime Number Calculator: Check whether a number is prime and find the next prime. Complex Number Calculator: Add, subtract, multiply and divide complex numbers. Scientific Calculator: Evaluate expressions with functions, constants, powers and factorials.

How to use the Random Number Generator

  1. Enter minimum (a whole number). It starts at 1.
  2. Enter maximum (a whole number). It starts at 100.
  3. Enter how many (a whole number, between 1 and 1000). It starts at 5.
  4. Optionally, enter seed (optional, for repeatable results) (a whole number).
  5. Press Calculate to see the result, and use Reset to start again.
Inputs of the Random Number Generator
InputWhat to enterAllowed values
MinimumA whole numberstarts at 1
MaximumA whole numberstarts at 100
How manyA whole number≥ 1, ≤ 1000, starts at 5
Seed (optional, for repeatable results) (optional)A whole number—

Formula and method

Formula

value = min + ⌊u × (max − min + 1)⌋, u ∈ [0, 1)

IEEE-754 double precision; shown to at most 6 decimal places.

With a seed the numbers come from the mulberry32 generator, so the same seed always gives the same list. Without a seed the browser's cryptographic generator is used. Not suitable for security-critical secrets.

Worked examples

These examples are verified: each one is an automated test case that the live calculator must reproduce exactly.

Example 1

Inputs: Minimum = 1; Maximum = 100; How many = 5; Seed (optional, for repeatable results) = 42.

Results of example 1
ResultValue
Random numbers61, 45, 86, 67, 18
Sum277

Example 2

Inputs: Minimum = 1; Maximum = 6; How many = 4; Seed (optional, for repeatable results) = 7.

Results of example 2
ResultValue
Random numbers1, 1, 6, 5
Sum13

The first line is the headline result (random numbers). Below it the random Number Generator lists sum, which describe the same case from other angles. IEEE-754 double precision; shown to at most 6 decimal places.

Seeds and repeatability

A seed makes the sequence repeatable, useful for demonstrations and sampling you want to reproduce. Leave it blank for a different list each time.

Not for security

The numbers come from a pseudo-random generator, fine for games, sampling and raffles you run yourself, but not for passwords, keys or anything where an attacker could benefit from predicting the values. Duplicates can appear, because each draw is independent. The tool returns at most 1,000 values.

How the result changes with minimum

Holding every other input at the first worked example, this table changes only minimum. It shows how sensitive the answer is to that one value; each row was produced by running this calculator.

How the result changes with minimum
MinimumRandom numbersSum
161, 45, 86, 67, 18277
261, 46, 86, 68, 19280
462, 47, 86, 68, 20283

What happens with invalid input

These messages are produced by the calculator itself, so you know what to fix.

  • Maximum: entering "1" shows "Maximum must be at least the minimum." beside that field and no result.
  • How many: entering "0" shows "How many must be at least 1." beside that field and no result.

Choosing between the Random Number Generator and similar calculators

Each row shows what a related calculator on this site asks for and what it returns, so you can pick the one that matches your question.

Choosing between the Random Number Generator and similar calculators
CalculatorYou enterIt returns
[Prime Number Calculator](/math/prime-number-calculator/)numberResult
[Complex Number Calculator](/math/complex-number-calculator/)real part of z₁, imaginary part of z₁ and operationResult
[Scientific Calculator](/math/scientific-calculator/)expression and angle modeResult
[Roman Numeral Converter](/math/roman-numeral-converter/)convert and valueRoman numeral
[Fibonacci Sequence Calculator](/math/fibonacci-sequence-calculator/)position nF(10)

Assumptions and limitations

  • Maximum must be at least the minimum
  • At most 1,000 values

If a required value is empty, not a number, or outside its allowed range, the form marks that field with a message and shows no result instead of a misleading number. The automated checks deliberately try invalid entries for maximum and how many to confirm this.

Frequently asked questions

Can numbers repeat?

Yes, each draw is independent.

Is it truly random?

It is pseudo-random.

Can I use it to pick a winner?

Yes, with a published seed for transparency.

What does the Random Number Generator calculate?

Random integers in a range, optionally repeatable with a seed. It returns Random numbers and Sum.

What formula does the Random Number Generator use?

value = min + ⌊u × (max − min + 1)⌋, u ∈ [0, 1). With a seed the numbers come from the mulberry32 generator, so the same seed always gives the same list.

What do I need to enter in the random Number Generator?

You enter Minimum, Maximum and How many. Optional: Seed (optional, for repeatable results).

How is the result rounded or limited?

IEEE-754 double precision; shown to at most 6 decimal places. Maximum must be at least the minimum.

What are the limits of this calculator?

Maximum must be at least the minimum. At most 1,000 values.

What is an example of a random Number Generator result?

With minimum 1, maximum 100, how many 5 and seed (optional, for repeatable results) 42, the random numbers is 61, 45, 86, 67, 18.

Where does the method come from?

The method follows: mulberry32 PRNG (Tommy Ettinger, public domain).

Sources

  • mulberry32 PRNG (Tommy Ettinger, public domain)

Content last reviewed 2026-11-04. Formulas and worked examples are checked by automated tests against independently computed values.