AES Key Space Calculator

The AES key space is the number of possible keys, 2 raised to the key length in bits. This calculator reports the total key space for a chosen AES key length and estimates how long a brute-force search would take at a stated guess rate, both worst case and on average. It shows why AES-128 is already beyond brute-force reach and why AES-256 is chosen for long-term security. Enter a key length and an attacker guess rate.

0.00
0.00
0.00
0.00

AES key space formula

key space = 2^bits
worst-case time = key space / guess rate
average time = (key space / 2) / guess rate
years = seconds / 31,557,600

The number of keys doubles with every added bit. Brute force searches the space at the attacker's guess rate; on average the key is found after searching half the space, so the average time is half the worst case. Times are converted to years using the Julian year of 31,557,600 seconds.

Worked example

AES-256 at 1 trillion (10^12) keys per second. Key space = 2^256, about 1.16 times 10^77 keys. Worst-case time = 1.16e77 / 1e12 = 1.16e65 seconds, around 3.67e57 years. Average time is half that, about 1.84e57 years, vastly longer than the age of the universe. Even AES-128's 3.4e38 keys put it far out of brute-force reach.

AES key space: frequently asked questions

How big is the AES key space?

For a key of n bits the key space is 2^n distinct keys. AES-128 has 2^128 keys (about 3.4 times 10^38), AES-192 has 2^192, and AES-256 has 2^256. These numbers are so large that brute-forcing AES-128 is infeasible with any foreseeable classical hardware.

How is brute-force time estimated?

Average time = (2^n / 2) / guesses per second, since on average an attacker finds the key after searching half the space. This calculator divides the total key space by your stated guess rate to give the worst-case and average search time.

Could a supercomputer break AES-128?

No. Even at a trillion-trillion (10^24) guesses per second, searching half of 2^128 keys would take on the order of 10^13 years, far longer than the age of the universe. AES-128 is considered secure against brute force for the foreseeable future.

Does this account for quantum computers?

No. This is a classical brute-force estimate. Grover's quantum algorithm would roughly halve the effective key length, so AES-256 would offer about 128-bit quantum security. NIST recommends AES-256 for long-term protection against future quantum attacks.

Sources and references

Reviewed by the CalculatorHub team, edited by James Graham, 19 June 2026. See our methodology.