Bulls and Cows

Bulls and Cows is a code-breaking puzzle. The computer picks a secret number with four different digits and you try to guess it. After every guess you learn how many digits are correct and in the right place (bulls) and how many are correct but in the wrong place (cows). With careful reasoning you can crack the code in a handful of guesses. Play Bulls and Cows free online in your browser — no download or sign-up needed.

Guesses left 10Possible codes 5040
CODE BREAKER
YOUR GUESSESBULLS · COWS

The secret has 4 different digits (it may start with 0). A bull is a right digit in the right place, a cow is a right digit in the wrong place. The Hint button suggests a number that fits all clues so far.

Game Information

Category
Puzzle Games
Players
Single player
Difficulty
One level, ten guesses
Game type
Logic, Numbers, Deduction
Works on
Desktop and mobile browsers
Controls
  • Keyboard: type four digits and press Enter
  • Touch: use the on-screen number keyboard of your device
Features
  • Counter of how many codes are still possible
  • Hint that suggests a number consistent with all clues
  • Win and loss record saved in your browser

How to Play Bulls and Cows

Objective

Find the secret code within ten guesses.

Starting a game

Type any four different digits. A code may start with zero.

Rules

  • A bull is a digit that is in the secret and in the same position.
  • A cow is a digit that is in the secret but in a different position.
  • The secret never repeats a digit, and neither may your guesses.
  • You cannot repeat a guess you have already made.

Controls

  • Keyboard: type four digits and press Enter
  • Touch: use the on-screen number keyboard of your device

Winning and losing

You win by getting four bulls. After ten guesses without success the code is revealed.

Tips and Strategies

  • Use your first guesses to find out which digits are in the code, for example 0123, 4567 and 89.
  • Work out which digits are certain before arranging their positions.
  • Every new guess should be consistent with all earlier clues; the hint button does exactly this for you.
  • Watch the counter of possible codes: a good guess makes it fall quickly.
  • Write down what you know about each position.

Frequently Asked Questions

Can the code start with 0?

Yes, any of the 5,040 possible codes with four different digits can be chosen.

What does the hint do?

It fills in a number that is consistent with every clue so far. In our tests, always following it found the code within the ten guesses.

Is it the same as Mastermind?

It is a similar idea, but with digits and the bulls and cows scoring instead of coloured pegs.

More Games

Looking for something else to play? Browse more puzzle games or the full catalog.