Utilities

Random Number Generator

Generate integers, fixed-precision decimals or picks from your own list.

By Nitin Raturi · Last reviewed

Choose what to draw

How to use the Random Number Generator

Set the range or list, choose how many results you need, then generate them when ready.

  1. Choose a number range or a list of choices.
  2. Set the bounds and number type, or enter one list item per line.
  3. Choose the count and whether results may repeat or should be sorted.
  4. Press Generate to create a fresh set in your browser.
  5. Copy or bookmark the address to share the settings; random results are not saved in the URL.

Good to know

  • A range includes both its minimum and maximum.
  • This general-purpose tool is not for lotteries, gambling or cryptographic key generation.
  • Nothing you enter is sent to a server.

Your settings stay in this browser. Results are created only when you press Generate.

Selection mode

Choose whether to draw from a numeric range or from your own list of choices.

How to fill it in

  • Choose Number range for integers or decimal values.
  • Choose Pick from a list to treat each non-empty line as a choice.

Number type

Integers are whole numbers. Decimals are evenly spaced values at the precision you choose.

How to fill it in

  • Use integers for whole-number draws.
  • Use decimals when fractions are useful; choose up to 6 decimal places.

Minimum

The lowest value the number range can include.

How to fill it in

  • The minimum is included in the range.
  • Integer mode accepts safe whole numbers; decimal mode accepts values matching its selected precision.

Maximum

The highest value the number range can include.

How to fill it in

  • The maximum is included in the range.
  • It must be at least the minimum and fit the selected number type.

How many results

The number of values to draw or list items to select.

How to fill it in

  • Choose a whole number from 1 to 10000.
  • With unique results, the count cannot exceed the available distinct values.

Unique results

When selected, a value or list item is selected no more than once in one draw.

How to fill it in

  • Turn it off to allow the same result more than once.
  • The requested count must fit the number of available values.

Keep in mind: Uniqueness applies only within this one generated set.

Sort results

Choose whether to display the selected values in ascending order after drawing.

How to fill it in

  • This changes display order only; it does not change which values were selected.

Your results

Generate a set to see results here.

Not for lotteries, gambling or cryptographic key generation.

Nothing you enter or generate is sent to a server. The URL contains settings only, never random results.

How this calculator works

Set an inclusive range or a list, choose how many selections to make, then generate values in your browser.

  1. Step 1Choose a sourceRange or listUse whole values, fixed-precision decimals or your own options.
  2. Step 2Set the drawUp to 5 by defaultChoose the result count, repeats and display order.
  3. Step 3Generate on demandPress GenerateThe browser creates results only after your action.

A range includes both its minimum and maximum. Integer mode selects whole numbers. Decimal mode uses an evenly spaced grid, such as steps of 0.01, rather than selecting from infinitely many possible decimal values.

  • Inclusive boundsBoth endpoints can be selected.
  • No repeatsUnique mode selects each distinct value at most once.
  • Sorted displaySorting changes the order shown after selection, not the draw.

The range selection uses rejection sampling: it draws enough random bits to cover the range, then discards values outside it.

This avoids the uneven probabilities that a simple remainder operation can introduce. A partial Fisher–Yates shuffle handles unique selections without creating a huge array for wide numeric ranges.

Worked example

Three distinct values from 1 to 6
Inclusive size
N = maximum − minimum + 1
Possible outcomes
N = 6 − 1 + 1 = 6
Selected sample
fixed test words → selected indices 0, 1, 2
  • minimumfirst included value 1
  • maximumlast included value 6
  • counthow many values to select 3
  1. Inclusive number of values6 − 1 + 16
  2. Selected indices0, 1, 20, 1, 2
  3. Add the minimum1 + offsets1, 2, 3

This is a reproducible teaching example from fixed test words, not a generated result or a promise about future draws. A live result is created only when you press Generate.

Reading your result

  • With repeatsA value may recurEach selection is drawn independently from the full range or list.
  • UniqueNo repeated valuesThe count must not exceed the number of distinct available options.
Unique mode in a list treats duplicate lines as one option; repeated mode keeps duplicate lines as extra chances.

The result card shows the values selected for the current settings. Sorting puts them in ascending order after the draw. The URL can preserve the settings, but not the results, because every new draw is different.

  • Mistake: Entering a maximum below the minimum.

    Instead: Check that the range goes from the lower value to the higher value.

  • Mistake: Requesting more unique items than the list contains.

    Instead: Lower the count or add more distinct choices.

  • Mistake: Treating the fixed example as a live random draw.

    Instead: Press Generate; only that action creates a fresh result.

Assumptions and limits

  • Fixed precisionDecimal mode selects from a grid of up to six decimal places.
  • No security claimThe implementation has not been independently audited.
  • No saved outcomesOnly settings are stored in the address; no values leave your browser.

This general-purpose generator is not for lotteries, gambling or cryptographic key generation. Do not use it where a certified draw, auditable process or security review is required.

Frequently asked questions

Are the minimum and maximum included?

Yes. Both ends of a valid numeric range are possible results.

Can I generate decimal values?

Yes. Select Decimals and choose from zero to six places. The bounds must fit the chosen precision, and each possible value lies on that fixed decimal grid.

What does unique mean for a list?

Each distinct non-empty line can be selected at most once. Duplicate lines are collapsed in unique mode, while repeat mode preserves their extra weight.

Does sorting change the chance of a value being selected?

No. The generator first selects values, then sorts the displayed results if you enable sorting.

Can I share the generated results?

No. The URL saves settings only. It never contains a generated result, so opening the same address creates no saved or repeatable draw.

Is this suitable for a lottery or gambling draw?

No. It is a general-purpose utility, not a certified or independently audited draw system.

Can I use the results as cryptographic keys?

No. Do not use this tool for cryptographic keys or other security-sensitive purposes.

Does my list leave my device?

No. Selection and URL state handling happen in your browser; the site does not send list items or results to a server.

Other tools that use randomness

Random draws answer one question; dice, passwords and probabilities each have a tool built for them.

To roll dice and see the exact chance of each total, use the dice roller. For a strong password made on your device, try the password generator.

To work out the chance of an event over several tries, the probability calculator shows the arithmetic.

Read how we test our calculators, or browse more everyday tools.

Frequently asked questions

Are the range endpoints included?

Yes. The minimum and maximum are both included in a valid numeric range.

Can I generate decimal numbers?

Yes. Choose zero to six decimal places; both bounds must fit the selected precision.

What does unique results mean?

Each value or distinct list item appears no more than once in the same generated set.

Can I share a generated result?

No. The URL contains settings only and never stores the generated outcomes.

Is this for lottery or gambling draws?

No. This general-purpose tool is not a certified or auditable drawing system.

Can I use this to create cryptographic keys?

No. Do not use this tool for cryptographic key generation or other security-sensitive purposes.

Does my list leave my browser?

No. The list and selections are processed in your browser and are not sent to a server.

Sources and methodology

The formulas are standard time-value-of-money results. We check every figure against golden values worked out independently, by closed form and by month-by-month simulation; see the methodology.

Written and maintained by Nitin Raturi, a software engineer (about the author). Last reviewed 22 Oct 2026; next review due by . Found an error? Tell us.

Changelog

  • : First release. Generates values only on button press; results never appear in the URL.