Candy in a Jar Calculator

Win the guessing game — or set one up — by estimating how many candies fit in a jar from its size and the size of one piece.

The Problem It Solves

"Guess how many candies are in the jar" turns up at baby showers, school fundraisers, office parties and county fairs, and most people guess by gut feel — usually far too low or far too high. You can do much better with a little geometry: the count is the jar's volume, times the share of that volume the candy actually occupies, divided by the volume of one piece. The middle number is the key that most guesses miss. Even perfectly packed candy leaves gaps, and how much depends on the shape.

What You Need Before You Start

The Logic Behind the Count

Jar volume is π × radius² × height for a round jar, or length × width × height for a square one, multiplied by how full it is. Each candy is treated as its nearest simple solid: round balls and ovals as spheres or ellipsoids (π/6 × length × width × thickness), boxes as length × width × height. Then comes packing density: randomly poured spheres fill about 64% of a container, a long-established result for random close packing. A 2004 study in Science by Donev and colleagues found that M&M’s pack more densely, around 68%, because their flattened shape lets them nestle together; the calculator uses 0.68 for lentil and bean shapes, 0.64 for balls and 0.65 for boxy pieces.

Example: a round jar 4 inches across and 6 inches tall holds 3.1416 × 2² × 6 = 75.4 cubic inches. A 1-inch gumball has a volume of 0.524 cubic inches. 75.4 × 0.64 ÷ 0.524 ≈ 92 gumballs.

When the Count Might Not Match

Near the walls and bottom of the jar candies can't pack as tightly as in the middle, so in small jars or with big candies the real count is often a little lower than the estimate. Shaking or tapping the jar settles candy and raises the count by a few percent. Mixed sizes pack more densely than a single size, and irregular candy like gummy bears or wrapped sweets varies a lot. If the contest jar is glass, the outside measurement includes the thickness of the walls — subtract it. Treat the result as your best starting point, then nudge it down for a small jar or up if the candy has clearly settled.

Related calculators

Golden Birthday Calculator

Find the one birthday when your age matches the day of the month you were born, with the exact date, weekday, and days remaining.

Freelance Rate Calculator

Find the hourly rate you actually need to charge to hit your target income, once real billable hours and expenses are accounted for.

Half Birthday Calculator

Find the date exactly six months after a birthday, when the next one falls, and how end-of-month birthdays like August 31 are handled.

Camera Exposure Calculator

Keep the same exposure when you change aperture, ISO or add an ND filter: get the new shutter speed and the EV of your settings.