Home > Resources > Online Tools > Calculators > Random Integer & Real Number Generator

Random Integer & Real Number Generator

Random Integer & Real Number Generator
Instructions/Notes

mt_rand(min, max) — This function generates a set of random integers based on your criteria. As a developer, this is a great tool to use if you need to quickly generate a set of integers to test your application.

(min + (max - min)) * mt_rand(0, mt_getrandmax()) / mt_getrandmax() — This formula is used to generate a set of random real (e.g., floats, doubles) numbers based on your criteria. As a developer, this is a great tool to use if you need to quickly generate a set of real numbers to test your application.

Need to generate 1000s of numbers? Try the Bulk Random Number Generator.