Denne malen gjev et tilfeldig heiltal mellom 0 og tak-1 (altså ikkje medrekna det øvre talet). Utan parametrar gjev han eit tilfeldig tal mellom 0 og 99.

Bruk:
  • {{Rand|tak|seed|primtal}}
  • Alla parametrar er frivillige og har standardverdiar. Dei må vera heiltal.
  • tak er parameteren som avgjer det største talet ein kan få. Alle resultat er mindre enn tak. Standard: 100
  • seed eller byrjingstal er eit tilfeldig vald heiltal. Om du ønskjer fleire tilfeldige tal på ei side må byrjingstala vera ulike. Standard: 7
  • primtal er eit tilfeldig primtal større enn 17. Dette kan også brukast for å få ulike resultat på same side. Standard: 67
Exempel som ger tal mellan 0 och 999:
  • {{Rand|1000}} = 411
  • {{Rand|1000|7|67}} = 458 (same som det over)
  • {{Rand|1000|7|61}} = 276 (skal vera ulikt dei over)
  • {{Rand|1000|6}} = 391
  • {{Rand|1000|5}} = 324
  • {{Rand|1000|4}} = 257
  • {{Rand|1000|3}} = 190
  • {{Rand|1000|2}} = 123
  • {{Rand|1000|1}} = 56
  • {{Rand|1000|0}} = 989
  • {{Rand|1000|1|17}} = 885 (ulike primtal)
  • {{Rand|1000|1|19}} = 920
  • {{Rand|1000|1|23}} = 18
  • {{Rand|1000|1|29}} = 155
  • {{Rand|1000|1|31}} = 211
  • {{Rand|1000|1|37}} = 338
  • {{Rand|1000|1|41}} = 419
  • {{Rand|1000|1|43}} = 483
  • {{Rand|1000|1|47}} = 565
  • {{Rand|1000|1|51}} = 667
  • {{Rand|1000|1|53}} = 716
  • {{Rand|1000|1|59}} = 854
  • {{Rand|1000|1|61}} = 849
  • {{Rand|1000|1|67}} = 989
  • {{Rand|1000|1|71}} = 79
  • {{Rand|1000|1|73}} = 112
  • {{Rand|1000|1|79}} = 270
Note:
  • Varying seed linearily generates numbers that generates a linear sequence on the same page, with equal cyclic steps;
  • Varying prime (provided that they are odd prime numbers) generates pseudo-random that have independant random distribution.
  • Note that when count is even (such as 100 by default, or 1000 in the examples above), the generated numbers (on the same page) are all odd or all even when you are varying the seed or prime, unless half of the calls use an even seed and the others used an odd seed. However, later invokations will still alternate odd and even numbers on output (this problem only occurs on the same page where multiple random numbers are invoked).
  • On the same page, multiple invokations of this template with the same parameters will generate the same ouput value, so it is possible to create multiple links related to the same article.