Free online tool

Random Number Generator

Enter minimum and maximum values to generate a random integer.

Instant calculation

Random Number Generator

Enter minimum and maximum values to generate a random integer.

Your numbers stay in this browser. Nothing is uploaded or saved.

Three clear steps

How to use this calculator

  1. 01

    Enter minimum

    Type the lowest possible number.

  2. 02

    Enter maximum

    Type the highest possible number.

  3. 03

    Generate

    Calculate to produce a random number in the range.

The formula

How this calculation works

Generates a uniformly distributed random integer inclusive of both min and max.

Random Number Generator

Random integer = floor(random × (max−min+1)) + min

Random real in [0,1) scaled to [1,101) and floored

Check the method

Worked examples

Each example follows the same formula used by the calculator.

Random number between 1 and 100?

Random real in [0,1) scaled to [1,101) and flooredRandom integer 1–100

Common questions

Questions about this calculation

What is the Random Number Generator?

The Random Number Generator helps you generate a random number within a specified range. Enter your values and select Calculate to get an instant result.

How is the result calculated?

Generates a uniformly distributed random integer inclusive of both min and max.

Can you show an example?

Example: Random number between 1 and 100? — Random integer 1–100.

Is my data saved when I use the Random Number Generator?

No. All calculations run locally in your browser. Your inputs and results are never uploaded, stored or shared with anyone.

Is the Random Number Generator free to use?

Yes. The Random Number Generator is completely free. No account, sign-up or payment is required. It works on mobile, tablet and desktop.