To play tic-tac-toe, two players take turns marking the squares of a 3 by 3 grid, one with X and the other with O, and X goes first. The first player to get three of their marks in a row (across, down or diagonally) wins. If all nine squares fill up and nobody has three in a row, the game is a draw.
That's the whole game. This guide covers the details: playing on paper, who should go first, the eight winning lines, ties, and how Poozee's Tic-Tac-Toe plays. Every diagram was checked with the game's own rules code, and every number comes from that code: most from walking through all 255,168 possible games, the rest from seeded games between copies of our computer player. When you're ready to start winning, read how to win tic-tac-toe.
Tic-tac-toe rules at a glance
| Topic | Rule |
|---|---|
| Players | 2, called X and O after their marks |
| Board | A 3 by 3 grid of 9 squares, empty at the start |
| First move | X goes first, then the players alternate |
| A turn | Put one of your marks in any empty square. Marks never move |
| Win | Three of your marks in a line: across, down or diagonally (8 possible lines) |
| Draw | All 9 squares are full and nobody has three in a row |
| Marks per game | X places at most 5 marks and O at most 4 |
How to play tic-tac-toe on paper
All you need is a pencil, a scrap of paper and a second player.
- Draw the grid. Two lines down, crossed by two lines across, make nine squares.
- Pick sides. Decide who plays X, with a coin toss if you like. X goes first.
- Take turns. On your turn, write your mark in any empty square. You can't skip a turn, mark a square that's already taken, or move a mark.
- Look for three in a row. The moment you complete a line of three, draw a line through it. You win and the game is over.
- Call the draw. If all nine squares are full and nobody has three in a row, the game is a draw.
- Swap sides. Take turns being X from game to game, because going first is an advantage (see below).
How to play on Poozee
- Open Tic-Tac-Toe and choose vs Computer or 2 Players (two people sharing one screen).
- Against the computer, pick a level, Easy, Medium or Hard, and pick 1st to play X or 2nd to play O. Changing the opponent, the level or your side starts a new game.
- Tap or click an empty square to place your mark. The computer answers after a short pause.
- When someone completes a line, a yellow stroke crosses it out. Press Play again for the next game.
On a keyboard, the number keys are laid out like a numpad, so the key's position matches the square's:
| Left | Middle | Right | |
|---|---|---|---|
| Top row | 7 | 8 | 9 |
| Middle row | 4 | 5 | 6 |
| Bottom row | 1 | 2 | 3 |
You can also press Tab to reach the board, move with the arrow keys and press Enter.
Who goes first in tic-tac-toe?
X always goes first. So the question that matters is who gets to be X, and the rules don't settle that: agree on it, toss a coin, or let the player who lost the last game choose.
It's worth taking turns, because going first is an advantage whenever someone makes mistakes. X gets one more mark than O on a full board, and a head start in every race to three. We measured how much with the game's rules code:
- Two players who pick squares at random: X wins 58.5% of games, O wins 28.8% and 12.7% are draws. These are exact chances, worked out over every possible game rather than sampled.
- Two copies of our Easy computer: in 1,000 seeded games, X won 491, O won 272 and 237 were draws.
- Two perfect players: every game is a draw. Two copies of our Hard computer drew all 1,000 of their games, and a full search of the game tree proves that neither X nor O can force a win.
On Poozee, X starts every game. Against the computer you choose: 1st makes you X, 2nd makes you O and lets the computer open. In 2 Players mode, X starts every game too, so swap who taps first.
How to win: three in a row
You win the moment you complete a line of three of your own marks. There are 8 winning lines:
- 3 across: the top, middle and bottom rows.
- 3 down: the left, middle and right columns.
- 2 diagonals: from corner to corner through the center.
Squares aren't equal. The center is part of 4 of the eight lines, each corner is part of 3, and each edge square (the middle of a side) is part of only 2. That's one reason players like to start in a corner or the center.
How long does a game last?
A win takes at least 5 moves: X's three marks plus the two O marks in between. O's earliest win comes on the 6th move, and no game can last longer than 9. Here is how all 255,168 possible games end (every order of moves until someone wins or the board is full), counted by our search:
| Moves played | Games that end there | Result |
|---|---|---|
| 5 | 1,440 | X wins with its 3rd mark |
| 6 | 5,328 | O wins with its 3rd mark |
| 7 | 47,952 | X wins with its 4th mark |
| 8 | 72,576 | O wins with its 4th mark |
| 9 | 127,872 | 81,792 X wins, 46,080 draws |
X wins on odd moves and O on even ones, because X places the 1st, 3rd, 5th, 7th and 9th marks. Most of these games are careless ones; real players block, so their games usually run longer.
Two lines at once
One mark can complete two lines at the same time. That takes five marks (two lines of three sharing a square), so only X can do it, and only with the ninth and last move of the game. It still counts as one win. It happens in 12,672 of the 255,168 possible games.
Pro tip: Before every move, check two things: can you win right now, and can your opponent win next turn? If they can, block that square. Most beginner games are lost to a missed block.
Can tic-tac-toe end in a tie?
Yes. When all nine squares are full and nobody has three in a row, the game is a draw, also called a tie. In the US it's often called a cat's game. On Poozee the game says "It's a draw." and adds one to the Draws count.
Draws look less varied than you might expect. Only 16 full boards are draws, and once you count rotations and mirror images as the same, there are just 3 really different ones. Every tied game you ever play ends in one of these patterns, turned or flipped:
A full board isn't automatically a draw, though. X places the ninth mark, and it can complete a line:
Of the 127,872 possible games that fill all nine squares, 81,792 end with that last mark winning for X, and 46,080 are draws.
With perfect play from both sides, every game is a draw. That's why games between experienced players almost always tie, and why you win only by giving your opponent chances to go wrong. The strategy guide shows how, with forks (two threats at once) and the traps that set them up.
Computer levels, hints and the scoreboard
Poozee's three levels play very differently:
- Easy takes a win only three times in four and blocks your threat only half the time. Otherwise it picks any empty square.
- Medium always takes a win and always blocks. Otherwise it takes the center, then a corner, then an edge. It never plans ahead, so it can be beaten, but only when it plays O: we checked every game Medium can play against every possible series of replies, and as X it never loses.
- Hard has worked out every position and never loses, as X or as O. We checked that against every possible series of replies too, so the best you can get is a draw. When Hard played X against Medium, it won 303 of 1,000 seeded games and drew the rest; with Medium as X, all 1,000 games were draws.
Hint shows the best move for whoever's turn it is, with a short reason, such as a win, a block or a fork. Undo takes back your last move, and against the computer it also takes back the computer's reply, so you're back on your own turn. A game that has already been counted stays counted.
The scoreboard keeps a separate record for each level: your wins, the computer's wins and draws, plus your unbeaten run, the number of games in a row you haven't lost (draws keep it going), and your best run. In 2 Players mode it counts X's wins, O's wins, draws and games played. Reset clears the record for the current level or mode, and your game in progress is saved in this browser.
Tic-tac-toe terms and variants
A few words you'll hear around the game:
| Term | Meaning |
|---|---|
| Line, or three in a row | Three of the same mark across, down or diagonally |
| Threat | Two of your marks in a line with the third square still empty |
| Block | Taking the empty square of your opponent's threat |
| Fork | A move that makes two threats at once. Only one can be blocked |
| Draw, tie or cat's game | A full board with no line |
| Noughts and crosses | The British name for the same game |
People also play the same grid with different rules. We solved both of these variants with the same kind of full search, to see what perfect play gives:
| Variant | What changes | With perfect play |
|---|---|---|
| Reverse (misère) tic-tac-toe | Making three in a row of your own marks loses | Still a draw |
| Either-mark tic-tac-toe | Each turn, place an X or an O. Whoever completes a line of three matching marks wins | The first player can force a win |
Reverse tic-tac-toe is trickier than it looks: only one first move, the center, avoids a forced loss. Reverse tic-tac-toe strategy shows the mirror plan that never loses.
Poozee plays the standard rules: you always place your own mark, and three in a row wins. If you want a bigger board, Four in a Row asks for four in a line on a 7 by 6 grid where the pieces drop to the bottom; how to play Connect Four explains its rules.
Keep playing
- Play Tic-Tac-Toe against the computer or a friend
- How to win tic-tac-toe: the best first move, forks and the opposite-corner trap
- Play Four in a Row, tic-tac-toe's bigger cousin
- How to play dots and boxes, another game you can play on paper
Frequently asked questions
How many ways can you win in tic-tac-toe?
Eight. Three of your marks in a line win, and a 3 by 3 board has eight lines: three rows across, three columns down and two diagonals.
Who goes first in tic-tac-toe?
X goes first, so the real question is who plays X. Toss a coin for the first game and then take turns being X, because going first helps: when both players pick squares at random, X wins 58.5% of games and O only 28.8%.
Can tic-tac-toe end in a tie?
Yes. If all nine squares fill up and nobody has three in a row, the game is a tie, often called a draw or a cat's game. With perfect play from both sides, every game ends that way.
What is the fastest way to win tic-tac-toe?
Five moves: X's third mark completes a line before O has blocked it. O's earliest possible win is on the sixth move, with O's own third mark.
How do you play tic-tac-toe on paper?
Draw two lines down and two lines across to make nine squares. One player writes X and the other O, taking turns with one mark per turn, and the first to get three in a row draws a line through it and wins.