Random tools · Free tool
Random 4-Digit Number Generator (1000-9999)
Quick answer
Press Generate to get a random whole number from 1,000 to 9,999. Each number has exactly a 1 in 9,000 chance (0.011%), and results never depend on earlier draws. Tick No duplicates to draw several different numbers for a raffle.
| Range | 1,000 to 9,999 (9,000 possible numbers) |
|---|---|
| Chance of any one number | 1 in 9,000 (0.011%) |
| Possible results | 9,000 (1000 to 9999) |
| Draws to see every number at least once (average) | not practical |
A random 4-digit number is useful for test data, game codes, raffle ticket numbers and quick random IDs. This generator gives a number from 1000 to 9999, so there are 9,000 possible results. Don't use it to create bank PINs or passwords: use your bank's own process or a password manager instead.
## How fair is a random number from 1000–9999?Every whole number from 1,000 to 9,999 has the same chance on every draw: 1 in 9,000, or 0.011%. The generator uses crypto.getRandomValues, the cryptographically secure random source built into every modern browser, and throws away the rare raw values that would make some numbers slightly more likely than others (a fix for what programmers call modulo bias). Nothing is sent to a server and nothing is remembered between draws.
P(any one number) = 1 ÷ 9,000 = 0.011%Each draw is independent, so a number that just came up is exactly as likely to come up again.
Chance of getting a specific number at least once
If you need one particular number, say 2,233, here is how likely it is to appear at least once as you keep drawing:
| Draws | Chance your number appears at least once |
|---|---|
| 1 | 0.011% |
| 10 | 0.111% |
| 100 | 1.11% |
| 1,000 | 10.52% |
The formula is 1 − (8,999/9,000)^draws. Notice that even after 9,000 draws you are not guaranteed to see your number: the chance is only about 63.21%.
Chance of a repeated number
When you draw several numbers with duplicates allowed, repeats come sooner than most people expect:
| Numbers drawn | Chance at least two are the same |
|---|---|
| 2 | 0.011% |
| 3 | 0.033% |
| 5 | 0.111% |
| 10 | 0.499% |
Using it for a raffle or giveaway
- Number your entries from 1,000 to 9,999 (or set Min and Max to match your list).
- Set How many numbers to the number of winners and tick No duplicates.
- Press Generate once, in front of your audience or on a screen recording, and use the first result.
Drawing again until you get a result you like isn't random any more, so decide the rules before you press the button.
Other ranges
1–10 · 1–100 · 1–4 · 1–6 · 1–20 · 1–3 · 1–5 · 1–8 · 1–30 · 1–50 · Custom range
For dice with any number of sides, use the online dice roller. To see how casino games turn random numbers into results, read our odds vs probability guide.
Frequently asked questions
Is this 1000–9999 number generator really random?
It uses your browser's cryptographic random generator (the same source browsers use for encryption keys) with rejection sampling, so every number from 1,000 to 9,999 has exactly the same 1 in 9,000 chance. Previous results never affect the next one.
What are the odds of getting the same number twice in a row?
For any specific number, it's 1 in 81,000,000. For any repeat of whatever came up first, it's 1 in 9,000 (0.011%), because the second draw just has to match the first.
Can I pick several numbers with no duplicates?
Yes. Set how many numbers you want and tick 'No duplicates'. That's the right setting for raffles and giveaways, where each ticket should only win once.
Sources
- Crypto: getRandomValues() method — MDN Web Docs