Skip to the puzzle
UnlimitedQueens
EN
Friday · December 4, 2026Today: No. 703 · 9×9 · medium

Learn

The eight queens puzzle

Can you put eight queens on a chessboard so that no queen can capture another? The chessboard on this page lets you try. It's one of the oldest puzzles in recreational mathematics, and despite the shared name, it isn't the same puzzle as the colour-region Queens game.

Tap a square to place or remove a queen. Queens attack along rows, columns and diagonals.

0 of 8 queens placed

The rules

In chess, a queen moves any distance along its row, its column or either diagonal. The eight queens puzzle asks you to place eight queens on an empty 8x8 chessboard so that no two share a row, a column or a diagonal. There are no regions and no other pieces. Since eight queens need eight different rows and eight different columns, there is exactly one queen in each row and each column. The diagonals are what make it hard.

92 solutions, 12 different shapes

The puzzle has 92 solutions. Many of them are the same arrangement turned or mirrored: rotate a solution by a quarter turn or flip it, and you get another. Counting those as one, there are 12 essentially different solutions. Eleven of them come in families of eight; one is symmetric under a half turn and comes in a family of only four (11 × 8 + 4 = 92).

A quick way to find one by hand: start in row 1, put a queen in the first safe column, move to the next row, and whenever a row has no safe square, go back a row and move that queen along. This method, called backtracking, finds every solution if you keep going, and the puzzle is a classic example of it in computer science courses.

A little history

The puzzle was published in 1848 by the chess composer Max Bezzel, and two years later Franz Nauck published solutions and widened the question to other board sizes. Mathematicians, including Carl Friedrich Gauss, corresponded about it in the years that followed. It has stayed popular ever since, both as a pastime and as a teaching example.

The n-queens problem

Replace 8 with any number n and you get the n-queens problem: n queens on an n x n board, none attacking. A 1x1 board has a trivial solution, 2x2 and 3x3 boards have none, and every size from 4x4 upwards has at least one. The number of solutions grows very quickly with n: 4x4 has 2, 6x6 has 4, and 8x8 has its famous 92.

How it differs from the Queens game

The Queens game borrows the chessboard idea but changes two rules. First, it adds colour regions, and each region needs exactly one queen. Second, it drops the long diagonals: queens only clash diagonally when they touch. Those changes turn a puzzle with many answers into one with exactly one, which you can find by pure deduction instead of search. That's why every Queens board can have a hint system that explains each step, and the eight queens puzzle is usually solved by trial and backtracking.

If you enjoyed this one, try a few 8x8 Queens boards and see how different the same grid feels with regions. The rules page explains everything in two minutes.

Questions

How many solutions does the 8 queens puzzle have?

92 in total, or 12 if solutions that are rotations or reflections of each other are counted once.

Is the 8 queens puzzle the same as the Queens game?

No. The chess puzzle counts whole diagonals and has no regions; Queens has colour regions, only forbids touching queens, and every board has exactly one solution.

Who invented the 8 queens puzzle?

It was first published by the chess composer Max Bezzel in 1848. Franz Nauck published solutions in 1850.

For which board sizes does n-queens have a solution?

For every size except 2x2 and 3x3.