Calculate Now
What is a Random Number Generator?
The Random Number Generator produces a single random whole number between any minimum and maximum value you choose β both endpoints included. It's useful for picking a raffle or giveaway winner from a numbered list, rolling a virtual dice, deciding who goes first in a game, generating a random test number, or simply settling an argument about which restaurant to pick tonight.
How It Works
The generator takes your minimum and maximum values, works out the size of the range (max β min + 1, so both ends are included), and multiplies that range by a random decimal between 0 and 1 generated by the browser. Rounding that down to a whole number and adding your minimum back on gives a number that lands somewhere inside your chosen range, with every whole number in it equally likely to appear.
Worked Example
Set Minimum = 1 and Maximum = 6 to simulate rolling a standard six-sided die:
- Range size = 6 β 1 + 1 = 6 possible outcomes.
- If the browser's random function returns, say, 0.83, the calculation is β0.83 Γ 6β + 1 = β4.98β + 1 = 4 + 1 = 5.
- Every value from 1 to 6 has an equal one-in-six chance of being the result, exactly like a fair die.
How to Use This Tool
- Enter your Minimum value.
- Enter your Maximum value.
- Click Calculate to get one random whole number between the two, inclusive.
Things to Know
Need a strong random password instead of a number? Try the Password Generator. Curious what your name adds up to numerologically? Check the Lucky Number Calculator.
📅 Last reviewed: July 2026 · Formulas verified against RBI/SEBI/IT Dept guidelines.