Ask how many games of noughts and crosses there are and you will be given a number. Ask twice and you will be given a different one. The figures in circulation are 362,880, 255,168, 26,830, 5,478 and 765 — and the reason they disagree is not that somebody is wrong. It is that they are answers to five different questions, and almost nobody says which one they are answering.
We recomputed all of them from scratch. Here they are, and here is what each one counts.
How many possible tic-tac-toe games are there?
255,168.
That is the number of distinct ways a game can be played from the empty board to its end, counting a different order of the same moves as a different game — and, crucially, stopping the moment somebody has three in a row.
The other number you see for this is 362,880, which is 9 factorial: the number of ways to fill nine squares in order. It is easy to compute and it is wrong, because it keeps playing after the game is over — it counts games in which somebody made a line on move five and then both players politely carried on filling in squares.
The two figures fit together exactly, which is a decent check that both are right. A game that ends after k moves leaves 9 − k squares empty, and those can be filled in (9 − k)! orders. So the 1,440 games that end in five moves account for 1,440 × 4! = 34,560 of the factorial's orderings, the 5,328 six-move games for 31,968, the 47,952 seven-move games for 95,904, the 72,576 eight-move games for themselves, and the 127,872 that fill the board for themselves. Add those up and you get 362,880 on the nose.
How many tic-tac-toe positions are there?
5,478.
A position is an arrangement of marks on the board — a photograph, not a story. Many different games pass through the same position: if you play the centre and I play the top-left corner, we reach the same board as if we had played those two moves the other way round. Two games, one position.
That is why the two numbers differ by a factor of nearly fifty.
The mix-up that is everywhere
The single most common error on the web is to quote 26,830 as the number of board positions or "unique board configurations". It is not. It is a count of games, not positions — games with rotations and mirror images merged at every move as the tree is built.
The symmetry-reduced count of positions is 765.
The two get swapped constantly, including on pages that currently rank well for the question, and the giveaway is the size: no reduction that treats eight rotations as one can turn 5,478 into 26,830, because that would be going up.
How does a game actually end?
Now the interesting part, and the number that surprised us.
Across all 255,168 games, the first player wins 131,184 of them (51.4%), the second player wins 77,904 (30.5%), and 46,080 are drawn (18.1%).
So a draw is the rarest of the three outcomes. And yet everybody knows that noughts and crosses is a draw.
Both of those are true
"Tic-tac-toe is a draw" is a statement about perfect play — about the tiny sliver of those 255,168 games in which neither side ever errs. Among all the games that can physically be played, drawing is the outcome you see least often, because reaching a draw requires both players to avoid every trap for nine moves running, while a win only requires one of them to slip once.
That is also why the game feels different depending on who you are. Between two adults it is a formality. Between two eight-year-olds it is a real contest, and the statistics above are much closer to what they experience.
The first player's advantage is real, too: not because of anything mystical about moving first, but because they place five marks to the opponent's four, and every line they build has to be answered rather than the other way round.
How long does a game last?
Half of every possible game — 127,872 of them, 50.1% — runs the full nine moves and fills the board. That splits into the 46,080 draws and 81,792 games the first player wins with the very last square on the board, which is more than half of all their wins.
At the other end, the shortest possible win takes five moves and occurs in just 1,440 games, 0.6% of the total. Nobody wins in four: the first player has only placed two marks by then. If you have ever felt that a game of noughts and crosses drags on, the numbers agree with you.
Where the positions are
Positions do not spread evenly across a game. The board is at its most complicated well before the end.
With six marks on the board there are 1,520 possible positions, of which 204 are genuinely different rather than turnings of one another. After that the count drops, because games start finishing and stop generating new positions: 1,140 at seven marks, 390 at eight, 78 at nine.
The symmetry row is the one worth staring at. Early on, an empty board is an empty board (1 position, 1 genuinely different) and the nine possible first marks are really only three — a corner, an edge or the centre. Everything anyone ever taught you about opening this game is contained in that 9-becomes-3.
Is tic-tac-toe solved?
Yes, completely, and it was solved before anybody used the word. With correct play from both sides the game is drawn. The first player cannot be beaten; the second player cannot be beaten either, provided they respond correctly to the opening.
The whole of correct play fits in two sentences. Take the centre if it is free — it lies on four of the eight winning lines, against three for a corner and two for an edge. Otherwise block your opponent's line before building your own, and watch for the double threat: one mark that completes two lines at once, which is the only way anybody ever actually wins against someone paying attention.
If you would like the grids to try it on, there are printable tic-tac-toe sheets — six to a page for small hands, twenty-four for a class.
And if a drawn game sounds like a waste of a grid: the draw is a property of this board, not of the idea. Bigger boards have their own answers, and most of them are worse — a 4×4 board with three in a row is a forced win for whoever starts.
From 5,478 down to 304
There is one more number in the opening figure, and it is our favourite.
In 1961 Donald Michie built a machine that learns to play this game, out of matchboxes. He needed one box per position that the machine would have to make a choice in — which is not 5,478, because the machine only moves on its own turn, and not 2,201 either, because a rotated board is the same board.
It is 304. That reduction is the reason the machine fits on a table instead of filling a room, and it is the same 8-into-1 folding that turns 5,478 positions into 765 above.
You can play the machine — it starts out knowing nothing and learns from you — or print all 304 labels and build one, which is a better use of an afternoon than it sounds.
Every figure on this page was computed by walking the complete game tree, not taken from a source. The code is the same symmetry engine that runs MENACE on this site, which is why the 765 and the 304 are guaranteed to agree with each other.
