← Back to blog

Why Tic-Tac-Toe Is Always a Draw: The Math of "Solved" Games

The mathematical reason no one ever wins between two good players Β· 9 min read

Two people who actually know what they're doing will never produce a winner at tic-tac-toe. The game ends in a draw. Every. Single. Time.

This isn't a coincidence. It isn't a matter of luck or how the players happen to feel that day. It's a mathematical certainty β€” a fact about the structure of the game itself. Tic-tac-toe is what mathematicians call a solved game, and its solution is a draw.

That word, "solved," has a precise meaning. And the journey to understanding why tic-tac-toe deserves it goes through some of the most beautiful ideas in 20th-century mathematics.

What "solved" actually means

A game is "solved" when we know, from any starting position, what the outcome will be assuming both players play optimally. There are actually three levels of "solved" that mathematicians distinguish:

Tic-tac-toe is strongly solved. We don't just know the game ends in a draw from the empty board β€” we know the optimal move and resulting outcome from every one of the roughly 5,478 positions the game can reach. The whole game tree has been mapped, fully, in both directions.

For comparison: Checkers is weakly solved (a draw, proved in 2007 by Jonathan Schaeffer's team at the University of Alberta after a decades-long computational effort). Chess is not solved β€” the game tree is just too large. Go is not solved either. Most interesting games aren't.

Counting the game tree

Let's actually count what we're talking about. A game of tic-tac-toe consists of up to nine moves. How many possible games are there?

If we naively count every sequence of legal moves, allowing X and O to fill the board in any order β€” including continuing past wins, which we don't actually do β€” we get 9! = 362,880. If we stop properly at the point where someone wins, the number is exactly 255,168 distinct games.

That number sounds intimidating but it really isn't, in computational terms. A modern phone can analyze all 255,168 games in well under a second. And once you account for the eight-fold symmetry of the board (rotations and reflections), the count of meaningfully distinct games drops to just 26,830. Of those, X wins about 49%, O wins about 30%, and the rest are draws β€” but that's only if both players play randomly. Under perfect play, none of those wins ever happen.

Why X has a slight advantage but can't convert it

X gets to move first. That should be an advantage, right? It is. But not enough to actually win.

X's strongest opening is the center, which is part of four potential winning lines (the two diagonals plus the middle row and column). After X plays the center, there's essentially only one safe response for O: a corner. If O plays an edge instead, X has a forced win. But if O plays a corner β€” any corner β€” the position is balanced enough that X cannot force a victory.

The same is true if X opens in a corner. O's only safe response is the center. If O plays anywhere else (another corner or an edge), X has a forced win.

So X has a real first-move advantage in the sense that O has only one or two correct responses to each of X's openings β€” and most casual players don't know which response is correct. Against a beginner, X wins most games. But against an opponent who has memorized the right responses, X has no winning path. The game is destined to draw.

For the actual move sequences, our strategy guide walks through them step by step.

The strategy-stealing argument

One of the most elegant proofs about tic-tac-toe doesn't require enumerating positions at all. It's a piece of pure logic called the strategy-stealing argument, and it works for certain kinds of symmetric games β€” tic-tac-toe being one.

The argument goes like this. Suppose, for the sake of contradiction, that the second player (O) had a winning strategy. That is, no matter what X does, O has some series of responses guaranteeing eventual victory.

Now consider what X could do. On the first move, X could just make any move at all β€” say, the center. Then, when O responds, X pretends to be the second player. X imagines the game as if it were O's turn first (with the center cell already played as O's "first move") and applies the winning strategy that we just assumed O has.

There's only one wrinkle: at some point, that strategy might call for X to play in the center, which X has already done. But that's fine β€” making an extra move can never hurt in tic-tac-toe. So X just makes some other move instead and continues.

The conclusion: if O had a winning strategy, X could steal it and win. But X and O can't both win the same game. Contradiction. Therefore, O cannot have a winning strategy.

Notice what this argument does and doesn't prove. It proves O can't win. It does not prove X can win. So the only remaining possibilities are: X wins with perfect play, or both play perfectly to a draw. For tic-tac-toe specifically, exhaustive computer search shows it's the second β€” a draw.

The exhaustive computer proof

The strategy-stealing argument is beautiful but limited. The real proof that tic-tac-toe is a draw comes from a much less subtle method: just check every position.

The algorithm for this is minimax, the same algorithm that powers chess engines (with refinements) and the "Impossible" AI on our site. Starting from the empty board, minimax explores every possible move, then every possible opponent response, then every possible follow-up, all the way to the end of every game. At each leaf of the tree, it assigns a score: +1 for X winning, -1 for O winning, 0 for a draw. Then it propagates those scores back up, with each player picking the move that's best for them.

For tic-tac-toe, this computation finishes essentially instantly on any modern computer. The result: from the empty board, the value is 0. The game is a draw with perfect play.

The first computer to perform this analysis was OXO, written by A. S. Douglas in 1952 on the EDSAC at Cambridge University. OXO is widely considered the first computer game with a visual display β€” and from day one, it played a perfect game. It never lost. The minimax algorithm has been beating humans at tic-tac-toe since the year the discovery of DNA's structure was announced.

Why this is interesting, not depressing

People sometimes react to "tic-tac-toe is a draw" with disappointment. If the game is solved, what's the point of playing it?

A few responses to that.

First, the result only applies if both players play perfectly. Most casual players don't. They miss the priority list (win, block, fork, block-fork, center, opposite corner, corner, edge). They play edges in the opening. They don't see two-step threats. The game is solved for experts, but for everyone else, there's still plenty to play for.

Second, the solved-ness of tic-tac-toe is precisely what makes it valuable as a teaching tool. It's the smallest game that exhibits real strategic structure β€” anticipation, blocking, forks, perfect-play equilibrium β€” at a scale a child can grasp completely. Every more sophisticated strategic game (chess, Go, poker, even sports) involves some version of the concepts that tic-tac-toe demonstrates. It's the doorway.

Third, the variants are nowhere near solved. Ultimate Tic-Tac-Toe, with its 9-boards-in-1 structure, has a game tree large enough that nobody has computed its value. 4Γ—4 and 5Γ—5 versions open up huge tactical possibilities. The fact that the basic 3Γ—3 game is solved doesn't ruin the whole family β€” it just means the family had to invent more interesting cousins.

And finally: there's something philosophically beautiful about a game that everyone has played and that mathematicians have completely mapped. It's the rare object where childhood intuition and rigorous mathematics meet, and the answer turns out to be a tie.


The "Impossible" difficulty on our Classic game is the proof in action β€” it has never lost. See if you can draw against it.

Play Classic Tic-Tac-Toe β†’

Related reading