Math Proves Upper Bound for the Number of Chess Positions
Fun with chess

Math Proves Upper Bound for the Number of Chess Positions

Avatar of Jomsup
| 4

Chess is a complex game, as there are many different pieces, and each piece has its own unique moves. As chess players, we all know this well. The number of 32 pieces on 8×8 chessboard gives an incredible number of possible positions. In this post, we will analyze the number of possible positions in chess and provide a mathematical to prove the upper bound using my own method.

Although Claude Shannon estimated the number of possible chess games at 10¹²⁰ games, The number of positions on the board is much lower, due to the permutation of moves that lead to the same position. Currently, we do not yet know the exact numbers of chess positions. The computer calculation give the values ​​in range of (4.82 ± 0.03)×10⁴⁴ positions. In my opinion, it will take a long time from now to know the exact numbers.

A possible chess position must be a legal position, that is a position that can be reached from the standard starting position by legal move. This is difficult to consider this factor in calculation, so my calculations will ignore the legality of the position, the calculated values ​​will exceed the exact value and therefore represent the upper bound.

Example of illegal position. White rook cannot places on a3 without moving a pawn.

Proving the Upper Bound

In calculation, both white and black pieces start with 2 rooks, 2 knights, 2 bishops, 1 queen, 1 king, and 8 pawns, which can be promoted to a rook, knight, bishop or queen. The piece that was captured considered empty piece. To make the calculation easier, the empty piece is consider like a new chess piece, so the obtained value is higher than the actual value again, but our goal is still to find the upper bound, so it is not a problem.

The calculation is divided into the following 3 steps, which are continous process, so the number of chess positions is the product of the values ​​from all 3 steps.

  1. The number of positions the white king and black king on the board.
  2. The number of ways to place 15 white pieces into the remaining squares.
  3. The number of ways to place 15 black pieces into the remaining squares.

Note:

  1. n! is a factorial function of n, defined by 0! = 1 and n! = n×(n-1)×...×2×1 for all positive integer n. For example, 5! = 5×4×3×2×1 = 120.
  2. C(n, r) It represents the number of selections r items out of n items, regardless of order, which can be calculated by C(n, r) = n! ÷ (r! × (n-r)!) for all non-negative integer nr that n ≥ r.

Step 1: The number of the white king and black king on the board.

Without loss of generality, we will start by placing the white king first, and then the black king in a position where it does not adjacent the white king. When considering the position of the white king, the calculation can be divided into 3 cases.

  1. When the white king is on the corner, which has 4 squares, the black king can be placed 60 squares, so there are 4×60 = 240 positions.
  2. When the white king is on the edge of the board, not the corner, which has 24 square, the black king can be placed 58 squares, so there are 24×58 = 1,392 positions.
  3. When the white king is not on the edge of the board, which has 36 squares, the blacking can be placed 55 squares, so there are 36×55 = 1,980 positions.
White king placement for each case and squares that attacked.

When all 3 cases are combined, The number of positions the white king and black king on the board is 240+1,392+1,980 = 3,612 positions.

Step 2: The number of ways to place 15 white pieces into the remaining squares.

In arranging 15 white pieces into the remaining 62 squares, each piece be a pawn, rook, knight, bishop, queen or empty pieces, giving 6 possible states. So, the number of ways to place all 15 white pieces is C(62, 15)×6¹⁵ or about 4.38×10²⁵ ways.

Step 3: The number of ways to place 15 black pieces into the remaining squares.

In arranging 15 black pieces into the remaining 47 squares, each piece be a pawn, rook, knight, bishop, queen or empty pieces, giving 6 possible states. So, the number of ways to place all 15 black pieces is C(47, 15)×6¹⁵ or about 3.53×10²³ ways.

Now, all 3 steps are finished and we have an upper bound on the number of chess positions, which is 3,612 × (C(62, 15)×6¹⁵) × (C(47, 15)×6¹⁵) or about 5.58×10⁵² positions.


We have already proved that there are less than 5.58×10⁵² positions in chess. This number also includes many illegal positions, such as pawn on the first rank, both kings in check, etc. At least this proof helps us a better understanding of the complex nature of chess.

Data from Tablebase

As of 2025, tablebase perfectly solve chess when there are no more than 7 pieces on the board. The tablebase for 8 pieces is still in progress. However we know the exact number of chess positions from the tablebase for up to 8 pieces. The table below shows the exact number of chess positions when the number of pieces on the board is determined.

Number of pieces Number of positions
Exact Approx
≤5  26,038,209,193  2.60×10¹⁰
6  3,787,154,440,416  3.79×10¹²
7  423,836,835,667,331  4.24×10¹⁴
8 38,176,306,877,748,245  3.82×10¹⁶


With such a huge number, it is impossible for humans to remember all the chess positions. Although in the distant future, chess engine may be able to solve chess, I think the popularity of chess will not decrease due to its complexity that humans cannot fully comprehend.

Thank you for reading to the end. Hope you enjoy the chaos of 32 pieces on the 8×8 chessboard.