How many candies in this jar of hearts?
February 6, 2025 4:39 PM   Subscribe

Are you able to determine and tell me mathematically how many conversation candy hearts are in this jar?

Here is the jar in question:

Jar of Hearts

I believe the candies are (or are similar to) the Brach's large conversation hearts, but I could be wrong.

Unfortunately I do not know the jar's capacity.

I'd love to hear your estimate for number of candies as well as the math and rationalization you used to get there, if you'd so kindly share.

Thank you!
posted by karizma to Grab Bag (30 answers total) 2 users marked this as a favorite
 
Those are not the "large hearts", those are standard size Necco Sweethearts (i can tell by the blue ones).
I'm sure there's a way to extrapolate the internal available volume of that apothecary jar, but I am not the person for that.
posted by ApathyGirl at 4:42 PM on February 6


The candies in your photo are not spherical, but a sphere packing estimate might get you close.

Say you know the volume of the jar, and you can roughly estimate the volume of one candy. (You'll need these two numbers, or some ratio of volumes between a single candy and the jar.)

A best-case ("optimal") packing of spherical candies would take up ~74% of the volume of the jar.

So you then take that 74% value and divide it by the the volume of one candy. That tells you how many candies would fit (optimally) in the jar, if they were sphere-shaped and if they nested nicely.

This is a very rough estimate because packing is imperfect, your candies are not spherical (but heart-shaped), and there are gaps between the jar's boundaries and the candies. But this might give you a rough, back of the envelope calculation.
posted by They sucked his brains out! at 4:55 PM on February 6 [1 favorite]


It'd be pretty rough, but I just count the candies in a couple dimensions in the photo, or maybe some markoff of a standard "average" candy distance and just run the numbers like a regular volume calculation from grade school.

Since it's a cylinder the number of candies visible across the front of the jar in the image will be a bit bigger than how many are in a straight diameter, but I feel like I'm getting that the jar is about 12 candies in diameter (extremely imprecise!). I'm also getting that the candies are about 12 deep vertically within the jar for height. So, I do pi times the radius squared to get one rough "layer" of candies and then multiply that by the height:

pi x (6)^2 x 12 = about 1350
posted by LionIndex at 5:06 PM on February 6 [4 favorites]


Yay fun geometry! Let’s use American units just for shits and giggles. And switch between fractions and decimals.
There is a roll of tape to the left of the jar, it looks like the 3/4 inch width tape so I used that to estimate some measurements.

Jar radius = 3 inches
Jar height = 5 and 1/4 inches
Jar cylinder volume = pi r-squared h = 3.14 x 9 x 5.25 = 148.365 cubic inches
75%* of this is 111.27 cubic inches

Heart radius = 1/4 inches
Heart volume = 4/3 pi r-cubed = 0.0654 cubic inches

111.27 cubic inches x (1 heart/0.0654 cubic inches) = 1701 hearts.

(At this point I refreshed the thread and saw 1350 above and … not wildly different!)

*thank you to TSHBO above for the 74% value above, which I rounded to 75%.

For the record 1700 seems high if I were just to look at it and guess. I think the hearts are bigger than I’m estimating.
posted by Vatnesine at 5:29 PM on February 6


(I think all the estimates that try to cover things into inches are missing the point. I think the relevant unit here is "candies"- converting from candies, into inches, then back into candies is just an extra step where inaccuracy can seep in. Lionindex has it right - just measure the jar in how many candies wide, how many candies high, etc, and go from there)
posted by ManInSuit at 5:36 PM on February 6


Mod note: One comment removed. AskMetaFilter has a stricter Content Policy, so please just focus on answering the question.
posted by Brandon Blatcher (staff) at 5:59 PM on February 6


1206. I got that by roughly estimating the number of candies in a single layer (100) and the number of layers (12) and added 6 for verisimilitude.

If I needed an *accurate* estimate, I would weigh an easy-to-count number N of hearts, then weigh the entire batch. Result is approximated by N*weight/(weight of N hearts).

Alternately, measure the volume of the container up to the fill line (e.g., using water and a measuring cup), then measure the number of hearts that fit a smaller measure and perform a similar computation.
posted by Gilgamesh's Chauffeur at 6:19 PM on February 6


Mod note: One comment removed. Please just keep comments focused on answers to the question. The flag about the incorrect link was seen, no need to post a comment in addition to it, thank you.
posted by Brandon Blatcher (staff) at 6:47 PM on February 6


To avoid needing the jar or candy size in normal units, let’s make our unit “one heart”, a vaguely cylindrical voxel-like unit whose length is the average length of a heart laying on the table and whose height is the average thickness of a heart. (These calculations are very squishy, but if it was a contest, it’s how I’d think it through.)

There are a couple of spots where the hearts are arranged flattishly around the circumference. Counting several ways, I can see 10, and I’m assuming I need an extra heart on either end to compensate for the refraction in the glass to get me to a half-circumference of 12. That gives me a circumference of about 24, and a radius of about four hearts, and therefore about 48 hearts in a nice flat single layer. (We are calling pi 3 to avoid half-hearts.)

Figuring out the height of the jar in heart thickness units is harder, but by counting a couple of spots where the hearts are arranged in a more or less horizontal way, I get about 20 layers of hearts that could fit in the jar if someone spent a lot of time arranging them like bricks. That gives me 960 candies in an orderly world.

Fudge factors for a disorderly world: If the jar is full, there are more candies mounded on top where the refraction makes it hard to see—so the number is a little higher. However the candies also aren’t laid out perfectly packed like little bricks, so the number is a little lower. “A little higher” and “a little lower” cancel out in a situation where I am already calling pi 3, so I’ll stick with 960.

(Now that I’m done and looking through the other answers, I see my answer is lower but not wildly out of synch. Please count them!)
posted by tchemgrrl at 7:29 PM on February 6 [2 favorites]


The prior estimates are assuming a constant density of candy but there is a substantial possibility that there is a secret hollow space within the jar, formed by a second jar or some other packing material, to discreetly reduce the quantity of candy needed for an attractive display. We can estimate the upper bounds of this potential material's volume, assuming a cylinder, by setting the maximum potential diameter at the lesser of either (.95 of the jar mouth opening) or (jar inner diameter-6 candy piece widths) and maximum potential height at roughly (height of candy-3 candy pieces). I make these guesses based on needing a certain volume of candy around the edges and on top to create an even display.

The specifics of what these bounds work out to, and how they might change if there is instead a packing material of a balloon, a crumpled wad of paper, or several boxes of a different brand of candy hearts, is left as an exercise for the reader.
posted by VelveteenBabbitt at 8:41 PM on February 6


593
posted by If only I had a penguin... at 9:42 PM on February 6


Oh I see you wanted the math. I did what others did, I just got a different answer for some reason. I counted the candies along the bottom row of the jar. I got 14. So I assume the circumfrence is 28. That means the diameter is ~8.91 so the radius is 4.56. The area of the bottom is 62.38. Then I count a couple of vertical rows. I got 10 in one row 9 in another. so I multiplied 62.38 * 9.5.
posted by If only I had a penguin... at 10:00 PM on February 6


Upthread we've got five independent predictions from metafilter's heart candy estimation experts, using a variety of methods. We could take the mean of those predictions (1350, 1700, 1206, 960, 593) to give an overall prediction of 1162 candy hearts, and call it the wisdom of the crowd.

With more effort & sufficient grant funding, we could get a variety of different sized jars, candies, and experimentally test each of the 5 prediction methods in a controlled environment where we can determine the true candy count. Then we might find that one of the prediction methods is a lot more accurate than the others "on average" (averaging over variation in candy shape, jar size, etc), and switch to just using that one.
posted by are-coral-made at 10:40 PM on February 6 [8 favorites]


I count a circumference of 26 candies, which gives a radius of 4.14 candies (2*pi*r = circumference).

I count the height as about 13 candies, so using the formula for volume of a cylinder (pi * r^2 * h), that gives a volume of exactly 700 candies.

Note: I didn't try to calculate based on the average size of a candy or some such. Rather I just counted how many candies around the circumference, in whatever orientation they happened to be in, and similarly for the height. My thinking was, that this would be a good way to take into account the fact that the candies are jumbled rather than nice and orderly in their arrangement.

Other than that rather simplistic system, I don't know how to account for the fact that the hearts are all jumbled and packed together like a sphere-packing puzzle but even more complex due to the shape. That would be a pretty gnarly problem to solve from first principles. The simple and straightforward way would be to fill various volumes and shapes with the hearts and just count. Probably a fairly simple formula for estimating the number of hearts would fall out, based on size and shape, and then you could create a decent estimate for any given shape and volume.

The number is always going to be an estimate because different ways of packing will definitely affect the total number that can fit into any give space. However, if they are just randomly mixed and jumbled I would bet the number could be pretty closely estimated given some good real-world data as a starting point, as described above.
posted by flug at 1:41 AM on February 7


(1350, 1700, 1206, 960, 593) to give an overall prediction of 1162 candy hearts

I'd err on the high end of that. A lot of those candies are lying flat, so the vertical stacking is more like books/plates than spheres.
posted by pjenks at 5:03 AM on February 7


Just note that the estimates here are just that estimates. The "packing problem" is not solved for exact shapes and the candies are fare from exact shapes. Just take an average of all the serious estimates and add a +- of the standard deviation with a fudge factor. ;-)
posted by sammyo at 7:02 AM on February 7


Standard deviation of that data set is 417. Pretty high.
posted by Vatnesine at 8:41 AM on February 7


Statistically, then, there’s a 68% chance that the actual number is within the mean +/- 1 sd, so between 668 and 1502 candies.
posted by Vatnesine at 8:47 AM on February 7


Response by poster: Thanks for all the responses so far. Wow, there's really quite a range of final counts! I was hoping to land closer to a consensus, but I realize it's not as easy as it looks.

I wish I could determine the jar capacity and/or manufacturer. I did a reverse Google image search on the jar with candies inside but it's only finding more pictures of jars filled with candy hearts. I am making an assumption that it is a 1gal jar.

If you have more estimates, I'd love to hear them. Thanks!
posted by karizma at 10:12 AM on February 7


OMG...you don't have the jar? We're never going to know??
posted by If only I had a penguin... at 10:18 AM on February 7 [1 favorite]


Response by poster: I will get a final number and post it!
posted by karizma at 10:55 AM on February 7 [1 favorite]


Response by poster: Update! More photos with some measurements of the jar and a piece of candy!

Measurements!
posted by karizma at 11:56 AM on February 7


The volume of the cylinder is:

Vcylinder = π · r2 · h = 45π ~ 141.37 cu. in

The volume of an individual candy is some fraction of the rectangular cuboid shape that encloses the heart. Let's say, for argument's sake, that 2/3rds of the cuboid is made up of actual candy. So we can calculate the per-candy volume like so:

Vcuboid ~ 2/3 · width · height · depth = 2/3 · 5/8 · 5/8 · 1/4 = 0.065 cu. in

Let's pretend that each candy is a sphere that takes up 0.065 cu. inches in volume.

From sphere packing problem solving, we have a result that 74% of the cylinder volume can be filled optimally with spherical candy. Further, Wikipedia suggests that random, irregular sphere packing has an average of 63.5% fill.

From these two values, we get an optimal packing of:

Vcylinder · 0.74 / Vcuboid = 141.37 cu.in · 0.74 / 0.065 cu.in-per-candy ~ 1609 candies

And a less optimal random packing gives:

141.37 cu.in · 0.635 / 0.065 cu.in-per-candy ~ 1381 candies

Looking at your photo, I'd pick the random packing as much more probable of giving an accurate answer. Also, 1381 candies is within the bounds of the rough estimates provided by others here.

It is unlikely to be exactly 1381, but I bet it would get you close.

If you wanted a more accurate value for volume calculations, use water displacement to measure the volume of a piece of candy in millilitres. Likewise, fill the cylinder up with water and measure how many millilitres are in it. You'd use these two values in place of the cubic inches measurement. The water displacement measurement would be more accurate than hand-waving some fraction of the cuboid, particularly.
posted by They sucked his brains out! at 2:36 PM on February 7


Water displacement wouldn’t work for candies but I’ve never heard of a substitute. Sand?
posted by Vatnesine at 3:58 PM on February 7


Consider the puzzle setter. They need to fill a container with candy hearts - and they need to make the size of the thing and the number of hearts large enough to be a challenge. It feels safe to assume they don’t have that many candies sitting around in a bucket - instead they need to buy them in the most economical and practical configuration. What is that? In the UK, these are called Love Hearts. They are sold in tubes which each contain 20 sweets. A confectioner would then purchase a box containing 24 tubes - a couple of these boxes gives us 960 sweets - 1440 for three of them. Numerous online retailers are selling these. If you assume the setter started by buying the candy then looked for a jar that would accommodate this number - the solution would be one of these unit sizes less the number that had to be removed to precisely leave the jar full. According, I would guess 720 or 1368 - the above figures less 5% - I’d choose whatever of these I thought was closest to the rough jar size - probably the lower one. In doing this I am attempting to replicate the sizing calculations of the puzzle setter.
posted by rongorongo at 4:38 PM on February 7


Response by poster: Final count was 1008. Thanks for your answers!
posted by karizma at 7:17 PM on February 7 [4 favorites]


author                       estimate	actual	error	|error|	relative error

LionIndex                        1350	  1008	  342	    342	           34%
Vatnesine	                 1700	  1008	  692	    692	           69%
Gilgamesh's Chauffeur            1206	  1008	  198	    198	           20%
tchemgrrl 	                  960	  1008	  -48	     48	            5%
If only I had a penguin...        593	  1008	 -415	    415	           41%
They sucked his brains out!      1381	  1008	  373	    373	           37%
rongorongo                        720	  1008	 -288	    288	           29%
Empirical evaluation on the heart candy jar challenge [karizma 2025] suggests that the heart-voxel approximation with refraction compensation method of tchemgrrl [tchemgrrl 2025] gives a state-of-the-art estimated heart candy count with the least error when compared to the true count. However, given the modest sample size (N=1 heart candy jars), it is unclear how much of this result is due to a repeatable method that would generalise to jars in a hold-out validation dataset, and how much is due to variability ("luck").
posted by are-coral-made at 2:25 AM on February 13 [3 favorites]


Interesting that the average of all the estimates (the ones listed listed just above, plus mine, which was 700) is 1076.

That is not too far off, considering!
posted by flug at 7:29 PM on February 13 [1 favorite]


Also, I agree with are-coral-made what tchemgrrl's method was the one that was spot on.

If I understand that method, it consists of figuring out how many hearts would fit on one level if all are laid flat, and then figuring how how many stacks of these will fit vertically.

In fact, if I calculate using tchemgrrl's method but a bit more precisely (using that actual value of pi etc) I get a value of between 1027 and 1070 - depending on how many vertical stacks you think there are. So that is pretty close.

If you think of the shape of the hearts - you could model them as little flat rectangles or maybe triangles - this makes a lot of sense. They are not really going to "pack" together, saving quite a lot of space - the way, for example, spheres would.
posted by flug at 1:04 AM on February 14


I got close enough with my fudgy numbers to be happy with it. tchemgrrrl's working backwards from the circumference instead of getting a handwavy radius measurement in candy units definitely makes more sense.
posted by LionIndex at 6:03 PM on February 14


« Older Who you gonna call?   |   How does the DoorDash app help drivers navigate? Newer »

You are not logged in, either login or create an account to post comments