How to Play Tic Tac Toe
Two players share a 3 × 3 grid. X marks a square, then O marks a square, and they alternate until someone has three marks in a straight line — a row, a column or a diagonal — or the nine squares are full. Three in a line wins immediately. A full grid with no line is a draw, and that is the result correct play by both players always produces.
The rules, step by step
- 1Set up the gridDraw a 3 × 3 grid of nine empty squares. One player takes X, the other takes O.
- 2X startsX always plays the first mark. After that the players alternate, and neither may skip a turn.
- 3Mark one empty squareA turn consists of writing your own mark in any one square that is still empty. Marks are never moved, erased or replaced.
- 4Make three in a rowThree of your own marks in a straight unbroken line wins at once — any of the three rows, the three columns, or the two diagonals.
- 5The game stops at the winning markAs soon as a line is complete the game ends, whether or not there are empty squares left on the board.
- 6A full grid is a drawIf all nine squares are filled and no line has been made, the game is drawn. Neither player scores, and correct play always leads here.
Try it — the rules above, running
New game clears the board and lets whoever plays X start. Take back lifts your last mark and the computer’s reply together, and Hint names the strongest square and says why it is strongest. The three-dot menu at the end of the bar holds the board size, the level, a two-player game on one device, and whether you play X or O.
Your statistics · 3 × 3 · Sharp
- Played
- 0
- Won
- 0
- Win rate
- 0%
- Streak
- 0
- Best streak
- 0
- Best time
- —
This level
It never misses a win and never leaves a threat unblocked, but it only answers the mark you just played. One mark that makes two threats at once is more than it can block.
Keyboard
- Arrows
- Move between squares
- Enter / Space
- Play a mark
- U
- Take back
- H
- Hint
- N
- New game
- F
- Full screen
How do you set up and play a game?
- 1Draw the grid and pick marksTwo lines down and two across make nine squares. One player is X, the other is O. X always goes first, which is the only advantage either player gets.
- 2Take turns, one mark eachWrite your mark in any empty square. You may not pass, you may not move a mark you have already written, and you may not use a square your opponent has taken.
- 3Watch both sets of marksBefore each turn, look for your own two-in-a-row with an empty third square, then for your opponent's. Take the win if you have one; block theirs if you do not.
- 4Stop at the lineThe moment three of one mark sit in a straight line, that player has won and the game is over, even with empty squares left.
- 5Call a full grid a drawNine marks and no line is a drawn game. Nobody scores. Between two players who know what they are doing, this is how nearly every game ends.
What is the winning strategy in tic tac toe?
There is no way to force a win against a correct opponent — the game is a proven draw. What there is, is a way to never lose, and a way to punish every mistake. Both come down to a fixed order of questions to ask on each turn.
- Can I win now? If two of your marks share a line with one empty square, take it.
- Can they win now? If the same is true for your opponent, block it.
- Can I fork? Look for a square that would give you two winning squares at once. That is the only mark that beats an alert opponent.
- Which of the rest is safe? Of the squares left, rule out every one that would leave your opponent a fork on their next turn — then, among what survives, take the centre, then a corner, then an edge, in that order of how many lines they sit on: four, three, two.
Those four questions are a complete defence: a player who follows them never loses, from either side of the board, against anything at all. The test suite behind this page proves it the only way it can be proved — by playing that exact list against every reply that exists, both as X and as O.
The last question is the one that is usually written down wrong, and the order inside it is doing real work. "Centre, then corner, then edge" on its own loses: after X takes a corner, you take the centre and X takes the opposite corner, every free corner hands X a fork, and only an edge saves the game. Checking for their fork first, and only then falling back to the centre-corner-edge order, is what turns a rule of thumb into a strategy. One shortcut: if your move makes a threat they are forced to answer, the only fork that can still hurt you is one on the very square they have to play.
How does the fork work, move by move?
- 1X takes a cornerSay the top-left square. Seven of O's eight possible replies now lose with correct play from X; only the centre saves the game.
- 2O replies on an edgeSay the top-middle square. Every reply except the centre leaves X with a forced win, and an edge is the cleanest of the seven to punish — the two corner replies need an adjustment, which the last step comes back to.
- 3X takes the centreX now holds two of the three squares on the long diagonal and the third is empty — an immediate threat that O has no choice but to block. This is the step that fails against the opposite corner: O would already be sitting on that diagonal, so there would be nothing to threaten.
- 4O blocks the diagonalForced. O has no choice, which is the point: the fork is built while your opponent is busy answering a threat they cannot ignore.
- 5X plays the forking squareAfter an edge reply that square is a free corner: it completes two different lines-in-waiting at once, O can block only one, and X plays the other next turn. Against a corner reply the same position arrives but the forking square is an edge instead — the shape is identical, the square is not.
The defence against the corner opening is simply to take the centre, and then to answer each threat with the square that does not build a second line for X. Play tic tac toe against the Sharp level to see the fork work — it blocks every single threat and still loses, because it never looks one move past the mark you just played.
What changes on the 4 × 4 and 5 × 5 boards?
Four in a row wins on both, and the shape of the game changes with the number of lines. The 4 × 4 board has only ten — four rows, four columns and the two full diagonals — so almost every square is contested and the board fills quickly. The 5 × 5 board has 28, because a run of four can start anywhere along a line rather than having to fill it, and that extra room makes double threats routine rather than rare.
One rule catches people out on the bigger boards: three in a row is worth nothing there. Only four counts, so a line of three that cannot be extended to four — because the ends are blocked or the board runs out — is dead, exactly like a line with one of each mark in it. If you liked the bigger boards, Four in a Row is the same idea with gravity, and Reversi is the other classic where one move can change the whole board.
How do you win more often?
- Take the centre when it is freeThe centre square lies on four of the eight winning lines; a corner lies on three and an edge on only two. That is not a rule of thumb, it is the geometry of the board — and it is why, after a centre opening, all four edge replies lose to correct play while the four corner replies hold the draw.
- Open in a corner against a humanA corner opening leaves your opponent exactly one saving reply out of eight — the centre. Any of the other seven hands you a forced win. The centre opening is safer but leaves four ways out, so against a real person the corner is the sharper practical try.
- Play for two threats, not oneA single three-in-a-row threat is blocked by one mark, so it wins nothing against anyone who is looking. Aim instead for a mark that completes two lines-in-waiting at once: your opponent has one turn and two holes to plug, and that is the only way any game here is ever won.
- Check the square you are about to blockAnswering an immediate threat is the easy half. Before you place the block, ask whether it hands your opponent a fork next turn — losing while dutifully blocking is the commonest way a competent player loses, and it is exactly what separates the Sharp level here from the Perfect one.
- On the bigger boards, count the open linesOn the 5 × 5 board a run of four can start anywhere, so there are 28 lines rather than 8 and a single mark can sit on eight of them. Play where your marks share the most uncontested lines, and remember that a line with one of each mark in it is worth nothing to anybody and can safely be ignored.
Common questions about tic tac toe
- Does X always win at tic tac toe?
- No. X has the first move and wins more of the possible games than O does, but against correct play X cannot force anything better than a draw from any of the nine openings.
- What is the best square to start on?
- Against a careless opponent, a corner: it leaves only one reply — the centre — that still draws, so seven of the eight replies lose. Against a correct opponent every opening draws, so it makes no difference at all.
- How many moves does a game of tic tac toe last?
- At most nine, because a mark is never moved or removed and nobody may pass. Games often end sooner: the game stops at the winning mark, so a win on the fifth mark leaves four squares empty.
- Can a game of tic tac toe end with nobody winning?
- Yes, and it usually does. A full grid with no line of three is a draw, and 46,080 of the 255,168 possible games end that way — including every game in which both players play correctly.
Ready to stop reading? Play tic tac toe on the full board, with controls and statistics tailored to that game.