top of page
Writer's pictureJonno

How many unique chess positions are possible?

Updated: Oct 25

How many unique chess positions are possible?


If you’ve never explored this question, the answer may surprise you. However before delving into the calculations, let's define what we mean by 'chess positions' as there are three reasonable interpretations. First, we could count all theoretical positions, ignoring whether they follow the rules of chess. For instance, a board filled with Queens is a theoretical position, even though it cannot occur in an actual game. Second, we could count only legal positions, factoring in chess rules but not considering whose turn it is or the sequence of moves that led to the position. Third, we might interpret positions as real chess games and count the actual number of games possible. Below, we will discuss the maths involved in calculating each of these.


Chess board for using maths to count total chess positions

  1. Theoretical number of positions (ignoring rules):


This calculation focuses on how pieces can be arranged on the board without regard for legality (e.g., multiple kings, illegal checkmates, etc.). 


  • A chessboard has 64 squares. 

  • There are 12 unique pieces (pawn, rook, knight, bishop, queen, and king for each colour). 

  • Each square can either be empty or occupied by one of these 12 pieces giving 13 possibilities for each square (12 pieces + 1 empty space).


For the total number of possible arrangements, each square has 13 possibilities. For two squares, this gives 13×13 = 169 unique configurations. Extending this to all 64 squares, the total number of possible arrangements is 13 multiplied by itself 64 times or 13^64.


13^64 = 19 605 347 643 076 107 333 065 976 042 356 601 542 440 328 000 411 578 758 959 096 384 224 896 113


(Pronounced 'twenty septenvigintillion'!).


For easier comparison and comprehension, let’s express this and subsequent large numbers in base 10 using logarithms.


10^x = 13^64

log(10^x) = log(13^64)

x log(10) = 64 log(13)

x ≈ 71


So, 13^64 ≈ 10^71.


To provide context for how large this number is, here are some other large numbers for comparison (these are commonly accepted estimates):


  • Grains of sand on Earth: 10^22

  • Atoms in the human body: 10^27

  • Possible DNA sequences: 10^40

  • Water molecules in the ocean: 10^46

  • Theoretical chess positions: 10^71

  • Atoms in the observable universe: 10^80


This serves to demonstrate the enormity of the number of possible arrangements of pieces on a chessboard.


  1. Legal positions (with rules applied):


The number of legal chess positions is far smaller than the theoretical number due to restrictions such as:


  1. Kings

    Each side must have exactly one king, and they cannot be adjacent.


    1. Both Kings on non-edge squares: 36 central squares where the second king can be placed in 55 valid positions: 36×55=1980

    2. One King in a corner: 4 corners with the second king placed in 60 valid positions: 4×60=240

    3. One King on an edge (not corner): 24 edge squares that are not corners with the second king in 58 valid positions: 24×58=1,392

    4. Total number of distinct positions for the two kings: 1980+240+1,392=3612


  1. Pawns:

    For any given number w of white pawns (from 0 to 8), we choose w squares from 48 (excluding the first and last rows). After placing white pawns, we choose b black pawns from the remaining squares, yielding the following sum for total configurations:


    ∑(w=0 to 8) [ (C(48, w) * ∑(b=0 to 8) ( C( (48 - w), b ) ] ≈ 4.91 × 10^16


  1. Other Pieces:

    Other pieces have more complex restrictions such as avoiding mutual checks. A rough estimate for these other pieces is around 6×10^22.


By multiplying these values for kings, pawns, and other pieces, we approach a lower bound of approximately 10^43 legal chess positions. Further refinements like promotion make the exact number hard to compute but leave us within the generally accepted range of 10^43 to 10^50.


  1. Legal games:


If we factor in additional rules like turns, castling rights, and en passant rights, the number of distinct games is around 10^120. This figure, known as the Shannon number, was named after Claude Shannon, who estimated chess’ complexity in the 1950s (see Reference 1 below). He calculated that if a computer could explore one full chess game per microsecond, it would still take 10^90 years to cover all possible variations!


The number 10^120 is a conservative lower-bound estimate. The actual number is likely higher, as Shannon’s estimate was based on 40-move games. Yet a chess game can last as long as 5949 moves! Shannon multiplied his estimate by 100 to account for longer games and other complexities like repetitions.


Shannon argued that In any given position, the player can alter their pieces in around 30 different ways, and an average game lasts for 40 turns per player, or 80 turns in total:


10^x = 30^80

log(10^x) = log(30^80)

x log(10) = 80 log(30)

x ≈ 118


Since many games can extend beyond 40 moves, Shannon multiplied 10^118 by 100 giving 10^120 unique game states.


Explanation:


Counting arrangements results in a significantly larger number than counting objects. While it may seem strange to claim that there are more possible chess games than there are atoms in the observable universe, the exponential growth of arrangements is the justification for the claim.


Perhaps a simple example will demonstrate why this is so:


Take four marbles (A, B, C, D). Their arrangements are:


ABCD, ABDC, ACBD, ACDB, ADBC, ADCB

BACD, BADC, BCAD, BCDA, BDAC, BDCA

CABD, CADB, CBAD, CBDA, CDAB, CDBA

DABC, DACB, DBAC, DBCA, DCAB, DCBA


That’s 24 unique arrangements for 4 objects. Yet if we increase the number of marbles to 5, we get 120 arrangements. With 6 marbles, 720. And by the time we get to 60 marbles, we have more arrangements than atoms in the universe. As you can see, the number grows exponentially even when arranging objects in a line. Yet we must add another exponent due to the two dimensional nature of the chess board! Therefore chess pieces can be arranged on a board in almost countless ways, even though there are only a small number of them.


Summary:


The number of possible chess positions varies based on how we approach the problem. The theoretical number of all possible piece configurations is around 10^71. If we consider legal positions, the number drops to around 10^43. When factoring in game states that include all chess rules and whose turn it is, the number of actual chess games is around 10^120—Shannon’s lower bound estimate.


  • Theoretical positions (ignoring rules): ≈ 10^71

  • Legal positions (within chess rules): ≈ 10^43

  • Actual games: ≈ 10^120


So who's up for a game of chess?


Recent Posts

See All

Comments


bottom of page