Four in a Row Solver

Our free Connect 4 solver (a 4 in a row solver) works out the best move in any Four in a Row position. Click the columns to recreate your game, and the solver scores every possible move.

How the scores work

  • Win: this move wins with perfect play. The number shows how many moves it takes. Fewer is faster.
  • Draw: this move leads to a draw with perfect play.
  • Lose: this move loses if your opponent plays perfectly. The number shows how long you can hold out.
  • The best move is highlighted. You can undo, redo, flip the board and hide the scores to test yourself.

What a Connect 4 solver does

A solver is a program that has worked out the game completely. Give it any position and it tells you the result if both players make perfect moves from there. Because Four in a Row is a solved game, a good solver is never wrong. It's the best teacher there is: it shows you not just that a move was bad, but which move was better.

Everything in this section

What the solver already tells us

Perfect-play result of each first move: the middle column wins, next to it draws, anywhere else loses
  • With perfect play, the first player wins by starting in the middle column. See Best Opening Moves.
  • Starting next to the middle leads to a draw; starting anywhere else loses.
  • Late in the game, threats on the right rows decide the result. See Odd and Even Threats.

Fair play: the solver is for learning. Using it during online games against other players isn't allowed.

FAQ

Is the solver free?

Yes. It's free to use, with no sign-up, like everything else on the site.

Can I use it to beat the computer?

You can use it to learn from your games afterwards. The best way to beat the computer is to understand why moves work; see How to Beat the Computer.