What is the number of legal positions after n plies for n=1 through 5? I know that for n=1 it is 20.


2 Answers 2


Such counting of moves is called perft and it is used for testing move generation of chess engines.

You can find a table with your answer up to n = 15 here: https://www.chessprogramming.org/Perft_Results


A very rough approximation you can use is to multiply by 30 for each half move. Since in an average chess position, the number of possible moves tends to be in the ballpark of around 30 (of course, not for the starting position, but for chess positions in general). This should give you the answer within an order of magnitude or two. For an exact solution though, see Miguel's answer.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.