Random Number Generator

Choose a minimum and maximum to generate a random integer anywhere in that inclusive range. The tool is useful for games, classroom activities, drawings, testing, and everyday choices where a simple unbiased pick is appropriate.

Method reviewed by the NumUtility editorial team · Updated August 10, 2026

Generate a random integer

ResultSelect a valid range

How to use this random number generator

Enter the values requested in the fields above. The result updates instantly as you make changes, so you can compare scenarios without reloading the page. Use decimal values where appropriate and review the unit or calculation mode before interpreting the answer.

How the calculation works

An inclusive range means both endpoints can be selected. A range from 1 to 10 therefore contains ten possible integers, not nine.

The generator uses the browser's cryptographic random source when available, reducing predictable patterns. It is suitable for everyday selections but is not a substitute for a formally audited lottery or regulated gambling system.

Formulas

Inclusive range size

Possible integers = maximum − minimum + 1

Uniform selection

Each integer has probability 1 ÷ range size

Worked examples

Roll a six-sided die

Set the minimum to 1 and maximum to 6. Each generated integer represents one face.

Choose a participant

Number participants from 1 to 30, then generate a number within that range.

Common uses

Games and classroom activities

Simulate a die, choose a starting player, or assign a prompt by matching each possible integer to one documented outcome before generating the result.

Informal drawings

Number eligible entries once and generate within that inclusive range. Preserve the participant list and selection rules if other people need to understand how the draw was conducted.

Software and examples

Create varied whole-number inputs for demonstrations or exploratory testing. Purpose-built test suites should still include deliberate boundary, invalid, and regression cases rather than relying only on randomness.

Accuracy and limitations

The generator uses the browser's cryptographic random source when available and maps values into the requested inclusive integer range without simple modulo bias.

It is designed for everyday use, not regulated gambling, certified lotteries, cryptographic keys, or research that requires an auditable random source and documented sampling protocol.

Frequently asked questions

Can the minimum be negative?

Yes. Both endpoints can be negative, zero, or positive whole numbers, provided the minimum does not exceed the maximum.

Can the endpoints be generated?

Yes. The range is inclusive, so both the minimum and maximum are possible results.

Is the random number generator free to use?

Yes. NumUtility is free, requires no account, and places no limit on ordinary calculations.

Are my entries stored?

No. The calculation runs in your browser. Values entered into the tool are not sent to NumUtility or saved by us.

Related tools

Related guides