How to Win Tic Tac Toe (and Never Lose): Every Opening and the Only Safe Replies

By Dawid Siedlarz · · Updated · 4 min read

Play Tic-Tac-Toe free →

Short answer: With perfect play, tic tac toe always ends in a draw, so "winning" means punishing mistakes. As X, open in a corner: O has only one safe reply (the centre), and every other answer lets you force a win with a fork. As O, never lose by following one table: answer a corner with the centre, the centre with a corner, and an edge with the centre, a corner next to it or the opposite edge. You can play tic tac toe online for free against the computer or with a friend on one device, no download or account.

Try it right here, or open Tic-Tac-Toe full screen.

Tic tac toe (noughts and crosses) is the first strategy game most people learn, and most people stop thinking about it after age ten. That is exactly why a few simple rules beat most opponents: they play on instinct, and the board has fewer safe moves than it looks.

Tic tac toe rules

  1. The board is a 3 × 3 grid. One player is X, the other is O. X always moves first.
  2. Players take turns placing their mark in an empty square.
  3. Three of your marks in a row, a column or a diagonal wins.
  4. If all nine squares are filled and nobody has three in a line, the game is a draw.

How many games of tic tac toe are there?

If you list every possible sequence of moves, stopping as soon as someone wins, there are exactly 255,168 different games. X wins 131,184 of them (51.4%), O wins 77,904 (30.5%), and 46,080 (18.1%) end in a draw. We counted them with a short script that plays out every move.

Those numbers describe random play, not good play. With no mistakes on either side, every single game is a draw. But they show why going first matters: X gets the extra mark on the board, and more of the possible games go X's way.

The rules of perfect play

On every move, check these in order and do the first one that applies:

  1. Win. If you have two in a line and the third square is empty, take it.
  2. Block. If your opponent has two in a line, take the third square.
  3. Fork. Make a move that creates two lines of two at once. Your opponent can block only one.
  4. Block a fork. If your opponent could fork next move, take that square, or make two in a row somewhere that forces them to block you instead.
  5. Centre, then corners, then edges. The centre is part of 4 lines, each corner of 3 and each edge of only 2.

How to never lose as O: the only safe replies

Most games are lost on O's first move. We checked every opening and every reply by playing each position out perfectly. These are the replies that still guarantee a draw; every other square loses against a perfect X.

X opens inSafe replies for OLosing replies
A cornerThe centre onlyAll 7 other squares
The centreAny cornerAny edge
An edgeThe centre, either corner next to it, or the opposite edgeThe two edges next to it and the two far corners

So the one rule that fixes most of O's losses is short: if X takes a corner, you take the centre.

How to win as X: the corner trap

  1. Open in a corner. It is the opening with the most losing replies: 7 out of 8.
  2. If O does not take the centre, you can force a win. A common line: O plays an edge or a corner, you take another corner so that you threaten a line, O must block, and your next move creates a fork.
  3. If O takes the centre, take the opposite corner. Now O must not answer in a corner: if O does, you take the last free corner and fork. O's only safe moves are the edges, and then the game is a draw unless O slips later.

Opening in the centre is also safe, and O loses if they answer on an edge. Opening on an edge is the weakest start, because O has four safe replies.

Common mistakes

  • Answering a corner with a corner or an edge. It feels natural, and it loses to a player who knows the trap.
  • Attacking before blocking. Your own two in a row doesn't matter if your opponent wins on the next move.
  • Not seeing a fork coming. Before you block, check whether the block leaves your opponent a square that makes two lines at once.

Play tic tac toe online

Our Tic Tac Toe runs on a phone, tablet or computer. Play two players on one screen, or against the computer on Easy or Unbeatable; X always starts, and against the computer you are X. Unbeatable plays every move perfectly, so a draw is the best result you can get there: a good test of the rules above. Easy makes mistakes, which makes it the place to practise the corner trap. Then try the trap on a friend, switch sides and see if they find the centre. When three in a row gets too easy, Four in a Row uses the same fork idea on a 7 × 6 board against the computer; our Connect 4 strategy guide explains how.

Frequently asked questions

Can you always win at tic tac toe?

No. If neither player makes a mistake, every game of tic tac toe ends in a draw. What you can always do is never lose, and win whenever your opponent misses the one safe reply, such as not taking the centre after a corner opening.

What is the best first move in tic tac toe?

A corner. It is the opening with the most losing replies: 7 of the 8 squares O can answer with lose against perfect play, and only the centre holds the draw. Opening in the centre is also safe, and O then loses by answering on an edge.

How do you win tic tac toe if you go second?

As O you cannot force a win, so first make sure you cannot lose: answer a corner with the centre, the centre with a corner, and an edge with the centre, a corner next to it or the opposite edge. Then win when X fails to block a line or lets you build a fork.

Is X and O the same game as tic tac toe?

Yes. X and O, XO and noughts and crosses (the usual British name) are all the same game: a 3 by 3 grid, X moves first, and three marks in a row, column or diagonal win.

What is a fork in tic tac toe?

A fork is a move that creates two lines of two at the same time, each with its third square empty. Your opponent can block only one of them, so you win on the next move. Most forced wins in tic tac toe come from a fork.