How many combinations does SHA-256 have?

Total combinations of SHA-256 is

115,792,089,237,316,195,423,570,985,008,687,907,853,269,984,665,640,564,039,457,584,007,913,129,639,936

A sha-256 hash has 64 characters, 32 hex combinations, because a hex has 2 characters.

3a 7b d3 e2 36 0a 3d 29 ee a4 36 fc fb 7e 44 c7 35 d1 17 c4 2d 1c 18 35 42 0b 6b 99 42 dd 4f 1b

Above is a hash where the hex combinations are separated so you can count 32.

There are 16 characters available to hex 0-9&a-f and 16^2 or 256 combinations in hex.

With 32 slots for a hex in a sha-256 you use 256^32 to get:

115792089237316195423570985008687907853269984665640564039457584007913129639936

Available sha-256 hashes.


SHA-256 produces 256 bits which is 32 bytes, not characters, each byte has 256 possible values.

There are 256 bits and each bit has 2 values (0 or 1), thus 2^256.
There are 32 bytes and each byte has 256 values, thus 256^32.
Note: 2^256 == 256^32 ~= 10^77.

The 32 bytes can be encoded many ways, in hexadecimal it would be 64 characters, in Base64 it would be 44 characters.

Tags:

Sha256

Bitcoin