Guides › Minimum sequence length

SP 800-22 minimum sequence length for each test

Short answer: use 1,000,000 bits (125,000 bytes) per sequence. Below that, some tests cannot run and report N/A. The table shows exactly where each test starts working.

Updated October 20, 2026

Bits needed per test

"Minimum here" is the length below which NISTTEST.COM reports N/A for that test. The NIST column summarises the parameter guidance in SP 800-22 Rev. 1a section 2, where n is the sequence length in bits.

TestMinimum here (bits)As .bin (bytes)NIST guidance
1. Frequency (Monobit)10013n ≥ 100
2. Frequency within a Block2,560320n ≥ 100, block size M ≥ 20, M > 0.01n, fewer than 100 blocks
3. Runs10013n ≥ 100
4. Longest Run of Ones12816Block size 8 from 128 bits, 128 from 6,272 bits, 10,000 from 750,000 bits
5. Binary Matrix Rank38,9124,864n ≥ 38·M·Q with 32×32 matrices
6. Discrete Fourier Transform1,000125n ≥ 1,000
7. Non-overlapping Template8,2561,032Template length 9 or 10, at most 100 blocks
8. Overlapping Template1,000,000125,000n ≥ 106
9. Maurer's Universal387,84048,480n ≥ 387,840 for block length L = 6; longer for larger L
10. Linear Complexity100,00012,500n ≥ 106 recommended, block size 500–5,000, at least 200 blocks
11. Serial262,14432,768Pattern length m < ⌊log2 n⌋ − 2 (m = 16 here)
12. Approximate Entropy2,048256Pattern length m < ⌊log2 n⌋ − 5 (m = 10 here)
13. Cumulative Sums10013n ≥ 100
14. Random Excursions1,000,000125,000n ≥ 106 and at least 500 cycles
15. Random Excursions Variant1,000,000125,000n ≥ 106 and at least 500 cycles

Why the Random Excursions tests still say N/A at a million bits

These two tests look at the random walk formed by adding +1 for each one and −1 for each zero, and split it into cycles that start and end at zero. They need at least 500 cycles. A random million-bit sequence has about 800 cycles on average, but the count varies a lot: in our simulations roughly a third of random million-bit sequences had fewer than 500, so these two tests reported N/A. Longer sequences help only slowly (about a quarter still fall short at 2 million bits, about a fifth at 4 million). N/A here says nothing bad about your generator.

Binary files are eight times smaller than text

In a .bin file each byte holds 8 bits. In a .txt file of 0 and 1 characters, each character is a whole byte holding one bit. The same 1,000,000-bit sequence is:

Convert text to binary before uploading if you can; the input file guide shows how.

How many sequences?

One sequence tells you whether that capture shows a weakness. To judge a generator, SP 800-22 tests many sequences and checks the pass proportion and the spread of p-values; NIST suggests at least 55 sequences for the uniformity check (how the proportion and uniformity checks work).

Check which tests your file can run. Upload it and the results table marks every test that needs more data.

Run the free test

NISTTEST.COM is an independent implementation of NIST SP 800-22 Rev. 1a and is not affiliated with or endorsed by the National Institute of Standards and Technology.