How to play

How to play Bulls and Cows

Bulls and Cows is a classic number-logic puzzle where you crack a hidden 4-digit code using deduction. It's closely related to Mastermind, but uses digits instead of coloured pegs.

What are the rules of Bulls and Cows?

The aim is to guess a secret 4-digit number. In the classic version each digit is different, so there are no repeats. After each guess you get two kinds of feedback:

  • 🐂 Bull: a correct digit in the correct position
  • 🐄 Cow: a correct digit in the wrong position

On this site a 💩 marks a digit that isn't in the code at all. Use the clues to narrow down the possibilities until you find the code. Reach 4 bulls to win.

Example of a game

The secret code is 4271 and you guess 1234. The result is 1 bull and 2 cows, shown as 🐂🐄🐄💩.

  • The 2 is in the code and in the right position, so that's 1 bull.
  • The 1 and 4 are in the code but in the wrong places, so that's 2 cows.
  • The 3 isn't in the code at all.

Notice the clues don't say which digit is which. Working that out is the puzzle. Try it now.

How to play Bulls and Cows with pen and paper

Bulls and Cows started as a pen-and-paper game and still works beautifully that way. One player creates the secret number and the other guesses, recording the feedback in a table.

  1. Player A secretly writes a 4-digit number with no repeated digits.
  2. Player B writes a guess.
  3. Player A scores the guess: how many bulls and how many cows.
  4. Player B writes a new guess using the feedback so far.
  5. Repeat until Player B reaches 4 bulls.

A typical record:

Guess 1: 1234 → 1 bull, 2 cows
Guess 2: 1427 → 2 bulls, 2 cows
Guess 3: 4271 → 4 bulls

Great for classrooms, families and travel. Grab the printable tracking grid to keep score.

Simple strategy tips

  • Start with four different digits to learn as much as possible.
  • When you learn a digit isn't in the code, stop using it.
  • When you know a digit is in the code, move it around to find its position.
  • Read bulls and cows together: a digit can be right but in the wrong place.
  • Make every guess test a specific idea rather than a random hunch.

Good players treat it like a logic grid where every guess rules out possibilities.

Teachers and printable resources

Using Bulls and Cows in class? Classroom mode runs a live game for the whole class, with every student's progress on your board. The teachers' guide has setup ideas, strategy prompts, curriculum links and the history of the game, and the printable grid works for unplugged lessons.

Ways to play at bullsandcowsgame.com

🧠 Daily puzzle

The classic game. Everyone gets the same 4-digit code each day, so you can compare results, build a streak and share your score. Use the date arrows to play previous days.

🐂 Bull Rush

You get five clues and must deduce the day's code from them alone. One shot to get it right. Faster and more puzzle-like than the standard game.

⚔️ Play a friend

Challenge someone in real time. You each set a secret code and race to crack the other's first, in the live lobby.

🏫 Classroom mode

A teacher sets one code and the whole class plays at once, with live results on the board. Start a class.

More puzzles

We've also built a few experimental variants you can still play: Pico Fermi Bagels (the three-digit classic), Color Cows (colours instead of digits), Lockpick, Zendo mode, Unlimited and Haystack, a builder for your own single-solution puzzles.

Why Bulls and Cows is such a good puzzle

It's simple to learn and rewarding to master. It teaches deduction, elimination, pattern recognition and disciplined guessing, which is why it has survived as a pen-and-paper game, a classroom activity, a programming exercise and an online daily puzzle.