Random number generator

Try Random Number Generator

Display choices apply to the result. Use a decimal point in numeric inputs and follow each text field's separator instructions.

Random Number Generator inputs

Loading calculator. If this message stays visible, enable JavaScript and reload.

The random number generator selects one whole number between the minimum and maximum you enter. Both endpoints are included. With a minimum of 1 and a maximum of 6, the possible results are 1, 2, 3, 4, 5 and 6. Select Calculate / Run again for another draw from the same range.

The tool uses the browser's cryptographic random-value facility and maps that value into the requested integer range. It does not offer decimal output, a repeatable seed or a list of unique numbers. Use it for a single numeric choice, and check the range and repeat rules before treating repeated runs as a sampling procedure.

On this page

How to use the Random Number Generator

What does the random number generator select?

The random number generator selects one integer from a closed interval. Closed means that the smallest and largest entered values are both possible results. The number of possible values is maximum minus minimum plus one, provided the bounds are valid.

For a range from 10 through 15, the six possible integers are 10, 11, 12, 13, 14 and 15. There are six choices, not five, because counting the distance between endpoints is different from counting the endpoints and everything between them.

Random Number Generator range 10 through 15 contains six eligible integers
An inclusive integer range includes its minimum and maximum.

The Random Number Generator takes numeric bounds rather than a list of names or items. If your choices are numbered consecutively, an integer can refer to one of them. Keep that mapping fixed before drawing so a result has a clear meaning.

A new run replaces the current displayed result. It does not append another row to a permanent sequence or remove the previous result from the eligible range. The Random Number Generator has no count field, sort control or no-duplicates option.

It also does not predict a future event, reveal a hidden number or improve a lottery outcome. Selecting a random integer is an arithmetic and browser operation; it supplies no information about which number will be drawn by an unrelated system.

How do you enter the range and make a draw?

  1. Enter Minimum integer as the smallest eligible number.
  2. Enter Maximum integer as the largest eligible number.
  3. Check that both values are whole numbers and minimum is no larger than maximum.
  4. Select Calculate / Run.
  5. Read the one displayed result and record it if needed.

The defaults are 1 and 100. They are example bounds, not a restriction to positive numbers or to a hundred choices. Zero and negative integers are supported when the range meets the tool's size and numeric-precision limits.

Enter a bare integer rather than a range string such as 1-100. Each endpoint has its own field. A blank endpoint is missing information, not an instruction to use zero. Decimal values such as 2.5 are rejected rather than rounded silently to another boundary.

If the minimum exceeds the maximum, correct the entries. The Random Number Generator does not silently swap them, because doing so could hide a mistake in your intended selection rule. Make the range explicit before drawing.

You can set both endpoints to the same integer. With 12 and 12, every valid run returns 12 because there is only one possible result. This is a useful deterministic check of the input and output path, even though there is no actual choice among different integers in that case.

How does an inclusive range affect the possible outcomes?

The width of an inclusive integer range is N = maximum − minimum + 1. A range from -2 through 2 has five outcomes: -2, -1, 0, 1 and 2. Zero belongs to the range even though neither endpoint is zero.

Examples of supported range meanings
MinimumMaximumPossible integersNumber of outcomes
161 through 66
101510 through 156
-22-2 through 25
121212 only1

With equally likely source values and the mapping used here, each allowed outcome has probability 1/N on a draw. For the six-value range, that is one sixth per outcome. That probability statement does not require a short run to show each number once.

A common indexing mistake is mixing zero-based and one-based labels. If a list contains six items numbered 1 through 6, draw from 1 through 6. A range from 0 through 6 would add an unintended seventh outcome. Set the labels before using a result to choose an item.

When the choices are irregular, such as ticket numbers 2, 7 and 19, a continuous interval from 2 through 19 includes unwanted numbers. Use an item-list picker instead of assuming that a numeric range knows which labels are valid.

Random Number Generator: the unbiased mapping

The Random Number Generator requests an unsigned 32-bit random value with the browser's crypto.getRandomValues facility. It does not use Math.random as a fallback. If the required browser facility is unavailable, it returns an error rather than silently changing the source.

MDN's getRandomValues reference, checked in 2026, describes the browser method as supplying cryptographically strong values. The browser and operating environment provide that facility; MoneyOr does not claim to own an atmospheric-noise source or a separate physical random device.

The raw 32-bit pool has 4,294,967,296 possible values. Mapping it to an arbitrary smaller range needs care. A simple remainder operation can give some outcomes an extra source value when the pool size is not divisible by the requested range width.

The Random Number Generator avoids that mapping bias through rejection sampling. It keeps only a source interval whose size is an exact multiple of the requested width, discards values outside that interval and tries again. It then takes the remainder and adds the minimum.

For a ten-value range, the accepted raw interval has 4,294,967,290 values. The six values above it are retried. Every remainder from zero through nine then has the same number of accepted source values. This explanation concerns the mapping algorithm; it is not an independent security certification of the browser or the website.

Ten-outcome random mapping accepts 4294967290 raw values and retries six to avoid modulo bias
Rejection sampling gives each remainder the same accepted source count.

Why can repeated numbers appear?

Each run draws from the same full range unless you change the bounds. The Random Number Generator does not remember earlier values as exclusions. A number that appeared on the previous run remains eligible on the next one.

For a six-value range with independent uniform draws, the chance that the next result matches the immediately previous result is one sixth. Seeing a repeat is therefore compatible with the intended model. A mechanism that deliberately prevents all repeats would have different rules.

A repeated result is allowed in separate random integer draws from one to six
Independent draws do not remove the previous outcome.

Similarly, six runs are not guaranteed to produce all six outcomes. Some may repeat while others do not appear. Equal probability per draw is different from forcing equal counts in every small group of draws.

A short streak does not tell the tool to compensate. An outcome that has not appeared recently is not made more likely by this implementation, and a recently common outcome is not automatically suppressed. The Random Number Generator has no balancing rule based on the visible history.

If your task requires a random ordering without replacement, use a tool designed for that operation. Repeatedly clicking this single-value form and discarding duplicates manually changes the procedure and should be documented if the result matters. For an item list rather than a numeric interval, the random picker addresses a different input format.

Which bounds and range sizes are accepted?

Both endpoints must be JavaScript safe integers. Their absolute values cannot exceed 9,007,199,254,740,991, and the minimum must not exceed the maximum. The width must also be no more than 4,294,967,296 possible integers.

Those are two separate restrictions. Having individually acceptable endpoints does not mean every interval between them is supported. A range from 0 through 4,294,967,295 has exactly 4,294,967,296 outcomes and fits the width limit. Extending the maximum by one creates one outcome too many.

MDN's MAX_SAFE_INTEGER reference, checked in 2026, explains the numeric precision boundary. The Random Number Generator uses ordinary JavaScript numbers, not arbitrary-length integer arithmetic. It should not be described as accepting thousand-digit endpoints.

Small intervals can be located at large positive or negative safe-integer values, provided the full range stays within the restrictions. The range-width check is about how many outcomes must be selected, while the endpoint check is about representing each bound accurately.

Invalid text, fractional endpoints, reversed bounds or an oversized interval should be corrected before drawing. Avoid repeatedly changing a bound without checking the count, especially when one endpoint is included. The extra plus one in the width formula is the difference between the boundary example that fits and the one that fails.

How can you check the tool without expecting a fixed random answer?

A normal draw has no preselected correct result. Check invariants instead: the output must be an integer, it must be at least the minimum, and it must not exceed the maximum. For equal endpoints, the result is completely determined and should match that endpoint.

For a range from -2 to 2, a result of -2, -1, 0, 1 or 2 is permitted. A result of 3 is not. One permitted result is not proof of long-term distribution quality, but an out-of-range result would show a clear problem.

A software test can also supply controlled raw random values to check the mapping and retry branches. That kind of fixture verifies known code paths; it should not be confused with evidence that a live browser's entropy source has been independently audited.

When collecting sample results for a classroom exercise, record the range, number of draws and procedure. Comparing counts can illustrate random variation, but small differences in a short sample do not by themselves prove bias or manipulation.

The dice roller uses dice-oriented inputs when that is the intended activity. The coin flip tool supplies a two-outcome presentation. Choose the interface matching the task instead of assuming that every random utility has the same output or controls.

What uses and limitations should be clear before relying on a draw?

The Random Number Generator is suitable for a casual numeric choice, a classroom range example or a small simulation step where a single integer is needed. It is not a certified draw service, a signed public audit log or an official selection process.

For a consequential selection, the procedure matters as much as the number. Define eligibility, numbering and what counts as the final draw before generating a result. This page does not establish those rules, verify identities or prevent an operator from rerunning a draw.

A random integer is not automatically an appropriate secret. A short range can contain few possible values regardless of the randomness source. The password generator provides separate length and character-group controls for that different task. Authentication systems need their own generation, storage and verification design.

The Random Number Generator runs in your browser. Website delivery and analytics are separate practices described in the MoneyOr privacy policy. Bounds alone are enough for this form; participant names, account credentials and confidential lists are unnecessary.

Copy result and Download CSV transfer the current output after a successful run. Neither creates a tamper-proof history or a verifiable certificate. If a process requires independent oversight or legal compliance, use the required procedure rather than treating an exported number as proof of how it was selected.

Random Number Generator FAQ

Can I generate random decimal numbers here?

No. Both endpoints must be integers and the result is one integer. There is no decimal precision control. Entering fractional bounds is rejected rather than treated as a request for a decimal output.

Can I supply a seed to repeat the same sequence?

No. The Random Number Generator has no seed field and does not expose a repeatable-sequence mode. Re-entering the same bounds defines the same eligible range but does not recreate earlier random results.

Can I exclude one number inside the range?

There is no exclusion list. Every integer between the entered endpoints is eligible. If only selected labels are valid, prepare an item list and use an appropriate picker rather than entering a range containing invalid choices.

Does a copied result retain leading zeros?

The output is a number, not a fixed-width code. A value such as 7 is not displayed as 0007. A formatting requirement for codes is a different task from selecting an integer.

Does resetting recreate the last random result?

No. Reset fields returns the bounds to their defaults and clears the displayed result and saved baseline. A later run makes a new draw. Copy or export any current result you need before resetting.

Is an account needed to use the generator?

No tool registration or fee is required. Use a modern browser with the needed cryptographic random-value facility available. If the facility cannot be accessed, the page reports an error rather than asking you to sign in.

Does an unexpectedly repeated result mean the browser is broken?

Not by itself. Repetition is allowed. Check that the bounds are not identical and that the eligible range has the size you intended. A single repeat cannot establish a problem with a random source or its implementation.

Can the generator choose a number with unequal weights?

No. There is no weight or probability field for individual outcomes. A range defines consecutive eligible integers with a uniform mapping. If one option needs twice the chance of another, that requires a separately specified weighted-selection procedure. This form does not infer weights from an item label or from how often a previous result appeared.

Sources