Ctrl K
Percentage
Arithmetic & Algebra
Fraction
Arithmetic & Algebra
Ratio
Arithmetic & Algebra
Average
Arithmetic & Algebra
Exponent & Root
Arithmetic & Algebra
Square Root & N-th Root
Arithmetic & Algebra
Linear Equation
Arithmetic & Algebra
Area & Perimeter
Geometry
Pythagorean Theorem
Geometry
Triangle Solver
Geometry
Circle Calculator
Geometry
Distance & Midpoint
Geometry
Prime Number
Number Theory
Factorial
Number Theory
GCD / HCF
Number Theory
LCM
Number Theory
Random Number
Number Theory
Number Base
Number Theory
Complex Numbers
Engineering Math
Vector Math
Engineering Math
Matrix Calculator
Engineering Math
Laplace Transform
Engineering Math
Scientific
Advanced
Logarithm
Advanced
Limit Calculator
Advanced
Percentile Calculator
Advanced
Differential Equation Solver
Advanced
Unit Converter
Utilities
Data Storage
Utilities
Speed Converter
Utilities
Fuel Efficiency
Utilities
Compound Interest
Utilities
Password Generator
Utilities
Function Transformations
Graphing
No tools found.
Random Number
Generate random integers or decimal numbers within your chosen range.
Generator Configuration
Select number type and configure range bounds.
Generate random numbers within a specified range.
About this topic
Random Integers Whole numbers uniformly distributed over a range.
Generates whole numbers between a minimum and maximum value. If duplicates are allowed, numbers are drawn with replacement. If not, they are drawn without replacement.
Key formulas & rules
- •Includes both min and max bounds
- •Duplicates can be toggled
- •Maximum quantity depends on range size
- •Uses Fisher-Yates for unique draws
- •Results can be saved to history
- •Decimals are not included
Examples
| Input | Output | Note |
|---|---|---|
| 1 to 10, 3 items | 4, 8, 2 | Duplicates allowed |
| 1 to 5, 5 items | 1, 2, 3, 4, 5 | No dupes |
| 1 to 100, 2 items | 67, 5 | Standard |
| 10 to 20, 1 item | 15 | Single draw |
Real-world uses
Lottery numbers
Sampling
Game mechanics
Random Decimals Floating-point numbers uniformly distributed over a range.
Generates decimal numbers between a minimum and maximum. The precision is controlled by the number of decimal places. Duplicates are always allowed.
Key formulas & rules
- •Min and max are treated as floats
- •Decimal places range from 0 to 6
- •Uniform distribution
- •Duplicates always allowed
- •Precision affects the pool size
- •Can generate 0.0 to 1.0
Examples
| Input | Output | Note |
|---|---|---|
| 0 to 1, 2 places | 0.45, 0.89 | Standard |
| 1 to 10, 1 place | 3.7, 8.2 | Single decimal |
| 0 to 100, 0 places | 42, 97 | Whole numbers |
| 0 to 1, 6 places | 0.123456 | High precision |
Real-world uses
Statistical simulations
Probability models
Monte Carlo
Modes & formulas
1
Random Integers
• Click Generate to create new random numbers.
• Choose a start and end bound (inclusive).
• Decide the quantity and whether duplicates are allowed.
• The generator produces integers uniformly at random within the range.
Random(min, max) = Math.floor(Math.random() × (max − min + 1)) + min
Duplicate prevention uses a Fisher–Yates shuffle on the integer range, then takes the first N items. This guarantees uniqueness when duplicates are disallowed.
2
Random Decimals
• Set the minimum and maximum bounds as decimal values.
• Specify the number of decimal places (0–6).
• The generator returns uniformly-distributed decimal numbers.
Random = Math.random() × (max − min) + min
The number of decimal places controls the rounding precision. Every value in the range is equally likely.
How to use it
Select the number type (Integers or Decimals), set your range and quantity, then click Generate. Click Save to History to store the current results.
Frequently asked questions
Are these numbers cryptographically secure?
No. This tool uses Math.random(), which is a pseudo-random generator. For cryptographic use, use crypto.getRandomValues() instead.
Why can't I generate 10 unique integers between 1 and 5?
There are only 5 possible integers in that range, so 10 unique values is impossible.
Are these numbers truly random?
They are pseudo-random, generated by JavaScript’s Math.random() function. They appear random and are suitable for games or simulations, but are not cryptographically secure.
What does "Allow Duplicates" mean?
If checked, the same number can be generated multiple times. If unchecked, all generated numbers will be unique.
Why can’t I generate 20 unique numbers between 1 and 10?
Because there are only 10 possible integers in that range. You cannot pick 20 unique numbers from a pool of 10.
What is the difference between integers and decimals here?
Integers are whole numbers (1, 2, 3). Decimals include fractional parts (1.5, 2.75) and allow you to set the precision.