Random Number Generator for Custom Ranges, Intervals, Exclusions and Unique Draws

Generate one or many random integers or decimals, exclude unwanted values, prevent repeats and export the finished draw.

Generator settings

Values start at the first allowed number in the range and advance by this interval. For example, 10 to 50 with an interval of 5 produces 10, 15, 20, …, 50.

How the random-number generator works

The generator requests random bits from the browser’s Web Crypto API when it is available. It uses rejection sampling to map those bits to an allowed position without favouring positions that happen to fit more neatly into the source range. If Web Crypto is unavailable, the page identifies that it has fallen back to Math.random().

This is different from a remote service that measures a physical process such as atmospheric noise. Both approaches can be useful, but this page does not issue certificates or create a public audit record. Use an independently administered and auditable process for regulated drawings, valuable prizes or disputes.

Unique random numbers

Unique mode samples without replacement: after a value is selected, it cannot appear again in the same draw. The requested count therefore cannot exceed the available values after the interval and exclusion list are applied. Decimal uniqueness is judged at the selected number of decimal places.

Random sampling examples

Selecting numbered records for an audit

Suppose a file contains records 1 through 8,400 and an auditor needs 80 different records. Set the range to 1–8,400, request 80 integers and enable unique results. Record the settings and preserve the exported CSV with the audit notes. The result is a sample, not proof that the underlying list was complete or unbiased.

Assigning balanced classroom questions

To select from question numbers 10, 15, 20, …, 100, use a minimum of 10, maximum of 100 and interval of 5. Exclude questions already demonstrated in class, then use unique mode to avoid assigning the same question twice.

Creating bounded test data

A developer testing a temperature display might generate 200 decimals from −40 to 60 at 0.1 intervals. Random data can reveal formatting and boundary problems, but it should supplement deliberately chosen edge cases such as the exact minimum, maximum, zero and invalid input.

Uses for random numbers

Useful applications include selecting practice questions, randomising presentation order, drawing a sample from numbered records, generating simulation inputs and producing non-sensitive software test data. Exclusions help remove unavailable choices, while intervals restrict a draw to an arithmetic sequence.

A random result does not automatically make a process fair. The starting list, eligibility rules, exclusions, repeat policy and handling of reruns all matter. Write those rules down before conducting a consequential draw.

Frequently asked questions

Are the minimum and maximum included?

Yes. Integer endpoints are included; decimal outputs may also equal either rounded endpoint.

Can I generate negative numbers?

Yes. Enter a negative minimum, and make sure it is not greater than the maximum.

What does the interval setting do?

It controls the gap between eligible values. A range of 2 to 20 with an interval of 3 contains 2, 5, 8, 11, 14, 17 and 20.

Does unique mode make a draw more random?

No. It changes the sampling rule from with replacement to without replacement. Use it when repeated results are not permitted.

Can this generator be used for passwords or cryptographic keys?

No. Although the page normally uses cryptographic browser randomness, its outputs, interface and storage have not been designed or audited as a key or password generator.

Why can a random sample still look uneven?

Randomness does not promise equal counts in every small sample. Clusters and repeated values are possible; balance becomes more apparent across many independent draws.

← All basic math calculators