Chickens and Rabbits Problem Calculator (Head & Legs Word Problem)
Free calculator for the classic "chickens and rabbits" word problem. Enter the total number of heads and legs and instantly find how many of each animal there are, with the area-diagram method visualized.
What is the chickens and rabbits problem?
The "chickens and rabbits problem" is a classic word problem: given the total number of heads and the total number of legs of two kinds of animals (chickens with 2 legs, rabbits with 4 legs), find how many of each there are. It can be solved algebraically with a system of two equations, but it is famous as a puzzle that can also be solved visually with an "area diagram" — no algebra required.
This tool supports not only chickens and rabbits, but also similar variants such as squids (10 legs) and octopuses (8 legs), or tricycles (3 wheels) and bicycles (2 wheels), plus a custom mode where you can set any leg counts. Enter the total head count and total leg count, and the tool shows both the answer and a visualization of the area-diagram method.
How to use this calculator
- Choose a problem type Pick "Chickens & Rabbits", "Squids & Octopuses", or "Tricycles & Bicycles" to match your problem, or choose "Custom" to set your own leg counts.
- Enter the total head count Enter the combined total number of both kinds of animals or objects, as given in the problem.
- Enter the total leg count Enter the combined total number of legs (or wheels), as given in the problem.
- Check the result and the area diagram The count of each kind, along with a visualization of the area-diagram method, is shown automatically.
Tips for getting more out of it
- When drawing the area diagram by hand, start with a rectangle assuming every animal has the smaller number of legs (chickens), then stack a second rectangle on top representing the difference from the actual total — this makes the logic easier to follow.
- You can also solve it algebraically: let x be the number of chickens and y the number of rabbits, then solve "x + y = total heads" and "2x + 4y = total legs" using substitution or elimination.
- In the squid-and-octopus variant, squids (10 legs) have more legs than octopuses (8 legs), so the "difference" rectangle points in the opposite direction compared to the chickens-and-rabbits case.
- If the answer comes out as a decimal or a negative number, the head count and leg count you entered are probably inconsistent — double-check the numbers from the original problem.
When this calculator is useful
Checking classic math puzzle homework
The chickens and rabbits problem is a staple of elementary math education and puzzle books. Use this to check your homework answers.
Verifying your own area-diagram solution
After solving a problem by drawing your own area diagram, use this tool to confirm your answer and reasoning are correct.
Solving similar variants
The same solving pattern applies to variants like "squids and octopuses" or "tricycles and bicycles" — this tool covers those too.
Making practice problems for tutoring
Change the total head count and leg count to instantly generate practice problems of varying difficulty.
Glossary
- Chickens and rabbits problem
- A classic word problem that asks how many of two kinds of animals there are, given only the combined total number of heads and legs.
- Area diagram
- A visual method that represents the total legs, assuming every animal were one kind, as the area of a rectangle, then represents the difference from the actual total as a second rectangle — letting you solve the problem without algebra.
- System of equations
- A set of two or more equations with multiple unknowns solved together. The chickens and rabbits problem can also be solved algebraically once you know how to set up and solve a system of two linear equations.
Frequently Asked Questions
Side Note — The chickens and rabbits problem has roots in an ancient Chinese text
The chickens and rabbits problem is far older than most people realize. The Chinese mathematical classic "Sunzi Suanjing" (roughly 5th century CE) contains a problem with the exact same structure, traditionally phrased with pheasants and rabbits sharing a cage: given the total number of heads and legs, find how many pheasants (2 legs) and rabbits (4 legs) there are. In China today, it is still taught in elementary schools as the "chickens and rabbits in the same cage" problem.
In Japan, the same puzzle became known through the tradition of wasan (native Japanese mathematics) as the "crane and turtle calculation," named after two animals considered symbols of longevity and good fortune — a cultural adaptation of the same underlying structure found in the Chinese original.
The same puzzle appears across many languages and cultures: it is called "chickens and rabbits" in English, "poules et lapins" (hens and rabbits) in French, and "Hühner und Kaninchen" in German. The animals change with the culture, but the mathematical structure — deducing two unknown counts from a total count and a total quantity — is remarkably universal.
Once you learn systems of linear equations in algebra, the chickens and rabbits problem reduces to solving "x + y = total heads" and "2x + 4y = total legs." But the elementary-school method of solving it visually with an area diagram, without any algebra, builds an important foundation for mathematical reasoning by grounding an abstract relationship in a concrete geometric shape.