Random Number Generator

Generate 1 to 200 random integers or fixed-precision decimals inside an inclusive range. Choose whether repeats are allowed, preserve draw order or sort the batch, use Web Crypto for unseeded output, and inspect every value, duplicate, summary statistic, and range assumption without creating an account.

Calculation and content reviewed by EZ Calculators Editorial Team on .

Enter values

Define a finite integer or decimal range, choose the replacement and display rules, then generate an auditable batch without allocating the complete range.

Unseeded sourceBrowser Web Crypto
Range mappingRejection sampling
Batch limit200 values
Choose the result type

Integer mode selects whole numbers. Decimal mode selects exact fixed-precision slots.

Define the inclusive range

Both boundaries are included after integer rounding or decimal precision is applied.

Whole numbers
Integer mode rounds this boundary upward; decimal mode uses it exactly at the selected precision.
The upper boundary is inclusive after the selected mode and precision are applied.

Build the batch

Batch size controls the ledger length. Decimal places changes the number of selectable decimal slots.

numbersGenerate 1 through 200 values in one batch.
digitsDecimal mode treats each 10^-precision step as one possible value. Disabled in integer mode.
Choose the replacement rule

Independent draws can repeat. Unique sampling removes each selected slot for the rest of the batch.

Choose the displayed order

Sorting never redraws the batch. The ledger keeps each value's original position.

Optional repeatable sequence

Leave the seed blank for Web Crypto. A seed is predictable and intended only for repeatable tests or demonstrations.

Leave blank for Web Crypto. A seed repeats the batch for tests but is not secure.
Use boundary

This is a browser generator, not an independently audited lottery, gambling, security-key, research-randomization, or regulated drawing system.

What Is This Random Number Generator

This random number generator selects discrete values from a user-defined inclusive range. Integer mode includes every whole number from the ceiling of the lower limit through the floor of the upper limit. Decimal mode turns the range into equally spaced slots at the selected number of decimal places, then returns the exact slot labels.

The page can create one value or a batch of up to 200, allow or prevent repeats, retain original draw order, sort the display, and optionally reproduce a batch with a seed. A complete ledger keeps every returned value visible instead of hiding a long batch behind an abbreviated summary.

How to Use the Random Number Generator

  1. Choose Integer for whole-number picks or Decimal for fixed-precision values.
  2. Enter lower and upper limits. Both ends are included after the selected mode is applied.
  3. Set the batch size from 1 through 200 and, in Decimal mode, choose 0 through 50 decimal places.
  4. Allow repeats for independent draws or select Unique values only to sample without replacement.
  5. Keep Generated order when sequence matters, or sort the displayed ledger ascending or descending.
  6. Leave the seed blank for Web Crypto, or enter a seed only when a repeatable demonstration or software test is required.
  7. Select Generate numbers and review the full ledger, source label, duplicate audit, median, sum, average, and range size.

Choose Integer or Fixed-Precision Decimal Mode

Integer mode answers questions such as picking a whole number from 1 through 100. If a boundary contains a fraction, the calculator uses only whole numbers inside the entered interval: 0.2 through 112.5 becomes the inclusive integer range 1 through 112. The result reports both the entered limits and the range actually used.

Decimal mode is not a continuous real-number draw. At two decimal places, 0.20 through 0.25 contains six equally spaced slots: 0.20, 0.21, 0.22, 0.23, 0.24, and 0.25. At 50 places, each step is 10^-50. A boundary with more fractional digits than the selected precision is rejected rather than silently rounded or truncated.

How mode and precision define the selectable values
SettingsDiscrete values usedPossible slots
Integer, 1 to 61, 2, 3, 4, 5, 66
Integer, 0.2 to 3.81, 2, 33
Decimal, 0.20 to 0.25, 2 places0.20 through 0.25 by 0.016
Decimal, -0.1 to 0.1, 1 place-0.1, 0.0, 0.13

Inclusive Limits and Equal Discrete Slots

Both boundaries are inclusive. Therefore, an integer range from a through b contains b - a + 1 values. Decimal mode first multiplies both exact boundaries by 10^p, where p is the selected precision, and then applies the same inclusive integer-slot count. This avoids ordinary binary floating-point drift in the range map.

Each selectable slot has the same probability on one unseeded draw. The page uses rejection sampling instead of reducing an arbitrary random integer with a modulo operation. Rejection discards candidates outside the largest evenly representable interval, preventing the early slots from receiving an extra mapping.

Web Crypto and Repeatable Seeded Output Are Different

With a blank seed, the calculator requests random bytes from the browser Web Crypto API. The W3C specification describes getRandomValues as producing cryptographically strong random values. The page then maps those bytes to the chosen range with rejection sampling, and it identifies that source in the result.

Entering a seed deliberately switches to a deterministic pseudo-random sequence. The same seed and settings reproduce the same batch, which is useful for examples, debugging, lessons, and repeatable test fixtures. This small local seeded generator is not cryptographically secure and must not be used for passwords, keys, tokens, regulated drawings, gambling, or security decisions.

Unique Values Use Sampling Without Replacement

Allow repeats models independent draws: a value can appear again because every draw uses the full range. Unique values only models sampling without replacement: after a slot is selected, it cannot be selected again in that batch. The calculator rejects a unique request larger than the number of available slots.

Large ranges are handled without building an array containing every possible value. A partial Fisher-Yates mapping stores only the positions touched by the requested batch. Memory therefore grows with the maximum 200 requested values, not with a range that may contain millions or hundreds of digits.

Generated Order and Sorted Order Answer Different Needs

Generated order preserves the sequence in which values were selected. Ascending and descending options sort only the displayed batch; they do not rerun the generator or change which values were drawn. The ledger retains each value's original draw position so sorted output remains auditable.

Keep generated order for randomized assignments, test sequences, turn order, or any task where position has meaning. Sort the display when scanning for duplicates, reviewing coverage, finding extremes, or copying an ordered list is more important than chronology.

Random Number Generator Examples

For ten unique integers from 1 through 100, the range contains 100 slots and the batch occupies 10% of them. Every result must be a whole number inside the inclusive limits, the unique count must equal ten, and duplicate positions must equal zero. The exact values change when no seed is used.

For five decimals from 0.20 through 0.25 at two places, there are six slots. With repeats allowed, a value may occur several times. With unique values selected, a request for six succeeds and necessarily returns every slot in some order, while a request for seven is rejected.

Worked setup checks that do not depend on a particular random outcome
RequestInvariant to verifyExpected audit
20 unique integers, 1 to 1,000Every value is 1-1,00020 unique, 0 duplicate positions
6 unique decimals, 0.20 to 0.25Every two-place slot appears6 possible and 6 selected
4 integers, -2.8 to 2.8Only -2, -1, 0, 1, 2Integer range used is -2 to 2
Seed demo-7 used twiceSame settings reproduce the batchSource labeled seeded, not Web Crypto

How to Audit the Generated Result

Start with the mode-adjusted range and possible-value count. Confirm every ledger value falls inside that range and carries the requested decimal places. Compare values requested, unique values returned, duplicate positions, and repeated distinct values. In unique mode, the first two counts must match and both duplicate measures must be zero.

The minimum, maximum, median, sum, and average describe only the returned batch. They do not prove that the generator is fair: a valid random batch can be clustered, unbalanced, or contain repeats. Statistical behavior is evaluated over appropriately designed repeated trials, not by expecting every small batch to look evenly distributed.

Random Number Generator Features

  • Integer and fixed-precision decimal modes in one workspace.
  • Inclusive lower and upper limits with up to 200 digits per boundary.
  • One to 200 values per batch and zero to 50 decimal places.
  • Independent draws with repeats or bounded-memory unique sampling without replacement.
  • Generated, ascending, and descending display order with original positions retained.
  • Web Crypto source by default and an explicitly insecure repeatable seed option.
  • Complete paginated ledger, duplicate status, range coverage, median, sum, and average.
  • Copy and downloadable result actions with no account requirement.

Benefits of a Transparent Random Number Picker

A transparent random number picker distinguishes the random source, range mapping, replacement rule, and output order. Those labels prevent common mistakes such as assuming unique picks are independent, treating a sorted list as original draw order, or believing a repeatable seed is secure.

Arbitrary-size integer arithmetic also avoids losing exact boundaries above JavaScript's ordinary safe-integer limit. The full ledger and summary checks make the batch easier to review, copy, explain, and reproduce when a seed is intentionally used.

Common Random Number Generator Use Cases

  • Create sample values and boundary cases for software or spreadsheet testing.
  • Pick classroom prompts, practice questions, turn order, or non-sensitive group assignments.
  • Generate casual game values when a dedicated dice model is unnecessary.
  • Sample unique item numbers without constructing a full large-range list.
  • Create repeatable demonstrations and test fixtures with a disclosed seed.
  • Generate fixed-precision decimal inputs for simulations whose model is defined elsewhere.

Accuracy, Security, Privacy, and Trust Limits

The implementation is designed to map random bytes uniformly to the stated discrete range and to preserve exact large integer boundaries. That does not certify the browser, operating system, device entropy source, or complete environment. It also does not make one batch evidence of randomness, guarantee a desired distribution across a small sample, or validate a simulation model.

Use an independently audited system with documented procedures, access control, records, and applicable oversight when money, prizes, admissions, research assignment, gambling, legal rights, regulated lotteries, or public trust is involved. Never use the seeded mode for security. Inputs and calculations run in the current browser and require no account.

Randomness and Web Crypto References

FAQ

How do I generate a random number between two numbers?

Choose Integer or Decimal, enter the inclusive lower and upper limits, select the batch size and options, and press Generate numbers. Every returned value will be inside the mode-adjusted range.

Are the lower and upper limits included?

Yes. Integer mode includes the first and last whole numbers inside the entered interval. Decimal mode includes both exact boundaries when they match the selected decimal precision.

Can this random number generator create decimals?

Yes. Decimal mode supports 0 through 50 decimal places. It selects among equally spaced fixed-precision slots rather than pretending to choose from infinitely many real numbers.

How can I generate random numbers without repeats?

Choose Unique values only. The calculator samples without replacement and rejects a request larger than the number of available integer or decimal slots.

Is this a cryptographically secure random number generator?

With a blank seed, range values are derived from browser Web Crypto random bytes with rejection sampling. The page is not an audited security or regulated-drawing system, and seeded mode is explicitly not cryptographically secure.

What does the repeatable seed do?

A seed initializes a deterministic local sequence. The same seed and settings reproduce the batch, which helps testing and demonstrations. It must not be used for passwords, keys, tokens, gambling, or regulated selections.

Does sorting change the random draw?

No. Ascending or descending order changes only how the existing batch is displayed. The complete ledger preserves each value's original draw position.

Can I generate very large random integers?

Yes. Integer boundaries can contain up to 200 digits, and generation uses BigInt arithmetic. Unique mode stores only the requested positions rather than allocating the entire numeric range.

Why was my decimal limit rejected?

A decimal boundary with more fractional digits than the selected precision is ambiguous. Increase Decimal places or round the boundary yourself; the calculator will not silently discard digits.

Can I use this tool for a raffle or lottery?

Use it only for casual, non-regulated activities. Money, prizes, legal rights, public drawings, gambling, and regulated lotteries need an independently audited process that satisfies the applicable rules.