Skip to main content

learn.howToCalculate

learn.whatIsHeading

A random number generator produces numbers with no predictable pattern within a specified range. Computers generate pseudorandom numbers using deterministic algorithms seeded by a starting value. True random numbers require physical entropy sources.

Guia passo a passo

  1. 1JavaScript: Math.random() returns a float from 0 (inclusive) to 1 (exclusive)
  2. 2Integer from min to max: Math.floor(Math.random() × (max - min + 1)) + min
  3. 3Cryptographic: crypto.getRandomValues() — suitable for security applications
  4. 4Distribution: uniform (equal probability for each value) by default

Exemplos resolvidos

Entrada
Range 1–100
Resultado
Random integer: e.g. 47

Pronto para calcular? Experimente a calculadora Random Number Generator gratuita

Experimente você mesmo →

Configurações

PrivacidadeTermosSobre© 2026 PrimeCalcPro