What Is Chess?
Chess is a board game for two players on an 8x8 board of 64 squares. Each side starts with 16 pieces: a king, a queen, two rooks, two bishops, two knights, and eight pawns. White moves first. You win by checkmating the enemy king, attacking it so that it has no legal way out.
On the board above you play standard chess against Stockfish, the free, open-source chess engine, running in your browser. You take the white pieces and make the first move, and a menu sets the computer to one of six levels, from Beginner to Maximum. Every move is checked against the rules, so an illegal move simply will not play.
| Players | 2 (here, you against the computer) |
|---|---|
| Board | 8 x 8, 64 squares, 32 light and 32 dark |
| Pieces | 16 each, 32 in all |
| Moves first | White |
| You win by | Checkmating the enemy king |
| Special moves | Castling, en passant, and promotion |
| Draws | Stalemate, agreement, repetition, the fifty-move rule, or too little material to mate |
How to Set Up a Chess Board
Turn the board so each player has a light square in the near right-hand corner, then fill the two rows nearest each player: rooks in the corners, knights beside them, bishops beside the knights, the queen on the square of her own colour, and the king on the last square. Eight pawns stand in the row in front. Two memory aids help: "white on right" and "queen on her own colour".
Step-by-step setup
- Turn the board. Place the board between the players so the square in each near right-hand corner is light. Remember it as "white on right".
- Line up the pawns. Put your eight pawns on the second row from you, one on every square.
- Put the rooks in the corners. Stand a rook on each corner square of the row nearest you.
- Put the knights next to the rooks. Place one knight on the inside of each rook.
- Put the bishops next to the knights. Place one bishop on the inside of each knight. One of them now stands on a light square and the other on a dark square.
- Put the queen on her own colour. The queen takes the middle square that matches her colour: the white queen on the light square d1, the black queen on the dark square d8.
- Put the king on the last square. The king fills the last empty square, next to the queen: e1 for White and e8 for Black. The two queens and the two kings now face each other across the board.
Setup mistakes to avoid
- A dark square in your right-hand corner. The board is turned a quarter, so the square names in every book and diagram stop matching yours.
- King and queen swapped. If your white queen stands on a dark square, she and the king have changed places.
- Knights and bishops swapped. The knights go next to the rooks; the bishops go next to the king and queen.
- Black moving first. White always makes the first move. A common way to decide who takes White is to hide a pawn of each colour in your fists and let the other player pick one.
On screen you can skip all of this: our board sets out all 32 pieces every time you press New Game.
How to Play Chess
White moves first, then the players take turns, one move each, until one king is checkmated, a player resigns, or the game is drawn. A move is one piece going to a new square; the only move that shifts two pieces is castling.
- Set up the board. Light square in the right-hand corner, queen on her own colour, pawns in front.
- Take turns, one move each. White moves first. You must move on your turn, even when every move hurts; passing is not allowed.
- Move each piece its own way. The king steps one square, the queen, rooks, and bishops slide along open lines, the knight jumps in an L, and pawns march forward.
- Capture by landing on an enemy piece. The captured piece leaves the board for good. You can never capture your own pieces, and only the knight jumps over others.
- Keep your king safe. Never make a move that leaves your own king under attack. When your king is in check, deal with the check on that move.
- Use the three special moves. Castling, en passant, and promotion break the normal patterns, and each has its own conditions.
- Checkmate the king. Attack the enemy king so it has no way out, and the game is yours. If the player to move has no legal move and is not in check, it is a stalemate and a draw.
The full chess rules add the tournament details: every draw rule, touch-move, notation, and a glossary of chess terms.
How the Chess Pieces Move
Each of the six chess pieces moves in its own way. The queen, rooks, and bishops slide any distance along open lines but cannot pass through other pieces, the knight jumps, and the king and pawns step. A piece captures by moving onto an enemy piece, and every piece except the pawn captures the same way it moves.
| Piece | Each side | How it moves | Points |
|---|---|---|---|
| King | 1 | One square in any direction; castles once if it has not moved | Not counted |
| Queen | 1 | Any distance along a rank, file, or diagonal | 9 |
| Rook | 2 | Any distance along a rank or file | 5 |
| Bishop | 2 | Any distance along a diagonal | 3 |
| Knight | 2 | An L: two squares one way, one at a right angle; jumps | 3 |
| Pawn | 8 | One square forward (two on its first move); captures one square diagonally forward | 1 |
The points are a guide for trades, not part of the rules: giving up a rook (5) for a knight (3) loses two points' worth of force unless you gain something else. The king has no value because it is never captured.
How the king moves
The king moves one square in any direction: forward, back, sideways, or diagonally. It may never step onto a square an enemy piece attacks, which is why the two kings can never stand side by side. Once a game, if it has not moved, the king can castle with a rook.
How the queen moves
The queen moves any number of squares in a straight line along a rank, a file, or a diagonal, as long as nothing stands in her way. She combines the rook and the bishop, so from d4 on an empty board she reaches 27 squares. At 9 points she is worth almost two rooks.
How the rook moves
The rook moves any number of squares along a rank or a file, never diagonally, and never over another piece. It reaches 14 squares from any square of an empty board. A rook gains scope once its own pawns have left its file, and it is the piece that moves with the king when you castle.
How the bishop moves
The bishop moves any number of squares diagonally and cannot jump. A diagonal never changes colour, so each bishop stays on the colour it started on for the whole game: every player has one light-squared bishop and one dark-squared bishop.
How the knight moves
The knight moves in an L: two squares in a straight line and then one square at a right angle. It is the only piece that jumps over others, which is why a knight can leave the back row before any pawn has moved, and it always lands on a square of the other colour. It moves backward as easily as forward.
How the pawn moves
A pawn moves straight forward one square, or two squares on its first move if both are empty. It captures differently from how it moves: one square diagonally forward. A pawn never moves backward, and any piece directly in front of it, friend or enemy, blocks it completely.
Castling, En Passant, and Promotion
Three moves break the normal patterns. Castling moves two pieces at once, en passant lets a pawn take a pawn that has just rushed past it, and promotion turns a pawn into a stronger piece.
Castling
Castling moves the king two squares toward one of its rooks and puts that rook on the square the king crossed, all as one move. Castle kingside and the king goes from e1 to g1 while the rook goes from h1 to f1; castle queenside and the king goes to c1 and the rook to d1. Black castles the same way on the eighth rank. You may castle only when all four of these hold:
- Neither the king nor that rook has moved yet in the game. A rook that went out and came back has still lost the right.
- Every square between the king and the rook is empty.
- The king is not in check.
- The king does not pass through or land on a square an enemy piece attacks. The rook may, so when you castle queenside, b1 can be under attack.
On our board, click your king and then the square two to its side, g1 or c1; the rook moves across by itself. If castling is not allowed at that moment, the square is simply not offered.
En passant
En passant, French for "in passing", is the one capture where the capturing piece does not land on the captured piece's square. When a pawn moves two squares from its starting square and lands beside an enemy pawn, that enemy pawn may capture it as if it had moved only one square. The chance lasts for one move only.
Promotion
A pawn that reaches the far row, the eighth rank for White or the first for Black, must be exchanged on the same move for a queen, rook, bishop, or knight of its own colour. The choice does not depend on what has been captured, so a second queen is perfectly legal. Players almost always take a queen. Anything else is an underpromotion, used for a knight check the queen could not give or to avoid stalemating the opponent. On our board a Promote to box offers all four pieces.
Check, Checkmate, Stalemate, and Draws
A game of chess ends in one of three ways: checkmate, resignation, or a draw.
Check
A king is in check when an enemy piece attacks it. The player in check must end the attack on the very next move, in one of three ways: move the king to a safe square, capture the attacking piece, or put a piece in between. A double check, from two pieces at once, can only be answered by moving the king.
Checkmate
Checkmate is check with no way out, and it ends the game at once; the king is never actually taken. The fastest checkmate possible, the fool's mate, takes two moves: 1.f3 e5 2.g4 Qh4#. The black queen checks along the diagonal from h4 to e1 that 1.f3 opened, and nothing can block it or take it.
Stalemate
Stalemate is a draw. The player to move has no legal move but is not in check, and the game ends there, however much material the other side has. A player who is far ahead has to watch for it: take away a lone king's last free square without giving check and the win becomes a draw.
The other ways to draw
- Dead position. Neither side can checkmate by any series of legal moves: king against king, for example, or a lone king against king and bishop or king and knight. The game ends at once.
- Agreement. The players agree to a draw.
- Threefold repetition. The same position, with the same player to move, appears for the third time. The player to move can claim the draw; at the fifth time it is automatic.
- The fifty-move rule. Each side has made 50 moves with no capture and no pawn move. The player to move can claim the draw; after 75 moves each it is automatic.
Our board ends the game by itself on checkmate, stalemate, and the dead positions that come down to bare material: king against king, a lone bishop or knight against a king, and bishops that all stand on squares of one colour. It applies the fifty-move rule automatically at 50 moves each, sooner than the 75 of tournament rules. It does not stop the game for repeated positions, and it has no draw offer.
Play Chess Against the Computer
The board at the top of this page plays chess against Stockfish, which runs inside your browser, so there is nothing to install and no account to make. You play White and move first; the computer answers as Black. Pick its strength from the level menu above the board, which starts on Medium each time you open the page.
| Level | Number in the menu | Engine strength | Time per move |
|---|---|---|---|
| Beginner | 1320 | Held to 1320 | 1 second |
| Easy | 1500 | Held to 1500 | 1 second |
| Medium | 1800 | Held to 1800 | 1 second |
| Hard | 2200 | Held to 2200 | 1 second |
| Expert | 2600 | Held to 2600 | 2 seconds |
| Maximum | 3190 | Limit switched off: full strength | 3 seconds |
The numbers are Stockfish's own strength setting. Its developers fitted that scale to a rating list for chess engines, so the figures are not FIDE ratings or the ratings of any chess site, and at Maximum the limit is switched off altogether. Treat the six levels as a ladder: start at Beginner and move up once you beat a level more often than you lose to it.
Click a piece and green dots mark the squares it can reach, with a ring around any piece it can capture. The last move stays highlighted, and a king in check shows red. The move list beside the board records the game in algebraic notation, and the pieces each side has taken sit above and below the board. Flip turns the board round, Resign concedes, and an unfinished game is saved in this browser. The board is for one player against the computer: there is no two-player mode and no online play.
Chess Strategy for Beginners
Start every game with five opening principles. Together they guard against the quick losses that catch new players, such as the scholar's mate shown below.
- Take the centre. 1.e4 or 1.d4 puts a pawn on a central square and opens lines for your bishop and queen. Pieces on e4, d4, e5, and d5 can reach either side of the board quickly.
- Bring out the knights and bishops. Knights usually go to f3 and c3 (f6 and c6 for Black), and moving the d- and e-pawns lets the bishops out.
- Castle early. It takes your king off the open centre and brings a rook toward the middle in the same move.
- Keep the queen back. An early queen gets chased by pieces that develop as they attack her, and every retreat hands your opponent a move.
- Count before you capture. Check what the trade costs in points and whether the piece you take was defended.
Games between beginners often end in the scholar's mate, a four-move checkmate on f7: 1.e4 e5 2.Qh5 Nc6 3.Bc4 Nf6?? 4.Qxf7#. It works only if Black misses the threat. The f7 square is guarded by nothing but the king at the start, so after 3.Bc4 play 3...g6, which closes the diagonal and attacks the queen, and if White tries again with 4.Qf3, answer 4...Nf6. Once the attack is parried, White's early queen usually costs time.
For a first opening, the Italian Game, 1.e4 e5 2.Nf3 Nc6 3.Bc4, follows every principle above: a centre pawn, a knight that attacks e5, and a bishop aimed at f7, with castling ready on the next move. With 1.d4, the Queen's Gambit, 1.d4 d5 2.c4, is one of the oldest openings still in common play.
The chess strategy guide for beginners covers more first openings, forks and pins, and the basic endgames.
Where Chess Came From
Chess grew out of chaturanga, played in India by the 6th century, whose four army divisions of infantry, cavalry, elephants, and chariots became the pawn, knight, bishop, and rook. The game passed to Persia as chatrang, to the Arab world as shatranj, and into Europe through Spain and Italy. Its queen and bishop were short-range pieces until players in Valencia gave them their modern sweeping moves; a Catalan poem of 1475 is the first record of the new queen.
Wilhelm Steinitz became the first official world champion in 1886, and FIDE, the world chess federation, was founded in Paris in 1924. In 1997 IBM's Deep Blue beat Garry Kasparov, the first reigning world champion to lose a match to a computer under tournament conditions.
The history of chess follows the game from chaturanga to the engines of today.
Chess FAQ
What are the basic rules of chess?
Each player starts with 16 pieces on an 8x8 board, and White moves first. Each type of piece moves in its own pattern, and you capture by landing on an enemy piece. You may never leave your own king in check. You win by checkmate; stalemate, agreement, repetition, and the fifty-move rule give draws.
Does the king go on the right or left?
It depends on your side. White's king starts on e1, to the right of the queen from White's seat. Black's king starts on e8, to the left of the queen from Black's seat. The kings face each other on the e-file and the queens on the d-file, each queen on her own colour.
How many squares are on a chess board?
A chess board has 64 squares in an 8 by 8 grid, 32 light and 32 dark. The rows are called ranks, numbered 1 to 8 from White's side, and the columns are files, lettered a to h. Every square has a name, such as e4, and each player has a light square in the right-hand corner.
How many pieces are in chess?
A chess set has 32 pieces, 16 for each player. Each side gets one king, one queen, two rooks, two bishops, two knights, and eight pawns. Promotion can change the mix during a game: a pawn that reaches the far row can become a second queen while the first is still on the board.
Can a knight move backwards?
Yes. A knight moves in an L shape in any direction, backward as well as forward and sideways: two squares one way and one square at a right angle. It jumps over any pieces in between. A knight in the middle of an empty board has eight squares to choose from; in a corner it has two.
Can a knight move 1 then 2?
Yes. One square then two, or two squares then one, reaches the same squares, because the knight does not travel through the squares in between. The rule simply sends it to the nearest squares that are not on its own rank, file, or diagonal. Either way it always lands on a square of the other colour.
Does the king always move 2 squares when castling?
Yes. In standard chess the king always moves exactly two squares toward the rook, whether you castle kingside or queenside. Only the rook covers a different distance: two squares when castling kingside (h1 to f1) and three when castling queenside (a1 to d1). It always lands on the square the king crossed.
What are the four rules of castling in chess?
Neither the king nor the rook involved may have moved yet in the game. No pieces may stand between them. The king may not be in check. And the king may not pass through or land on a square an enemy piece attacks. The rook itself may be attacked, or cross an attacked square.
What is en passant in chess?
En passant is a pawn capture. When a pawn moves two squares from its starting square and lands right beside an enemy pawn, that enemy pawn may capture it as if it had moved only one square, landing on the square it skipped. The capture must be made on the very next move or the chance is gone.
What is a stalemate in chess?
Stalemate is a position where the player to move has no legal move but is not in check. The game ends at once as a draw, however much material either side has. A player far ahead can stalemate the opponent by mistake, usually by taking away the last free square of a lone king.
What is not allowed in chess?
You may not leave or put your own king in check, skip your turn, move a piece through other pieces (only the knight jumps), capture your own pieces, castle out of or through check, or move a pawn backward. Under tournament rules, a piece you touch on purpose must be moved if it can move.
How do you win chess in 4 moves?
The four-move win is the scholar's mate: 1.e4 e5 2.Qh5 Nc6 3.Bc4 Nf6?? 4.Qxf7#, where queen and bishop mate on f7. It only works if Black misses the threat. Black stops it with 3...g6, which blocks the queen and attacks her, and meets 4.Qf3 with 4...Nf6. Parried, the early queen usually costs White time.
Can you play chess against the computer for free?
Yes. The board on this page plays against Stockfish, a free, open-source chess engine, at six levels from Beginner (1320) to Maximum. It runs in your browser with nothing to download and no account to make. You play White and move first, and an unfinished game is saved in this browser.
To see how the two classic board games differ, read chess vs checkers.
Play Chess Free
Scroll back up to play now, free in your browser. Pick a level, and the first move is yours.
For another two-player board game, try Checkers, Backgammon, or Reversi, or browse every board and dice game we host.