Part of the Technology & IT suite · 35 calculators

Encryption Key Space Calculator

How many keys a given key length allows, and how long brute force would take — the arithmetic behind why 128-bit encryption is considered safe and 56-bit is not.

A key of n bits has 2ⁿ possible values, and brute force finds the right one after half of them on average.

10¹⁸ is far beyond any real machine — a deliberately generous attacker
Results update as you type
Results
Average time to break
5.39e+12 years
Possible keys
Compared with the age of the universe
Effective strength against a quantum attack
Assessment
Each extra bit
Reviewed September 2026. Computing arithmetic: bytes, bits, seconds and probabilities do not change by country. US broadband is advertized in megabits per second (Mbps).
No account required · Google Analytics off unless allowedCalculator arithmetic runs in your browserResults update as you type
All calculations run 100% in your browser. The calculator code does not submit your figures to GlobalCalc to obtain a result.
About encryption key space

How the encryption key space calculator works

A key of n bits has 2ⁿ possible values, and brute force finds the right one after half of them on average. The numbers grow so fast that intuition fails: 128-bit keys are not twice as hard as 64-bit, they are 18 quintillion times harder. That is why key length is chosen with an enormous margin — the goal is not to be expensive to break but to be impossible within the lifetime of the universe. Quantum computing changes the arithmetic for symmetric keys by roughly halving the effective strength (Grover's algorithm), which is why 256-bit keys are recommended for long-term secrets.

Formula: key space = 2ⁿ; average time = 2ⁿ ÷ 2 ÷ guesses per second

Worked examples

InputsAverage time to breakNote
128-bit (AES-128)5.39e+12 yearsfar longer than the age of the universe
56-bit (the old DES standard)36 msbroken in a fraction of a second at this rate
256-bit (AES-256)1.83e+51 yearssafe even against a quantum attacker

Frequently asked questions

Why is 128-bit encryption considered unbreakable?

Trying half of 2¹²⁸ keys at a billion billion a second still takes billions of times the age of the universe. The limit is physics, not engineering budget.

Why use 256-bit keys then?

Margin. Grover's algorithm would roughly halve the effective strength of a symmetric key, so 256 bits keeps a comfortable 128-bit margin against a future quantum attacker.

Is a longer key always better?

Only up to a point — past 256 bits the key stops being the weak link. Attacks target implementations, passwords and people instead.

Does this apply to RSA keys?

No. RSA and elliptic-curve keys are attacked by factoring and discrete-logarithm methods, not brute force, so a 2048-bit RSA key is roughly comparable to a 112-bit symmetric key.

So why do systems still get broken?

Because attackers go around the encryption: weak passwords, stolen keys, unpatched software and phishing. Key length is rarely the weakest part.

Where these figures come from

Last checked: September 2026. Units follow the SI decimal convention (IEC 80000-13 defines the binary alternatives); network and security figures cite the defining standard.