Here is a game where you can point at the exact move the opening ended: move eleven, when the queen stepped off d1 and the two white rooks could see each other along the first rank.
8
7
2
a
b
c
d
e
f
g
h 1
7
2
a
f
g The four tasks
A pawn in the centre. The minor pieces off the back rank. The king castled. The rooks connected, which means the bishop on c1 and the queen on d1 have both found somewhere else to be.
That last one is the marker, and it is the one beginners never tick off. Ask a club player when their opening finished and they will tell you a number; ask them where their queen’s rook is and they will find it still on a1 with nothing to do on move twenty five.
Do the four and the count takes care of itself. Ten moves in an open game, eleven in the one above, fifteen if the position is slow. That is the whole of the ten-move rule of thumb: not a rule, an average.
When it runs long, and when there is no opening at all
Closed positions stretch it. In a King’s Indian where White has pawns on c4, d5 and e4 and Black has pawns on d6, e5 and f5, nothing is going to be exchanged for a while, and both sides spend moves ten to twenty five manoeuvring knights behind their own pawns. The theory of those lines runs that deep because the positions really do stay in the opening that long.
Sharp lines cut it short. Trade queens on move six and you are in an endgame with your rooks still at home, which is a strange place to be and a good reason to know that the phases overlap rather than follow one another neatly.
Why the answer matters at all
Because it tells you when to stop playing on autopilot. While the tasks are unfinished, your move is nearly always obvious: bring out the piece that is not out, or castle. The moment the last task is done, nobody is going to tell you what to play, and you have to look at the pawn structure and decide what you are actually trying to do.
That change of gear is the hardest thing in the game to teach, and it arrives at about move eleven whether you noticed the opening ending or not. The opening principles get you that far. After that, middlegame puzzles are where the rest of your rating is.