Random Number Generator

Choose options and select Generate.

Calculator inputs
?

Lower numerical bound, from −1 billion to 1 billion. Integer mode requires a whole number; decimal mode uses the selected decimal grid.

?

Upper numerical bound. Only representable values on the chosen decimal grid are eligible; endpoints are included when they lie on that grid.

?

Generate 1–1,000 outcomes. Without duplication, this cannot exceed the number of eligible values.

?

Decimal mode samples uniformly from a finite grid, such as 0.10, 0.11, …, 0.20 at two decimal places; it is not a continuous draw.

?

With replacement, each draw is independent and repeated outcomes are valid. Without replacement, later draws depend on earlier draws.

?

Sorting changes only how the generated batch is displayed. It does not generate new outcomes or change sampling probabilities.

How to use the Random Number Generator

Generate random integers or fixed-place decimals, allow or prevent duplicates and sort the results. Inspect the complete draw list, outcome pool and observed frequencies.

  1. 1. Enter your inputs

    Start with Minimum inclusive, Maximum inclusive, Count, Number type. Use the units shown beside each field and open the field help when you need its assumptions.

  2. 2. Read the results

    Select Generate after choosing your inputs. Review numbers, count, pool. Keep the entered units and settings consistent when comparing scenarios.

  3. 3. Check the calculation

    Bounds from −10⁹ to 10⁹ and at most 1,000 draws. This tool does not provide arbitrary precision, a reproducible seed, audited prize-draw records, or a complete key/password-generation protocol. An observed sample need not look evenly spread.

    See the worked example and method

Understanding the Random Number Generator: uses, inputs and results

The Random Number Generator produces uniform random integers within stated inclusive limits for demonstrations, games and sampling exercises.

How do I generate a random number between two limits?

Choose inclusive minimum and maximum bounds, select a number type and press Generate. In integer mode, every whole number in the interval is eligible. From 1 through 6, that gives six possibilities and a first-draw chance of 1/6 for each. A new Generate action creates a new batch.

The Random Number Generator uses Web Crypto random words with rejection sampling. This avoids the small bias created by simply taking a remainder from a random range that does not divide evenly into the requested pool. The complete outcome pool and its grid step are shown below the results.

How can I generate random numbers without duplicates?

Select “No — without replacement.” Every chosen value is removed from the eligible pool for that batch, and the requested count must fit inside the pool. Asking for five unique integers between 1 and 4 is impossible and produces an input error.

Without replacement, the draws are dependent: once a value is selected, it cannot be selected again. With replacement, each draw keeps the same chance for each eligible value and repeats are normal. Neither rule is universally better; they describe different sampling tasks.

Further reading: W3C: Web Cryptography — getRandomValues

What do the Random Number Generator inputs mean?

Minimum inclusive
Lower numerical bound, from −1 billion to 1 billion. Integer mode requires a whole number; decimal mode uses the selected decimal grid.
Maximum inclusive
Upper numerical bound. Only representable values on the chosen decimal grid are eligible; endpoints are included when they lie on that grid.
Count
Generate 1–1,000 outcomes. Without duplication, this cannot exceed the number of eligible values.
Number type
Decimal mode samples uniformly from a finite grid, such as 0.10, 0.11, …, 0.20 at two decimal places; it is not a continuous draw.
Decimal places
Number of digits after the decimal point, from 0 to 6. This is decimal places, not total significant digits. This field applies when Number type is set to Fixed-place decimals.
Allow duplicate values?
With replacement, each draw is independent and repeated outcomes are valid. Without replacement, later draws depend on earlier draws.
Result order
Sorting changes only how the generated batch is displayed. It does not generate new outcomes or change sampling probabilities.

When is the Random Number Generator useful?

Draw within a known range

Set the minimum, maximum and count to generate values from the permitted integer interval.

Understand repeat values

Draws are with replacement, so repeated numbers are possible. The output does not create a unique shuffled sample.

Use the result in context

Bounds from −10⁹ to 10⁹ and at most 1,000 draws. This tool does not provide arbitrary precision, a reproducible seed, audited prize-draw records, or a complete key/password-generation protocol. An observed sample need not look evenly spread.

Try the Random Number Generator·Read the subject guide·Explore a related calculator

Worked example: Random Number Generator

Fixed interval. This fixed reference example shows one complete scenario; the interactive results above use your current inputs.

View the example inputs
Minimum inclusive
7
Maximum inclusive
7
Count
3
Number type
Whole numbers
Allow duplicate values?
Yes — with replacement
Result order
Keep draw order
Calculated results for the fixed example
Calculated quantityExample result
numbers7, 7, 7
count3
pool1

Random Number Generator: make the sampling rule visible

How do I generate a random number between two limits?

Choose inclusive minimum and maximum bounds, select a number type and press Generate. In integer mode, every whole number in the interval is eligible. From 1 through 6, that gives six possibilities and a first-draw chance of 1/6 for each. A new Generate action creates a new batch.

The Random Number Generator uses Web Crypto random words with rejection sampling. This avoids the small bias created by simply taking a remainder from a random range that does not divide evenly into the requested pool. The complete outcome pool and its grid step are shown below the results.

W3C: Web Cryptography — getRandomValues

How can I generate random numbers without duplicates?

Select “No — without replacement.” Every chosen value is removed from the eligible pool for that batch, and the requested count must fit inside the pool. Asking for five unique integers between 1 and 4 is impossible and produces an input error.

Without replacement, the draws are dependent: once a value is selected, it cannot be selected again. With replacement, each draw keeps the same chance for each eligible value and repeats are normal. Neither rule is universally better; they describe different sampling tasks.

How are random decimal numbers generated?

Decimal mode samples a fixed grid at the selected number of decimal places. From 0.10 to 0.12 at two places, the eligible outcomes are 0.10, 0.11 and 0.12. These three values have equal first-draw probability; the tool does not pretend to choose from infinitely many real numbers.

A bound is included only if it lies on the grid. At two places, limits 0.111 and 0.129 allow 0.12 only. The pool table shows the actual eligible endpoints, which may lie inside the entered bounds. Displayed decimals retain trailing zeros so the selected grid is visible in results and exports.

Does sorting random numbers change the sample?

Ascending or descending sorting changes presentation after the draw. It does not select another set of outcomes or make the smallest value more likely to have been chosen. The complete table numbers displayed positions; after sorting, those positions no longer identify the original drawing order.

For a classroom allocation, retain draw order when position assigns a role. For a checklist of selected item numbers, ascending order may be easier to read. Choose the ordering before generating if you need an exported batch with that presentation; changing a setting clears the old result rather than silently mixing settings and outputs.

Why do random results sometimes look uneven?

A small batch does not have to divide evenly among eligible values. With replacement, repeats and gaps are expected possibilities. The observed-frequency chart summarizes what actually appeared; it is not a guarantee that future draws will fill the missing values or balance previous results.

The chart previews up to 30 observed distinct values, and the table preserves the full observed frequency distribution. Unobserved values are not listed as though their probability were zero. Each batch frequency table sums to its generated count, and the complete batch CSV preserves every generated outcome.

What can I use this Random Number Generator for?

Use it for classroom number selection, simple game setup, generating test data or sampling numbered items from a known pool. Keep an external record if the selection must be explained later: this tool does not provide an audited drawing service or prove which settings someone used.

Ordinary browser generation happens when you press Generate; sharing copies the settings, not the generated batch. Download results to retain the exact outcomes. Even though Web Crypto supplies the random words, this interface is not a complete password, cryptographic key or legally regulated prize-draw protocol.

Formula and calculation method

Random words come from Web Crypto. Rejection sampling discards the incomplete part of the integer range before taking a remainder, avoiding modulo bias.

Bounds are inclusive for eligible grid values. Decimal mode uses a finite grid at 0–6 decimal places, not continuous real numbers.

Without replacement, a partial shuffle selects unique values without repeatedly retrying already drawn values. Sorted output is the same selected sample in a different order.

The form runs only when Generate is pressed. Shared links restore settings, not a previous random batch; download the results to retain a batch.

Scope and Limitations

  • Bounds from −10⁹ to 10⁹ and at most 1,000 draws. This tool does not provide arbitrary precision, a reproducible seed, audited prize-draw records, or a complete key/password-generation protocol. An observed sample need not look evenly spread.

Reference Sources

Frequently asked questions

Are the minimum and maximum included?

Integer endpoints are inclusive. In decimal mode, only values on the selected grid can be generated; the pool table shows the actual eligible endpoints.

Can I prevent repeated numbers?

Yes. Disable duplicates and choose a count no larger than the eligible pool.

Can a shared link reproduce my random batch?

No. It restores the settings. Download the generated results to keep the exact batch.

Does this support hundreds of digits of precision?

No. It supports bounds up to one billion in magnitude, at most six decimal places and up to 1,000 draws, with explicit grid-based decimal sampling.

Are the frequency bars a randomness certification?

No. They describe one generated batch; uneven samples and repeated values can occur in valid random sampling.