Dicing an Onion, the Mathematically Optimal Way

191 surprisetalk 78 8/16/2025, 1:54:19 PM pudding.cool ↗

Comments (78)

re · 8h ago
> It turns out that making horizontal cuts almost never helps with consistency.

They made the horizontal cuts evenly spaced between the cutting surface and the top of the onion, which is nonsensical to me. I believe that a single horizontal cut at around 15-20% height would be better for uniformity than a horizontal cut at 50% height.

wkcheng · 3h ago
Yeah, that's the way that I cut onions: you make vertical cuts followed by one single horizontal cut slightly above the cutting board.

This way of calculating doesn't take into account the creative ways you can make cuts. You could also do mostly vertical slices, and then slightly angle inwards when you do the final few cuts. That would get you a more optimal distribution as well.

jaxn · 5h ago
Which is exactly how I was taught to do it while working in kitchens 25 years ago.

The other thing is that this seems to ignore that the onion is round in the other direction too. As far as I can see, it only covers the first dice cut.

dcrazy · 5h ago
The planar cuts just determine the thickness of the dice. You just want to make them equal to the thickness of the rings.
indy · 7h ago
Yes! They had all those visualisations and you could see the problem areas from vertical slicing were at the bottom of the onion, a couple of horizontal slices down there would have given the best solution.
1a527dd5 · 8h ago
This is fun!

I really struggled to effectively cut onions until this: https://www.youtube.com/watch?v=CwRttSfnfcc

Haven't looked back since.

tptacek · 6h ago
Hopefully you're not bothering to core the top and the bottom of the onion; fussy, a waste of time, and works against his later goal of keeping the root intact while dicing.
finebalance · 6h ago
I do it more or less this way - except I keep the root intact until the end. It keeps the onion structurally intact until I'm done with the dicing. At which point, the root takes a single chop to lop off, and then the whole thing scatters into tiny, mostly uniform dices. It's quite satisfying.
fifilura · 5h ago
I also keep the root. But I am on the radial team!
dyauspitr · 43m ago
This is silly. I’ve seen Indian street vendors do it the most efficient way. You tilt the knife with the front part down and the back maybe a quarter inch above the surface. That way as you slice the onion the little quarter inch holds it together as you turn it 90 degrees and make the perpendicular set of cuts.
ndr42 · 1h ago
Sorry, but I had to link to this video as you said "effectively": https://www.youtube.com/watch?v=eQgIwwKmjdo
morninglight · 7h ago
That may be the most useful thing I've seen on the internet in months.

Thanks much!

tetha · 5h ago
But is uniformitiy the goal?

If you want diced onions, the cook generally wants onion chunks below a certain cubic mass, so they cook and dissolve easily and uniformly. It does not matter if some pieces are 50% of that size, some are 20% and some are 80%.

With that, 1-2 horizontal slices and a bunch of straight downward slices are the safest and easiest way to achieve that.

That technique also expands to onion rings, sauteed onions and such.

Syzygies · 3m ago
No! When you walk into a wealthy kitchen with pots that match, run away! Uniformity is a false god.

One can make salsa in a blender. A less uniform texture is why one imports a molcajete from Mexico, or Genovese insist on making pesto in a mortar.

Why does one sear a great steak and finish at a lower temperature, or reverse this using sous vide? The surface char tastes great, but so does a juicy core.

I'm a mathematician; this isn't the first "how to cut" editorial I've seen. I'm also a reasonably great cook. I used to cook for twenty at a beach house; my onion approach there was "beach cut". Just as a major corporation wants to understand the sensitivities for each variable in a linear programming optimization problem, there is never enough time cooking a meal, and one has to consider the relative gain from perfecting any one step. Most steps actually don't matter so much, but some really matter. How one cuts onions? No so much. I like variability in how they cook.

The real problem is I've been around mathematicians my whole career. I never would have gone into math to spend more time with dumb recreational problems like rearranging match sticks in a bar, and the problem with any optimization like carefully cutting an onion uniformly is how it misses the bigger picture. Many of the mathematicians I know were drawn to mathematics because they badly WANT to miss the bigger picture.

"My Calabria" has a phenomenal swordfish recipe where one cuts an onion the long way into irregular spears. As a change of pace, onions are incredible that way.

throwawayffffas · 2h ago
Uniformity matters for even cooking.

If some pieces are twice the size of your average size, these pieces will be raw, when the others are done.

And if you have some pieces that are half the size of the average they will burn by the time the rest are done.

shakna · 3m ago
[delayed]
sdwr · 5h ago
Yeah, measuring standard deviation from the average isn't an accurate way of scoring - "too big" pieces are worse than "too small"
feoren · 8h ago
This ignores the obvious solution of not cutting all the way through. If every other radial cut is only through half the layers, you avoid making the inner pieces too small. It's funny how common it is for people to claim some sort of optimality with lots of math and analysis while completely failing to consider a better possibility. Never take seriously claims that someone found a "mathematically optimal" way of doing something. They didn't.
dcrazy · 5h ago
I’m not going to try to make consistent partial cuts down through an onion. I’m going through to the cutting board every time.
altairprime · 8h ago
To translate the final answer from math to human (as I’m going to be explaining this to my mother when I chat with her next!):

Imagine the half onion is a half rainbow. You know there’s another half rainbow lurking below the surface, the onion’s ghost of the sphere it once was. Place your knife as usual for each of your ten dice cuts, but instead of cutting straight down towards the cutting board, angle it slightly inward towards the end of the onion’s ghostly half-rainbow sphere below the board. Check your fingers for safety and then make your cut. Assuming your knife isn’t a plasma cutter, you’ll be stopped at the cutting board without ever reaching the onion at the end of the rainbow, and that’s cool. Set your knife at the next dice point and try again :)

(This still improves on the other dicing cases and only costs 1% uniformity by using 100% radius as the target.)

fnord77 · 8h ago
> Place your knife as usual for each of your ten dice cuts,

what does this mean, exactly? I don't cut onions. Also I assume there is some pre-step where you cut the onion in half on some axis, but I don't know which.

altairprime · 7h ago
If you inspect the onion diagrams in the article carefully, they show various ways to cut an onion, as if origami diagrams but with knives. Still, I think you’ll want to learn the traditional methods of dicing an onion independently first, and then with that knowledge revisit this article and my description; this is last-10% optimization work that hinges on knowing that first-90% of how to dice an onion at all.
zeroonetwothree · 7h ago
If you don’t cut onions you probably shouldn’t bother with this thread. Or at least watch a video
motbus3 · 4h ago
This remembers I have a challenge to figure out with some friends.

How to split a round cheese in in 5 perfectly without using any tools except the knife.

Assume you have the ability to cut in half perfectly always

Assume that if you can slice it in 10 equals pieces it is also a valid solution because you can just give two pieces for each

aidenn0 · 2h ago
Measure how many widths of the knife divide the circumference of the cheese. Divide by 5 and make a radial cut at each division.
mtklein · 3h ago
Okay, I'll bite: 2 and 5 are prime, this is the perfect fifth problem, only approximate solutions are possible. Make me wrong!
bravesoul2 · 2h ago
Cut into 8. Give 1 piece each.

For the remaining 3, repeat this method.

Let epsilon be a number as small as you like...

saagarjha · 2h ago
What I want is a cutting technique that’s good enough while still being practical for people to do. I am not sure I’m dexterous enough to slightly and consistently tilt the knife as I go through the onion.
uncletaco · 2h ago
Sure.

First its feet, then its head then split its belly 'til its dead.

zeroonetwothree · 7h ago
Standard deviation is a poor measure because you care more about avoiding big pieces than small ones. Penalizing for having a few tiny pieces doesn’t make sense.
crazygringo · 6h ago
Thank you, this exactly! Seems like you want to reduce the standard deviation only considering pieces that are larger than the mean, but still relative to the mean. Would be very curious to see the results redone using that approach.
yunwal · 4h ago
You probably don’t even care about the “standard” deviation at all. You care about the deviation from some desired size. Probably the more accurate problem is “what is the fewest number of straight cuts I can make such that all pieces are below some target size”.
hashmap · 8h ago
I dislike easily 90%+ of the images I recognize as AI-generated, but the ones on this internet web site I think are a good use of the tech.
russsamora · 7h ago
There was no AI used on this website!
ctenb · 4h ago
Source?
masfuerte · 4h ago
He's one of the three named authors on the article. I'd be interested to know how the onion text was made.
re · 4h ago
fumeux_fume · 2h ago
So using some complicated angle gets you 4% less std dev than just doing it the easy way that everone already does it. Ok.
buildsjets · 4h ago
I make fresh Pico de Gallo twice a week so I chop a lot of onions. Besides an even dice, I’m interested in not dicing my fingertips. Radial slicing a 180 segment or adding horizontal slices is too unstable.

My method is to cut in quarters, give a quarter a vertical dice, rotate 90, do another vertical dice, then go longitudinal.

jader201 · 8h ago
Why limit it to just two horizontal cuts?

I’ve always just made equal horizontal and vertical cuts, then slice the onion crosswise.

This results in pretty much no large pieces, and only some smaller pieces (which I prefer over larger ones, anyway).

I don’t care about standard deviation — I only care about minimizing the maximum size (but still without turning them to mush).

(Also, I know this was more of a fun mathematical look at chopping onions vs. practical. But still the “two horizontal cuts” thing seemed to be practical guidance, when it seemed like just equal horizontal and vertical cuts is far superior. But, granted, it’s a little trickier to do.)

EDIT: looking at Youtube, looks like the 2-cut thing is normal. But adding a few more cuts isn’t that much harder, and eliminates the larger pieces from the 2-cut method. I’ll stick to my method, even if it’s a little more work.

otherme123 · 7h ago
Horizontal cuts does next to nothing, the onion is already "cut" horizontally.

In my experience it does worse, as the onion gets unstable to do the vertical cuts.

jader201 · 3h ago
I mean, it’s also cut vertically — except for the adjacent edges (true for both horizontal and vertical, since it’s a sphere).
pinko · 8h ago
The post's dataviz in fact allows you vary the # of horizontal cuts and compare the results. Take a look.
jader201 · 7h ago
Right, but horizontal is limited to two, best I can tell. No?
1970-01-01 · 7h ago
Someone, somewhere, will now spend time growing square onions to fix the problem. Probably someone in Japan.

https://en.wikipedia.org/wiki/Square_watermelon

ginko · 7h ago
Better yet onions that grow in large flat sheets.
tptacek · 5h ago
It's funny seeing people dunking on taking this much effort to analyze onion cuts. The rewards for improving your onion dice are indeed probably low. But in mainstream western cooking, you need to do it almost every meal, and the analysis/learning is a one-time cost rather than a cost applied at every prep. Seems like an extremely reasonable thing to noodle on!
dfxm12 · 4h ago
People are dunking on the fact that "mathematically optimal" is meaningless in this situation.

Even Lopez-Alt suggests, "It matters far more for winning internet debates and solving interesting math problems than it does for cooking."

tptacek · 3h ago
The mathematical verification doesn't matter, but:

* Radial is more convenient than the classic horizontal cut.

* Radial with an origin below the cutting board is a better outcome than naive radial with almost zero extra effort.

All this to say: it was worth figuring that out!

NKosmatos · 5h ago
For sure this research can be nominated for an Ig Nobel Prize :-)

On a more serious note, thanks for posting this and letting me (us?) know about "The Pudding".

mafuku · 4h ago
The authors rightly point out how the pieces near the bottom get elongated in a vertical cut, but don't realize that the whole point of the horizontal cut is to cut those elongated pieces in half. It's not meant to be a cut halfway up the onion.
gndp · 6h ago
Lol love the extent of clarity of the experiment, findings and interface. I think that for practical purposes, it would be better if the std-dev of pieces with size above a certain threshold is observed. From my experience, pieces above a certain size cause inconsistency in cooked onions. But maybe it depends on the recipe.
thunderbong · 8h ago
Posted less than a day ago (8 points, 2 comments) -

https://news.ycombinator.com/item?id=44894302

criley2 · 8h ago
Enjoyed reading this. I've followed J Kenji Lopez-alt for a while and I've practiced the "aim below" method for a few years now.

I also like that the article ends with the perfect Kenji-ism. "Yes, technically my method is statistically ideal, but like, it's home cooking and it doesn't matter, heterogenity isn't the enemy". Reminds me of Adam Ragusea (https://www.youtube.com/watch?v=5cWRCldqrxM), we're not making fancy french cuisine, we don't need a perfect brunoise!

fuzzfactor · 5h ago
I figure since it's only an onion I'm glad that that mathematical optimization is not really necessary.

After all there are many more approaches that can be more mathematically rewarding, might as well enjoy it when you can ;)

Theodores · 7h ago
Once upon a time, my father, who could not cook, harshly criticised my onion chopping technique. This knocked my confidence in the kitchen quite a bit. I refused to learn the fancy techniques of the TV gameshow celebrity chef that my dad was enamoured with.

In my opinion, so long as you are chopping onions, all is well. Sure it could be dangerous, with fingers and egos at stake, but far worse is to not be chopping onions as that means ready meals, take out meals and having a poorer diet.

fnord77 · 8h ago
From their 2-d diagram, I'm having a hard time understanding what they mean by "vertical cuts" and "radial cuts"
immibis · 8h ago
Vertical cuts go up and down. Radial cuts go towards a point. But you make a valid point that this 2D diagram doesn't tell the full story, unless your onions are cylindrical, which they're not.
pfdietz · 10h ago
Throws it in the food processor.
webstrand · 7h ago
Now you have to clean the food processor. Which is enough of a trouble to prevent me from using it very frequently.
pfdietz · 7h ago
Remove from the motor/base, separate parts, spray with water and toss in the dishwasher. And wouldn't you have to clean the cutting board and knife anyway?

The most important part: much less eye watering.

crazygringo · 6h ago
> Remove from the motor/base, separate parts, spray with water

And then do in reverse once it's clean. And you're wondering why it seems like too much trouble...?

Plus you still need the knife and cutting board anyways to chop off the ends of the onion before peeling it. So it's not even instead of, it's in addition to.

Much less time to dice it yourself for one or two onions. Ten or twenty onions, OK it's food processor time.

pfdietz · 6h ago
Reassembling a food processor takes mere seconds.

Overall, doing all this is much more convenient than manually chopping onions. It's not even close. This is one of the ideal use cases for a food processor.

crazygringo · 3h ago
Maybe you're really slow at chopping onions? It takes like 15 seconds to dice an onion once it's peeled. Taking out, disassembling, rinsing, racking, unracking, reassembling, and putting away a food processor takes much much longer, any way you slice it. You're right, it's not even close -- manual dicing is always going to win for just a couple onions, unless you're already using the food processor for something else.
pfdietz · 3h ago
Maybe you're a masochist and like the sulfuric acid in your eyes?

https://en.wikipedia.org/wiki/Syn-Propanethial-S-oxide

crazygringo · 3h ago
Or maybe it's not a big deal for just a couple of onions?

If it's really bothering you, make sure your knife is sharp enough. A dull knife makes dicing much slower and releases many, many more compounds.

webstrand · 3h ago
That works for the housing, but not for the blade which usually gets food jammed up in every little crevasse. You can't stick those in the dishwasher because it'll dull the cutting edges. Washing the knife and board is trivial by comparison.

But I don't really have trouble with my eyes with onions, that may be the deciding factor.

bigstrat2003 · 1h ago
> You can't stick those in the dishwasher

I stick my food processor blades in the dishwasher all the time; never hurt them any.

pfdietz · 3h ago
Of course you can stick the blade in the dishwasher. It works fine. What do think the dishwasher is doing, sandblasting?
dcrazy · 2h ago
Throw your knives in the dishwasher and they’ll dull right quick.
maxerickson · 1h ago
Food processor blades are usually stainless steel, which is a lot less sensitive to the dishwasher.
kazinator · 3h ago
Some substances in the dishwasher detergent are bad for steel, like sodium silicate.
tptacek · 5h ago
The metric being optimized here is uniformity of cut.
SoftTalker · 8h ago
Nice if you want onion mush.
criley2 · 8h ago
A few quick pulses doesn't make mush and is fine for a lot of applications. Otherwise, food processors have dicing kits https://i.imgur.com/cXbZ9aC.png

I enjoy the art of prep with my beautiful wa gyuto, I truly do. But if you put a 5 pound bag of large onion on front of me to dice, I will prefer the machine...

dcrazy · 2h ago
Yes, there is an inconvenience threshold that must be reached before bringing out the food processor. We also have a mandolin that can make cross-cuts for intermediate jobs: https://a.co/d/da8OxnE
footlong2 · 8h ago
Too much dork time on their hands. Cooking is fun, not vibe coding.
sram1337 · 8h ago
In my opinion there is no such thing as too much dork time. This post is fun, just like cooking. The onion-inspired font for the section titles is fun. The interactive graphs are fun. Also vibe coding is fun.

What was the point of this judgmental comment?

russsamora · 7h ago
No vibes were coded in the making of this website