Zebra Puzzle: play Einstein's riddle as a logic grid

A row of houses, a list of clues and one answer. Work out who lives where, what they drink and which pet is theirs.

Loading puzzle…

What is the zebra puzzle?

The zebra puzzle is a logic puzzle about a row of houses. Each house has a different colour, and the person living in it has a different nationality, pet, drink and so on. You get a list of clues, such as “the Canadian lives in the red house” or “the coffee drinker is next to the dog owner”, and from those clues alone you work out the whole row.

It is also known as Einstein’s riddle, Einstein’s puzzle and the logic grid puzzle. The best-known version has five houses and fifteen clues, and it closes with the question that gave the puzzle its name: who owns the zebra?

How to play the zebra puzzle online

The logic grid is where you work. It has one block per category. In each block, the values run down the left side and the houses run across the top, numbered from 1 on the left.

  • Tap a square once to put a cross in it. A cross means “this value is not in this house”.
  • Tap it again to tick it. A tick means “this value is in this house”, and the rest of that row and column fill with crosses for you.
  • Tap a tick to clear the square.
  • On a computer, hold the mouse button and drag across empty squares to cross out a whole run at once. The arrow keys move between squares, X crosses one out, and Backspace clears it.

The house row at the top shows everything you have ticked so far, so you can see the row of houses take shape. Once you tick a house’s colour, its roof turns that colour.

Tap a clue to strike it out once you have used it. On a phone, the Grid and Clues tabs switch between the two, and if the blocks would be too small to tap, you get one block at a time with a picker above it.

Crosses are your own notes and are never checked. Ticks are: a tick that does not match the solution shakes and counts as a mistake. Hint marks one square that follows from what you already know and flashes the clue behind it. Undo steps back, and Clear removes every cross that your ticks do not explain, which is handy after a guess that went wrong.

Easy, medium and hard

Easy puzzles have three houses and three categories, with a handful of clues. They are a good way to learn how the grid works. Medium puzzles have four houses and four categories, and the daily puzzle is always this size. Both can be solved one clue at a time.

Hard puzzles are the full five houses and five categories, the same size as the classic riddle. Somewhere in every hard puzzle you will reach a point where no single clue gives you a new square. That is when you pick a square with two possibilities, assume one, and follow the clues until something breaks. If it breaks, the other possibility is the answer.

Every puzzle is made fresh: a generator builds a random row, adds true clues until only one answer fits, then removes every clue that is not needed. So if you get stuck, there is always a clue you have not fully used yet.

A worked start

Say the clues include “house 1 is yellow”, “the Italian lives in the yellow house” and “the tea drinker is next to the Italian”.

  1. Tick yellow under house 1. The other houses in the yellow row get crosses, and so do the other colours in the house 1 column.
  2. The Italian shares a house with yellow, so tick Italian under house 1 too.
  3. House 1 has only one neighbour, house 2, so the tea drinker must live there. Tick tea under house 2.

Three clues have given you three ticks and a dozen crosses. Most puzzles open up like this once you find the first clue that names a house.

Where the riddle comes from

The classic zebra puzzle was printed in Life International on 17 December 1962, and the answer followed in a later issue. Since then the puzzle has been credited to Albert Einstein, and sometimes to Lewis Carroll, often with the claim that only 2% of people can solve it. Neither the attribution nor the number has a known source. Carroll died in 1898, and the 1962 version names Kools, a cigarette brand launched in the 1930s. Einstein died in 1955, seven years before the magazine printed it.

More logic puzzles

If you enjoy reasoning from clues, try Code Breaker, where each guess gives you feedback to narrow down a hidden code. Futoshiki and Skyscrapers are grid puzzles with one answer and no guessing. Queens and Nonogram reward the same habit of crossing out what cannot be true, and Cryptogram turns deduction into a word game.

How to play Zebra Puzzle

  1. There is a row of houses, numbered from 1 on the left. Each house has one value from every category: one colour, one pet, one drink and so on.
  2. No two houses share a value. If the teacher lives in house 2, nobody else in the row is the teacher.
  3. Read the clues and mark the logic grid. Each block of the grid is one category, with its values down the side and the houses across the top.
  4. Tap a square once to cross it out (that value is not in that house), and again to tick it (that value is in that house). Ticking a square crosses out the rest of its row and column in that block.
  5. "Next to" means the house directly beside it, on either side. "Directly to the left" means the next house towards house 1. "Somewhere to the left" can be any house further left.
  6. Every puzzle has exactly one solution. A wrong tick shakes and counts as a mistake. Crosses are your own notes and are never checked.

Zebra Puzzle tips

Let the grid do the remembering

Don't try to hold the whole puzzle in your head. Every time a clue rules something out, put a cross in the grid. The grid is how people solve the big five-house riddles without losing track halfway through.

Cross out generously

Most clues tell you what is impossible, not what is true, so you will place far more crosses than ticks. When a row has only one empty square left, that square is the answer, and a tick there often sets off a chain of new crosses.

Chain the "next to" clues

One "next to" clue on its own rarely helps. Two of them that share a value can pin a group of three houses together. If the cat is next to the milk drinker, and the milk drinker is directly left of the green house, try each place the group could fit and cross out the ones where it runs off the end of the row.

Use the end-house trick

A house at the end of the row has only one neighbour. If a value must sit next to two different things, it cannot be in house 1 or the last house. That small fact settles a surprising number of hard puzzles.

Frequently asked questions

Did Einstein really write the zebra puzzle?

There is no evidence that he did. The puzzle is often credited to Albert Einstein, and sometimes to Lewis Carroll, but no source from either man has ever turned up. The classic version appeared in Life International magazine on 17 December 1962, and the solution and a list of solvers followed in a 1963 issue.

What percentage of people can solve Einstein's riddle?

You will often read that only 2% of people can solve it. That figure has no known source; it travels with the puzzle the same way the Einstein story does. The riddle takes patience more than genius. With a logic grid, most people who keep going will get there.

Why is it called the zebra puzzle?

The 1962 version ended with two questions: who drinks water, and who owns the zebra? Neither the water nor the zebra is mentioned in the clues, so you can only find them by placing everything else first.

How do you solve a zebra puzzle?

Start with clues that name a house directly, such as "the baker lives in house 1", and tick those squares. Then work through the clues that link two values to the same house, then the position clues. Each tick crosses out a row and a column, which turns other clues into new ticks. On hard puzzles, when nothing follows directly, pick a square with two options, assume one, and see whether the clues clash.

Is there a daily zebra puzzle?

Yes. Choose Daily on the start card and everyone gets the same four-house puzzle for the day. A new one appears at midnight UTC.

Does the game save my progress?

Yes. Your marks, struck-out clues, time and mistakes are kept in your browser, so you can close the page and finish the puzzle later.