Hide Ads
 Refresh   About   Tools 

PHP mt_rand() Randomosity Tester

TIMEOUT
+2,064,277 data
+1 +10 +100 +1K +10K +MAX
range: 1-5,000, data points: 2,064,279, groups: 133
High / Low / Range / Average
Frequency: 484 / 340 / 144 / 412.86
Rows: 108 / 1 / 107 / 37.59
Frequency
Rows
484
1
482
2
479
1
478
1
477
1
476
2
474
2
473
1
472
1
471
3
470
2
469
2
468
6
467
3
466
4
465
1
464
5
463
4
462
8
461
7
460
8
459
5
458
3
457
11
456
8
455
6
454
8
453
6
452
15
451
15
450
8
449
13
448
25
447
19
446
28
445
34
444
28
443
28
442
38
441
42
440
34
439
52
438
52
437
62
436
46
435
56
434
69
433
57
432
63
431
60
430
78
429
74
428
69
427
72
426
74
425
85
424
76
423
95
422
96
421
96
420
88
419
102
418
103
417
99
416
89
415
93
414
105
413
101
412
83
411
105
410
84
409
88
408
108
407
102
406
93
405
88
404
101
403
83
402
84
401
72
400
99
399
90
398
75
397
68
396
62
395
62
394
71
393
65
392
57
391
48
390
39
389
47
388
50
387
53
386
33
385
37
384
34
383
36
382
35
381
30
380
22
379
27
378
17
377
15
376
21
375
14
374
16
373
14
372
6
371
18
370
11
369
10
368
11
367
9
366
11
365
7
364
6
363
4
362
4
361
2
360
1
359
2
358
2
357
1
356
4
355
4
353
1
351
1
348
1
347
1
346
2
343
1
340
1

Test runs: 2,064,278Avg run : 0.000001 seconds Test time: 1.413584 seconds Data Save: 0.245964 seconds Test Tools: Restart test: Random range 1 to: 1 2 3 4 5 10 50 100 500 1K 5K 10K 50K 100K Random Generator Method: SQLite ORDER BY RANDOM() PHP rand() PHP mt_rand() PHP random_int() Back to top


About the Randomosity Tester

This page tests the frequency distribution and timing of random number generation via these methods:

Random number results are stored in a test table. The test table is defined as:

CREATE TABLE 'test' ( 'id' INTEGER PRIMARY KEY, 'frequency' INTEGER DEFAULT '0' );

The table is initialized by creating all rows with frequency = 0. The number of rows in the table is defined by the range setting. The current test is set to use range: 1 to 5,000.

For each random number chosen, the table is updated via:

UPDATE test SET frequency = frequency + 1 WHERE id = :random_number

For SQLite tests, results are individually generated via the SQL call:

SELECT id FROM test ORDER BY RANDOM() LIMIT 1;

Generate more random numbers by clicking a  +  number button to start a test run.

Each test run is limted to ~1.42 seconds.

A Frequency of Frequencies chart displays:

This site was created with Open Source software. Find out more on Github: randomosity-tester v0.2.2

Back to top


Hide Ads