PGN

Paste the PGN of a game and Stockfish analyses it right here, in your browser. Nothing is sent anywhere.

How to analyse a chess game from its PGN

Copy the PGN of the game from the site you played on, paste it in the box and click analyse. The engine evaluates the position after every move and, at the end, the page shows:

  • the accuracy of each player, as a percentage;
  • the evaluation graph, with who was better at each moment;
  • the moves marked as an inaccuracy (?!), a mistake (?) or a blunder (??), each with the move the engine preferred.

Click a move in the list, or the graph, to see the position. On marked moves the board shows two arrows: the orange one is the move played and the green one is the engine’s. The next error button jumps from one marked move to the next.

Inaccuracy, mistake and blunder

The engine’s evaluation is turned into a chance of winning, from 0 to 100%. A move is marked by how much it lowers that chance for the player who made it:

Mark Drop in the chance of winning
Inaccuracy ?! 5 percentage points or more
Mistake ? 10 points or more
Blunder ?? 15 points or more

That is why losing a pawn in a balanced position weighs more than losing the same pawn when the game is already decided, where the chance of winning barely moves.

What accuracy is

It is a grade from 0 to 100 for all the moves of one player. 100 means no move made the position worse in the engine’s eyes. Each move is graded by the chance of winning it cost, and the grade of the game combines those, giving more weight to the moments when the evaluation was swinging. The maths is the one published by Lichess.

The engine

The analysis is done by Stockfish 19, in the lite build of Stockfish.js, which runs as WebAssembly inside the browser. Both are free software under the GPL-3 licence, and the source code of this build is in the project’s repository.

Questions

Is the percentage the same as on chess.com?
No. Chess.com does not publish the maths it uses. Here accuracy follows the formula Lichess publishes, so the number means the same kind of thing without being identical. It also shifts a little with the engine and the depth of the analysis.
Is the game sent to a server?
No. Stockfish runs inside your browser, and the page is not allowed to open connections.
How long does the analysis take?
From a few seconds to about a minute, depending on the length of the game and on the device. You can step through the moves while it runs.
Which engine does the analysis?
Stockfish 19, in the lite build of the Stockfish.js project, at depth 16. It is free software, under the GPL-3 licence.

Made by Ronaldo Sena, a developer in Uberlândia, Brazil, who also writes about code and chess on the blog.