Hverdag · verktøy

Tilfeldig tallgenerator

Angi en minimums- og maksimumsverdi, og generer et tilfeldig tall lokalt.

Kjøres i nettleseren. Ingen opplasting.
—

Uses your browser’s secure random source.

Om verktøyet

Tilfeldig tallgenerator sem complicação.

Generatoren bruker nettleserens sikre tilfeldighetskilde og sender aldri området eller resultatet noe sted.

Veiledning

Slik bruker du Tilfeldig tallgenerator

The Random Number Generator picks numbers between a minimum and a maximum that you choose. You can ask for one number or a long list, whole numbers or decimals, with repeats or without. Whole-number picks include both ends of your range, so 1 to 6 can give a 1 or a 6. The numbers come from the secure random source built into your browser, and your range is never sent anywhere. It suits games, draws, sampling and quick decisions. Do not use it for passwords or security keys, which need a tool made for that job.

Slik gjør du

  1. Type a Minimum and a Maximum. The page starts with 1 and 100. A button sets that range again.
  2. Type how many numbers you want in How many numbers? The page accepts a whole number from 1 to 100,000.
  3. Keep Whole number only ticked for integers. Untick it to get decimals between the two values.
  4. Tick No repeats if each number must appear at most once. This works only with whole numbers.
  5. Press Generate number. The results appear one per line. Press again for a fresh set.
  6. Press Copy result to copy the list, or Clear to empty the boxes and the result.

Eksempler

Rolling one six-sided die

Du skriver inn
Minimum
1
Maksimum
6
Antall
1
Bare heltall
ja
Du får
Resultat
one whole number from 1 to 6

Each press gives a single number, and every value from 1 to 6 has the same chance. Nothing outside the range can appear.

Kjørt med verktøyets egen kode.

Five different numbers from 1 to 5

Du skriver inn
Minimum
1
Maksimum
5
Antall
5
Bare heltall
ja
Ingen gjentakelser
ja
Du får
Resultat
the numbers 1, 2, 3, 4 and 5 in a random order

When the count equals the size of the range and repeats are off, every number is used once. The only thing that changes is the order, like shuffling five cards.

Kjørt med verktøyets egen kode.

Asking for more different numbers than exist

Du skriver inn
Minimum
1
Maksimum
5
Antall
6
Bare heltall
ja
Ingen gjentakelser
ja
Du får
Melding
There are not enough different numbers in this range.

Only five whole numbers lie between 1 and 5, so six different ones are impossible. Widen the range or lower the count.

Kjørt med verktøyets egen kode.

Three decimals between 0 and 1

Du skriver inn
Minimum
0
Maksimum
1
Antall
3
Bare heltall
nei
Du får
Resultat
three numbers like 0.42240613459725485, each from 0 up to but not including 1

Decimals are not rounded, so they come out with many digits. Round them yourself if you want two or three places.

Kjørt med verktøyets egen kode.

Bounds that are not whole numbers

Du skriver inn
Minimum
1.2
Maksimum
5.8
Antall
5
Bare heltall
ja
Du får
Resultat
five whole numbers, each between 2 and 5

The tool moves the minimum up to 2 and the maximum down to 5 before picking. The values 1 and 6 are outside your range, so they never appear.

Kjørt med verktøyets egen kode.

A minimum that is larger than the maximum

Du skriver inn
Minimum
10
Maksimum
1
Antall
1
Du får
Melding
Enter a valid minimum and maximum.

The tool does not swap the two values for you. Put the smaller number in Minimum and the larger one in Maximum.

Kjørt med verktøyets egen kode.

Når det er nyttig

  • Roll a die or pick a number for a board game or a classroom game.
  • Draw winning numbers for a small giveaway among numbered entries.
  • Choose a random sample of row numbers from a list or a spreadsheet.
  • Pick lottery-style numbers for fun without repeats.
  • Settle a tie or make a quick choice between several options.
  • Create test numbers for a spreadsheet or a small program.

Begrensninger

  • The count must be a whole number from 1 to 100,000. The box itself may suggest a smaller limit, but the tool accepts up to 100,000.
  • Minimum must not be larger than Maximum, and both must be filled in. Otherwise you see an error and a dash.
  • No repeats needs Whole number only. With decimals the box is turned off and repeats are possible, although equal decimals are very unlikely.
  • With No repeats, the count cannot be larger than the number of whole numbers in your range.
  • Decimals come out unrounded with many digits, and the maximum itself is never reached when you pick decimals.
  • Very wide ranges are limited. Whole-number bounds outside the safe integer range of about 9 quadrillion are rejected.
  • Do not use the numbers as passwords, security tokens or in places where an official draw is required.

Tips

  • Press the 1 to 100 button if you changed the boxes and want the default range back.
  • To pick a winner from a list, number the entries from 1 and use that range with a count of 1.
  • To shuffle a list of N items, set the range to 1 to N, the count to N and tick No repeats.
  • For a coin flip, use the range 1 to 2 and decide ahead of time which number means heads.
  • Generate more numbers than you need if you plan to skip some, and use them in order.

Kilder

Vanlige spørsmål

Sobre Tilfeldig tallgenerator.

How do I generate a random number from 1 to 100?

Leave Minimum at 1 and Maximum at 100, keep Whole number only ticked, set the count to 1 and press Generate number. The 1 to 100 button restores these settings if you changed them.

Can I get numbers without repeats?

Yes. Tick Whole number only and No repeats. Every number in the list is different, and the count cannot exceed how many whole numbers fit between your minimum and maximum.

Are the minimum and maximum included?

For whole numbers, yes. A range of 1 to 6 can return 1 and can return 6. For decimals the minimum can appear, but the maximum itself is not reached.

Can it make negative numbers?

Yes. Type a negative minimum, such as -10, and a maximum such as 10. The results can be negative, zero or positive. Negative ranges like -10 to -5 also work.

How do I get decimal numbers?

Untick Whole number only. The tool then returns decimals between your two values. They are not rounded, so copy them into a spreadsheet and round there if you only need a few places.

Is the result really random?

It uses the secure random source your browser provides, which is meant to be cryptographically strong. Whole-number picks are corrected so each value has the same chance. No pattern is stored or reused.

Why does the tool say Enter a whole number?

The How many numbers? box was empty, below 1, above 100,000 or not a whole number. Type a whole number in that range and try again.

What happens if I type a decimal as the minimum while Whole number only is on?

The tool rounds the minimum up and the maximum down to whole numbers before it picks. A range of 1.2 to 5.8 therefore gives numbers from 2 to 5.

Is my range or result sent anywhere?

No. The numbers are made on your device in your browser, and the range and result are not uploaded. If you press Copy result, the text goes only to your own clipboard.

Can I use it for passwords or an official lottery?

No. A password needs a tool built for secrets, and an official draw has its own rules and witnesses. This page is fine for games, quick picks and tests, where a fair result is enough.

Why do I see the same number twice in a row?

With repeats allowed, each pick is independent, so the same value can come twice, even in a row. That is a sign of true randomness. Tick No repeats if you need all values different.

Hvordan bruker du Tilfeldig tallgenerator?

Angi en minimums- og maksimumsverdi, og generer et tilfeldig tall lokalt.

Lastes dataene mine opp til en server?

Nei. Behandlingen skjer i nettleseren din, og opplysningene dine lastes ikke opp.