Random Number Generator
Generate random numbers in any range. Choose integer or decimal, set count, and use quick presets.
What is a Random Number Generator?
A random number generator (RNG) is a tool that produces numbers that lack any predictable pattern. Random numbers are used in statistics, simulations, gaming, cryptography, lottery draws and many other applications. This online generator uses the JavaScript Math.random() function to produce pseudo-random numbers within your specified range and parameters.
How to Use This Generator
Enter the minimum and maximum values to define the range. Specify how many random numbers you want to generate, choose between integer or decimal output, and decide whether to allow duplicate numbers. Click "Generate Numbers" to get your results. You can also use the quick presets for common scenarios like rolling dice, flipping a coin or drawing lottery numbers.
Formula
For integers: Math.floor(Math.random() * (max - min + 1)) + min
For decimals: Math.random() * (max - min) + min
When duplicates are not allowed, the generator ensures each number appears only once in the output set. If the requested count exceeds the available unique numbers in the range, the generator will alert you.
Frequently Asked Questions
Are these numbers truly random?
These are pseudo-random numbers generated by the JavaScript Math.random() function. They are suitable for most general purposes such as games, simulations and casual use, but are not cryptographically secure random numbers.
What is the maximum count I can generate?
You can generate up to 1,000 numbers at once. When duplicates are disabled, the count cannot exceed the number of unique values in the specified range.
Can I use this for lottery number picks?
Yes. Use the "Lottery" preset to generate 6 unique numbers between 1 and 49, or customise the range and count to match your specific lottery format.
Related tools
Explore all tools
Find exact age in years, months and days
Check Body Mass Index and weight range
Monthly EMI for home, car or personal loan
Estimate future value of SIP investment
Fixed Deposit maturity and interest
Recurring Deposit maturity and interest
Add or remove GST from any amount
Find X% of Y, percentage change and more
Estimate next period and fertile window
Estimate due date from last period
Find days between two dates
Find booking date for train tickets
Calculate compound interest with flexible compounding
Public Provident Fund maturity and interest
Calculate gratuity based on salary and tenure
Find HRA exemption for tax saving
CTC to in-hand salary breakdown
Calculate tax under Old and New regime
Calculate simple interest on any amount
Compound annual growth rate
Find discount amount and final price
Calculate profit or loss percentage
Return on Investment calculator
Basal Metabolic Rate and daily calories
Calculate area of any shape
Calculate speed, distance or time
Calculate fuel cost for any trip
Find mean, median and mode
Calculate tip and split the bill
Convert numbers to words for cheques
Calculate electricity usage cost
Convert length, weight, temperature
Add or subtract hours and minutes
Calculate future value after inflation
Find break-even point for business
Find base price from GST-included amount
One-time investment future value
Systematic withdrawal plan calculator
Calculate new salary after hike
Check how much home loan you can get
Calculate car loan EMI and total cost
Convert CGPA to percentage easily
Find marks needed to pass or score target
Find ideal body weight by height
Estimate body fat percentage
Daily water requirement by weight
Count working days between dates
Days remaining until a future date
Convert hex color codes to RGB
Generate random numbers in any range
Solve quadratic equations instantly
Find age difference between two people
Calculate total work hours and pay