Chess move calculator

Set up any position and the chess move calculator shows the best move with an arrow on the board, who is better and by how much, and the three strongest lines. It runs the Stockfish engine in your browser.

To move
Castling, en passant, FEN and PGN

Castling rights

Best move

Mate-in-N puzzle mode

Set up the puzzle, choose N, and the engine searches only for a forced checkmate in N moves or fewer.

Engine: Stockfish.js 19 (Stockfish 19, lite single-threaded WebAssembly build), free software under the GNU GPL version 3, run unmodified; source code for this exact version. Moves and notation: chess.js 1.4.0 (BSD-2-Clause).

How to use the chess move calculator

The chess move calculator starts from the normal starting position. To analyze a game, play the moves on the board: tap a piece, then tap its square, or drag it. To enter a position from a book, an app or a real board, switch to Set up position: tap a piece in the palette and tap the squares where it stands, drag pieces around, or drag one off the board to remove it. Clear board gives you an empty board to start from. Then choose the side to move and press Find the best move.

Castling rights and the en passant square are under Castling, en passant, FEN and PGN. Only the rights that the board allows can be ticked, and only en passant squares where a pawn really could have just moved two squares are offered. You can also paste a FEN, or paste a whole game in PGN and tap any move in the list to analyze the position after it.

Reading the result

The big move is the engine's best move, also drawn as a dark arrow; the lighter arrows are the second and third choices. The number is the evaluation from White's point of view in pawns: +1.50 means White is about a pawn and a half better, −0.30 means Black is slightly better, and +M3 means White mates in 3 moves whatever Black does. The bar beside the board shows the same thing at a glance. Each line below is what both sides should play next, in standard algebraic notation. Play and continue makes the best move and analyzes the new position, so you can follow a whole line.

How the chess solver works

The engine is Stockfish 19, the open-source chess engine, compiled to WebAssembly by the stockfish.js project and run on your device in a separate background thread, so the page stays responsive. It searches millions of positions with alpha-beta search and judges them with a neural network evaluation. We use the compact single-threaded build (about 1.8 MB), which loads on a static page without special server settings and is still far stronger than any human player. It loads only when you first press the button. Legal moves and move notation come from the chess.js library. Your position never leaves your browser.

Longer thinking is more reliable: 3 seconds is enough for most positions, choose 10 seconds or a fixed depth for sharp tactics, or let it run until you press stop. Evaluations near 0 in quiet positions can change by a few tenths from one search to the next; forced mates do not.

Checking the position

The calculator refuses positions that cannot happen in a real game and says why: a missing or extra king, kings standing next to each other, a pawn on the first or eighth rank, more than 16 pieces for one side, more promoted pieces than missing pawns, a king in check when it is the other side's turn, or a king attacked by three pieces at once.

Mate-in-N puzzles

For a puzzle such as "White to play and mate in 3", set it up, open Mate-in-N puzzle mode and choose N. The engine then looks only for a forced mate in N moves or fewer and shows the full mating line. We check every line it reports by replaying it on the board: it must end in checkmate. Try Mate puzzle example: Black to play and mate in 3, starting with a queen check.

Use the calculator to study, to check your own games and to solve puzzles, not during a game you are playing against someone else.

To review a whole game move by move, with a graph and a grade for every move, use the chess analysis board. Checkers positions have their own checkers solver.

Solver tested . Found a problem? Tell us.

Questions

Which engine does this chess calculator use?

Stockfish 19 in its compact WebAssembly build (stockfish.js, single-threaded lite version), running in your browser. It is weaker than the full desktop Stockfish with a large network, but still far stronger than any human.

What does +1.2 or -M2 mean?

Scores are from White's point of view and measured in pawns: +1.2 means White is better by a little more than a pawn, a negative score favors Black. M means a forced mate: +M4 is White mates in 4, -M2 is Black mates in 2.

Why does the best move change when I let it think longer?

The engine looks deeper with more time. In quiet positions several moves are almost equal, so the order can swap between them. In sharp positions a deeper search can find a tactic the short search missed. Forced mates stay forced.

Can I paste a position from Lichess or Chess.com?

Yes. Copy the FEN of the position (both sites show it in their analysis or share menu) and paste it under Castling, en passant, FEN and PGN, or paste the whole game as PGN and tap the move you want.

Why does it say my position is impossible?

The engine can only analyze positions that could occur in a real game. The message names the problem, for example a pawn on the eighth rank, a missing king, or the side that just moved still being in check. Fix that square or switch the side to move.

Is my position sent to a server?

No. The engine is downloaded once and runs on your own device. Nothing you set up on the board is uploaded.