Math

Random Number Generator

Generate whole numbers between inclusive bounds. Choose how many values you need, whether repeats are allowed and how to order the list.

Free to useNo sign-upCalculated in your browser

Integer sampling options

Both endpoints are included. Whole integers only; negatives are allowed. Generate up to 1000 values.

−1000000000000 to 1000000000000. No decimal or thousands separator.

−1000000000000 to 1000000000000. No decimal or thousands separator.

1–1000. For unique values, count must fit the inclusive range.

Bounds and generated values stay in this browser.

Random integer results

Generate to create a new list in page memory. Editing an option clears it. Original order means the order generated, rather than numeric sorting.

Generate inclusive whole numbers

Set a minimum, maximum and count. Both endpoints are included: −2 through 2 contains five integers, not four. Bounds must be whole integers from −1000000000000 to 1000000000000, without commas, decimal points or exponents. You may request 1–1000 values.

Choose whether duplicates are allowed. With duplicates, each draw can repeat a previous value. Without duplicates, the count cannot exceed maximum − minimum + 1. Equal bounds allow one unique value or multiple identical values when repeats are permitted.

Original order means generation order. Ascending and descending sort the selected values; they do not make low or high values more likely to be selected. Sorting a unique list is not the same thing as a randomly ordered list.

A reproducible range example

Enter minimum −2, maximum 2, count 5, no duplicates, and ascending order. The result must be −2, −1, 0, 1, 2 because you requested the entire inclusive range. The generation order may differ before sorting. A request for six unique values from that range is impossible and produces an error.

The default settings instead draw five distinct integers from 1 through 100 in generation order. No particular output is promised, and pressing Generate again can produce an identical sequence by chance. There is no user seed or saved history.

Browser entropy and unbiased mapping

The browser adapter uses the W3C Web Cryptography API’s getRandomValues method. Each source word combines two unsigned 32-bit words into one exact unsigned 64-bit integer. The sampler does not use a weaker fallback if the browser source is unavailable.

Mapping a source word directly by remainder can favor some results when the range size does not divide the source domain. For a width w, this implementation accepts only words below floor(2^64 / w) × w; it rejects the incomplete tail first, then takes the remainder. Each possible result consequently has the same number of accepted source words, under the uniform-source assumption.

For unique generation, a sparse partial shuffle selects among the remaining positions and replaces the selected position with the last remaining index. It does not keep drawing the whole range until a new value happens to appear. That avoids a collision retry explosion when you request most or all of a range. Memory grows with the requested count, not the full range size.

Limits, privacy and appropriate interpretation

Each accepted draw permits at most 64 source attempts. An unavailable, invalid or repeatedly rejected source gives an error without a partial result. Limits bound CPU and memory use even for a large range or a dense unique request.

Browser-provided entropy is not a formal certification for regulated drawings, security keys or a particular scientific protocol. A small observed set cannot establish statistical certainty about randomness. This page generates integers only; it has no decimal-distribution mode.

Bounds and outputs remain in current page memory. Editing an option clears the result, and reloading starts without one. Generated values are not placed in analytics payloads, persistent browser storage or URLs.

For descriptive analysis of a dataset, use Standard Deviation. For a proportion or ratio rather than sampling, use Percentage or Ratio. For expressions, use Scientific.

Sources & review

Last reviewed: . The formula is reproduced above so you can check the math independently.

How we check calculations and describe their limits

Accessibility and student privacy

Our accessibility target is WCAG 2.1 AA. We use automated checks for keyboard operation, narrow layouts and readable alternatives to charts. Keyboard and screen reader behavior can vary by device and browser.Report an accessibility issue.

These tools have no ads, affiliate offers or sponsored content. No account is needed. Calculations run in your browser; your inputs and results are not sent to us or to analytics. Google Analytics may be used to measure site usage. See Privacy & analytics for details and how to turn it off.