Logic puzzle

Lights Out Puzzle Game

Every tap flips a light and its four neighbors. Turn the whole grid off in as few moves as you can. Stuck? The solver shows exactly which lights to press.

0Moves
-Fewest possible
0Lights on
-Best vs minimum

Runs entirely in your browser. Nothing is uploaded to any server.

Why play Lights Out here

Always solvable

Puzzles are made by pressing random lights on a dark board, so a solution always exists.

Know your target

The solver calculates the fewest presses needed, so you can aim for a perfect solve.

Learn the trick

Show one move or the full solution to see how the maths behind the puzzle works.

How to play Lights Out

  1. Tap a lightIt toggles, along with the lights directly above, below, left and right of it.
  2. Plan your pressesThe order never matters, and pressing a light twice cancels out.
  3. Turn all lights offClear the grid, ideally in the fewest possible moves shown above.

The maths behind Lights Out

Lights Out was released as a handheld game by Tiger Electronics in 1995. Because pressing a light twice undoes it, and the order of presses does not matter, each light is either pressed once or not at all. That turns the puzzle into a system of linear equations modulo 2, one equation per light, which the solver on this page solves with Gaussian elimination.

On the classic 5x5 board, not every pattern is solvable and every solvable pattern has four different solutions. The solver tries them all and shows the shortest. A popular manual method is light chasing: press the light below every lit cell, row by row, then use a known pattern for the last row.

Order is irrelevant

Any sequence of the same presses gives the same result.

Twice is nothing

Two presses of one light cancel, so never press a light more than once.

Light chasing

Clear row by row by pressing beneath each lit light.

Lights Out FAQ

Is every puzzle solvable?

Yes. Each puzzle is created from a dark board with random presses, so it can always be undone.

What does fewest possible mean?

It is the minimum number of presses that solves this exact puzzle, calculated by the built-in solver.

Does undo count as a move?

Yes. Undo restores the board but adds one to the move counter, like pressing the same light again.

What is the light-chasing method?

Work from the top row down, pressing the light directly below each lit light. Only the bottom row will remain, which you solve with a top-row pattern and repeat.

How are best results stored?

Your best moves compared with the minimum are saved for each grid size in this browser.

Try other puzzles

More free tools from My Panda Toolbox.