Counting guides
How to estimate how many items are in a jar
Guessing the number of sweets in a jar is a classic game, and there is a method behind a good guess. Here is why a photo only shows the outside, how to estimate from the jar’s volume or from layers, a worked example and how organisers can find the real number without counting every piece.
Published

The short answer
To estimate how many items are in a jar, work out roughly how much space is inside the jar, take away the gaps between the items, and divide by the size of one item. For round sweets poured into a jar, the items fill a bit more than half of the space and the rest is air. A second way is to count how many items make one layer and multiply by the number of layers.
Either method gets you much closer than a pure guess, and using both and comparing the answers is better still. Neither gives an exact number, because the inside of the jar is hidden and items do not pack perfectly.
Counting what you can see in a photo only tells you about the items touching the glass. The rest of this guide explains why, walks through both methods with numbers and shows how to check the real count if you are the one running the game.
Why a photo only shows the outside
When you photograph a jar, you see the items pressed against the glass, mostly on the side facing you. The items in the middle, and on the far side, are hidden. A camera counter, or your own eyes, can count the visible face accurately, but that number is only a fraction of the total. If you can weigh the jar and a small counted sample, count the items by sample weight for a tighter estimate.
The visible face is still useful. It tells you how big the items are compared with the jar and how many fit across the width and up the height. Those two numbers feed straight into the layer method below. Just do not mistake the count of the visible items for the count of the whole jar.
The volume method
This method needs three numbers: the inside volume of the jar, the share of that volume the items actually fill, and the volume of one item.
- Jar volume: many jars state their capacity on the base or the label. If not, measure the inside height and diameter and use the formula for a cylinder: π × radius² × height.
- Fill share: items never fill all the space. For randomly packed spheres of the same size, the maximum is about 64 percent, and poured items usually fill a little less, around 60 percent. Flattened candies can pack slightly tighter.
- Item volume: for a round sweet, use the formula for a sphere, 4/3 × π × radius³. For other shapes, approximate with a box or cylinder.
- Estimate: jar volume × fill share ÷ item volume.
A worked example
Say the jar holds 2 litres, which is 2,000 cubic centimetres, and it is filled with round gumballs about 2 centimetres across. One gumball has a radius of 1 centimetre, so its volume is 4/3 × 3.14 × 1 × 1 × 1, or about 4.2 cubic centimetres.
If the gumballs fill about 60 percent of the jar, they take up 0.6 × 2,000 = 1,200 cubic centimetres. Dividing 1,200 by 4.2 gives about 286. So a sensible estimate is somewhere around 280 to 290. If the jar narrows at the neck or the top is not full, reduce the volume to match before you calculate.
The layer method
The layer method uses what you can see. It works best in straight-sided jars with items of similar size.
- Count how many items sit across the diameter of the jar at the bottom or the top.
- Estimate how many items make one full layer. In a round jar, a layer holds roughly the number across the diameter squared, times about 0.8, because a circle fills about 80 percent of the square around it.
- Count how many layers there are from the bottom to the top of the filled part.
- Multiply the items per layer by the number of layers.
- Compare with the volume method; if they disagree by a lot, check your measurements again.
How shape and size change the answer
Small items mean big numbers: halving the size of a sweet makes it about eight times smaller in volume, so roughly eight times as many fit. That is why a jar of small beans holds far more than the same jar of large gumballs, and why a small error in measuring the item size makes a big difference to the estimate.
Shape matters too. Long or flat items, such as wrapped sweets, pasta or coins, leave different gaps from round ones, and mixed sizes pack more tightly because small pieces fill the gaps between big ones. When the items are irregular, lean on the layer method and treat the volume method as a rough check.
How to make a better guess
A few habits help in any guessing game:
- Use both methods and take a number between them.
- Look for empty space at the top or a narrowing neck and adjust the volume.
- Check whether the jar has a thick base or walls, which make the inside smaller than the outside suggests.
- Remember that items at the edges look bigger through curved glass.
- Look at the jar from more than one side before you settle on a number, since items are rarely spread evenly.
If you run the game: finding the real number
If you are the organiser, you need the true count, and you do not have to count every piece one by one. Weigh the jar empty, fill it, and weigh it again; the difference is the weight of the items. Then weigh a sample of, say, 20 items and divide. If 20 sweets weigh 100 grams and all the sweets weigh 1,450 grams, there are about 290.
Weighing gives a close result when the items are all similar in weight. For a contest where the exact number matters, count the jar by hand as you fill it, in groups of ten, and write the number down before you seal the lid. A photo of the counted groups is a handy record if anyone asks later.
Common mistakes
These lead most guesses astray:
- Counting only the visible items and treating that as the total.
- Using the outside size of the jar instead of the inside.
- Forgetting the gaps between items and assuming they fill the whole jar.
- Measuring the item size carelessly, which has a large effect on the result.
- Ignoring the empty space at the top or the narrowing of the neck.
Where Count Objects Camera fits in
Count Objects Camera detects items in a photo, marks each one and shows a total, so it can count the items you can see on the face of a jar quickly. That is useful for the layer method, for example to count how many items sit across the jar, but it cannot see the hidden items inside, so the total for the whole jar is always your estimate, not the app’s. Like any camera counter, results depend on the light, the angle and the image quality.
For a careful count of the visible face, our free Photo Tally Grid lets you lay a grid over the photo and count cell by cell in your browser. Count Objects Camera is available on the App Store and Google Play.
Frequently asked questions
What is the best formula for candies in a jar? Jar volume × the share filled by the candies ÷ the volume of one candy. For round candies, a fill share around 0.6 is a reasonable starting point.
Can an app count everything in a jar from a photo? No. A photo only shows the items on the outside, so any count of the whole jar is an estimate.
Why are my guesses always too low? Usually because only the visible items were counted, or because the item size was overestimated.
How do organisers know the real number? By counting while filling the jar, or by weighing all the items and dividing by the weight of a small sample.
Sources and further reading
- Wikipedia: Random close pack — Explains how much of a container randomly packed spheres fill (about 64% at most) and gives a measured value for flattened candies.
