How the Pieces Move

In chess, each piece has rules about how it can move around the board. On this page, I explain the rules about how each piece is allowed to move. This page uses algebraic notation.

Capturing

All pieces on the board, except the king, can be captured, or in other words, removed from play. In most cases, capturing occurs when a piece moves to the same square as a piece of the opposite color. For example, if a black piece moves to the same square as a white piece, the white piece is removed from the board and the black piece remains on the square that the white piece was on. There are some situations where capturing occurs differently or is not permitted. These will be explained in the sections below.

Rook

The rook can move horizontally and vertically, but not diagonally, as shown below. The rook in the board below can move to any of the squares marked with black dots.

abcdefgh
 8
 7
 6
 5
 4
 3
 2
 1
abcdefgh

Rooks are not allowed to jump over pieces. The rook in the diagram below can't move to f5 or beyond because a piece of the same color is there. However, it can move to d2 to capture the enemy bishop, removing it from the board.

abcdefgh
 8
 7
 6
 5
 4
 3
 2
 1
abcdefgh

Bishop

The bishop can only move diagonally, as shown below. The bishop in the board below can move to any of the squares marked with black dots.

abcdefgh
 8
 7
 6
 5
 4
 3
 2
 1
abcdefgh

Bishops are not allowed to jump over pieces. The bishop in the diagram below can't move to d3 or beyond because a piece of the same color is there, but it can move to c7 to capture the enemy rook, removing it from the board.

abcdefgh
 8
 7
 6
 5
 4
 3
 2
 1
abcdefgh

Queen

The queen can move horizontally, vertically, and diagonally. The queen in the board below can move to any of the squares marked with black dots.

abcdefgh
 8
 7
 6
 5
 4
 3
 2
 1
abcdefgh

Queens are not allowed to jump over pieces. The queen in the diagram below can't move to b5 or beyond because a piece of the same color is there, but it can move to g7 to capture the enemy knight, removing it from the board.

abcdefgh
 8
 7
 6
 5
 4
 3
 2
 1
abcdefgh

Knight

The knight move is often described as L-shaped. In a single move, it can go to a square that is two squares horizontally and one square vertically away, or two squares vertically and one square horizontally away. The knight in the board below can move to any of the squares marked with black dots.

abcdefgh
 8
 7
 6
 5
 4
 3
 2
 1
abcdefgh

Unlike most pieces, the knight is allowed to jump over other pieces, although it is not allowed to jump into a square occupied by a piece of the same color. In the board below, the knight can move to any of the squares marked by black dots even though it is completely surrounded.

The white knight in the diagram can't move to f6 because a piece of the same color is there, but it can move to f2 to capture the enemy bishop, removing it from the board.

abcdefgh
 8
 7
 6
 5
 4
 3
 2
 1
abcdefgh

Pawns

The list below outlines the rules of pawn movement. These rules are explained in further detail after the list.

  1. Pawns must only move toward the enemy's side of the board. They must never go backward.
  2. A pawn that has not yet moved can be moved either two squares forward or one square forward.
  3. After a pawn has been moved for the first time, it can only go one square forward on each move.
  4. Pawns cannot capture a piece that is directly in front of it.
  5. Pawns can only capture pieces that are one square diagonally in front of it. This is the only way that a pawn can move from its starting file (column).
  6. If a pawn moves two squares forward on its first move and ends up next to an enemy pawn, the enemy pawn is allowed to capture that pawn as if it had only moved one square forward. This is called an "en passant" capture. The enemy pawn may only do an en passant capture immediately after the opposing pawn moved two squares forward.
  7. A pawn that reaches the enemy's back rank must be promoted to a queen, rook, bishop, or knight.

Basic Pawn Movement

This section covers the first three items in the list: pawns must always move toward the enemy side of the board; pawns that have not yet moved can go either two squares forward or one square forward; pawns that have been moved can only go one square forward.

The diagram below illustrates the legal moves of the pawns:

  • The black pawn at a7 may move either to a6 or a5. It is not allowed to go to a8 because pawns must always move toward the enemy's side of the board.
  • The white pawn on c2 may move either to c3 or c4. It is not allowed to go to c1 because pawns must always move toward the enemy's side of the board.
  • The black pawn on e6 is no longer on it starting rank of 7, so it can only go one square forward, to e5. It is not allowed to go to e7 because pawns must always move toward the enemy's side of the board.
  • The white pawn on h4 is no longer on its starting rank of 2, so it can only go one square forward, to h4. It is not allowed to go to h3 because pawns must always move toward the enemy's side of the board.
abcdefgh
 8
 7
 6
 5
 4
 3
 2
 1
abcdefgh

Pawn Capturing

This section covers rules 4 and 5 in the above list: a pawn cannot capture a piece that is directly in front of it, and pawns can only capture pieces that are one square diagonally in front of it.

In the diagram below, the white pawn can capture the black rook or the black queen, but not the black knight. In addition, the black pawn cannot move at all because there are no pieces that it can capture, and it is not permitted to capture the white bishop in front of it.

abcdefgh
 8
 7
 6
 5
 4
 3
 2
 1
abcdefgh

En Passant

This section is about the en passant capturing rule. If a pawn moves two squares forward on its first move and ends up next to an enemy pawn, the enemy pawn is allowed to capture that pawn as if it had moved only one square forward. The enemy pawn may only do an en passant capture immediately after the opposing pawn moved two squares forward.

In the diagram below, the black pawn on c5 just moved two squares forward on its first move. The white pawn on b5 can now move to c6 to capture the black pawn on c5.

Additionally, the white pawn on g4 has just moved two squares forward. Both of the black pawns next to it (on f4 and h4) have the option to move to g3 to capture the white pawn on g4.

HOWEVER, if a white pawn reaches rank 4 after TWO moves (i.e. it did NOT move two squares forward on its first move), a black pawn next to it on rank 4 CANNOT capture it by going to the square behind it. Similarly, if a black pawn reaches rank 5 after two moves, a white pawn next to it on rank 5 cannot capture it by going to the square behind it.

In other words, if the black pawn on c5 has been moved two times, the white pawn on b5 could not capture it. Similarly, if the white pawn on g4 had been moved two times, the black pawns on f4 and h4 could not capture it.

abcdefgh
 8
 7
 6
 5
 4
 3
 2
 1
abcdefgh

Pawn Promotion

A white pawn that has reached rank 8 must be promoted to either a white queen, white rook, white bishop, or white knight. Similarly, a black pawn that has reached rank 1 must be promoted to either a black queen, black rook, black bishop, or black knight.

Pawns are most commonly promoted to queens because they are the most powerful pieces. In fact, promoting a pawn to anything other than a queen is sometimes referred to as "underpromotion". However, there are situations where underpromotion is better. Promoting to a knight allows you to attack squares that a queen in the same position would not be able to.

For example, in the diagram below, the white pawn could be moved to c8 and promoted to a knight, allowing it to put the king in check while simultaneously attacking the queen.

abcdefgh
 8
 7
 6
 5
 4
 3
 2
 1
abcdefgh

The pawn can be promoted to any of these, even if there already is one on the board. This means that there could be more than one queen on the board, or more than two knights, bishops, or rooks.

Pawns are the only pieces that can be promoted.

King

The king can move one square in any direction, as shown below. The king can in the board below can move to any of the squares marked with black dots.

abcdefgh
 8
 7
 6
 5
 4
 3
 2
 1
abcdefgh

The king is not allowed to move into a square that is occupied by a piece of the same color. In the board below, the black king can move to the squares marked with black dots, but it CAN'T move to the squares with the black rook or the black queen. However, the king can move to b5 to capture the white pawn, removing it from play.

abcdefgh
 8
 7
 6
 5
 4
 3
 2
 1
abcdefgh

Check

If the king is in a square that is under attack by an enemy piece, it is "in check". If a player's king is in check, the player is required to move their king out of check on the current move.

In the diagram below, the black king is in check. The white bishop is attacking it. The king can move to any open square to get out of check. The king could even capture the white bishop to remove the threat.

abcdefgh
 8
 7
 6
 5
 4
 3
 2
 1
abcdefgh

The player is not allowed to put their king in check. This means that they cannot move their king into a square that is under attack, or in other words, a square that an enemy piece could move to on the next turn. In the diagram below, the king can't move at all because all of the squares surrounding it are under attack by enemy pieces. (The white queen attacks f3 as well as d3, d4, and d5). Black also cannot move their bishop, because doing so would allow the white rook to attack the black king.

abcdefgh
 8
 7
 6
 5
 4
 3
 2
 1
abcdefgh

In the diagram below, the rook at a8 is attacking the king. The king is in check. The king is required to move out of check, but the only square that it can move to is d7, because the rook on a8 is attacking c8 and e8, and the queen is attacking c7, and the rook on e1 is attacking e7.

abcdefgh
 8
 7
 6
 5
 4
 3
 2
 1
abcdefgh

Checkmate

If the king is under attack and there is no way for it to escape, this situation is called "checkmate". The objective of chess is to checkmate the enemy king, so when checkmate is achieved, the game is over. The diagram below is similar to the one above, but this time, there is a white bishop on f5, so d7 is no longer a safe square for the king to escape to. This means that the rook is attacking the king, and the king can't move, so this is checkmate. White has attacked and trapped the king and won the game.

abcdefgh
 8
 7
 6
 5
 4
 3
 2
 1
abcdefgh

Stalemate

In the diagram below, the king can't move at all because all of the squares surrounding it are under attack by enemy pieces. (The white queen attacks f3 as well as d3, d4, and d5). Furthermore, black has no other legal moves because if they were to move their black bishop, the rook on e8 would then be putting their king in check. When a player has no legal moves on their turn, this is called stalemate. When stalemate occurs, the game ends in a draw.

abcdefgh
 8
 7
 6
 5
 4
 3
 2
 1
abcdefgh

Castling

The king is allowed to perform a special move called castling, where the king moves two squares to the left or right, and the rook that the king moved toward is placed on the square that the king jumped over. A king is only allowed to do this once per game, with the following restrictions:

  • The king and the rook involved in the castling must not have moved yet during the game.
  • The squares between the king and rook involved in the castling must be empty.
  • Castling cannot be performed if the king is in check or if either of the two squares that the king will move through are under attack.

The diagram below shows the black and white king before and after castling. If the king passes over the queen's starting square when castling (as the white king does here), it is said to have castled "queenside". Otherwise, it is described as castling "kingside".

abcdefgh
 8
 7
 6
 5
 4
 3
 2
 1
abcdefgh

abcdefgh
 8
 7
 6
 5
 4
 3
 2
 1
abcdefgh

The following diagram illustrates situations where the king can't castle. Black's king can't castle at all during this game because it has moved from its starting square. Even if it moves back to where it started, the black king will no longer be allowed to castle. White's king can't castle queenside because there are pieces in the way, and it can't castle kingside because the black bishop is attacking f1, so the white king would move through check if it castled kingside, which is not permitted.

abcdefgh
 8
 7
 6
 5
 4
 3
 2
 1
abcdefgh

In addition, the king cannot castle if it is currently in check. The white king in the diagram below can't castle at all because the black rook has it in check.

abcdefgh
 8
 7
 6
 5
 4
 3
 2
 1
abcdefgh