Water Jug Puzzle Online

Use two unmarked jugs to measure an exact amount of water.

Jug A
0 / 5 L
Jug B
0 / 3 L

How to play the water jug puzzle online

Start with two empty jugs. In the first challenge, A holds five liters and B holds three. Your goal is to leave exactly four liters in either jug. The left number on each jug shows the water inside. The right number shows its capacity.

Choose Fill A or Fill B to fill that jug to its rim. Empty drains a jug completely. Pour A into B transfers as much as will fit. For example, pouring a full five-liter jug into an empty three-liter jug leaves two liters in A and three in B. Each action that changes the water counts as one move.

A hint for measuring four liters

Try to put two liters in the smaller jug. That leaves exactly one liter of free space in it. When you refill the large jug and pour into that last space, check how much remains in A.

If a pour button is unavailable, check whether the source is empty or the receiving jug is already full. If you emptied the wrong jug, choose Undo to recover the previous amounts and move count.

Try the other challenges

Use the selector above the board to measure two liters with seven- and five-liter jugs. Then try measuring six liters with nine- and four-liter jugs. Changing challenges starts both jugs empty. To replay the same goal and compare your move count, choose Restart.

For another puzzle about planning a sequence of moves, try Tower of Hanoi.

Frequently asked questions

How do I play the water jug puzzle online?

Pick a target and fill, empty or pour between the jugs. Win by holding the exact target in one jug.

When does a pour stop?

A pour stops as soon as the receiving jug is full or the source jug is empty. Any water left over stays in the source jug.

Can I take back a move?

Use Undo to return to the previous amounts and move count. Restart empties both jugs for the current challenge.

Comments