Science of Cookies – Ingredients & Process

The most successful post on my blog has been my ‘science behind cupcakes‘ experiments  – it also features in top Google search results for query ‘oil vs butter in cake’ 🙂 It has woken up the geek dragon in me! Hence I’ve decided to go back to basics and understand the science behind cookies, muffins, brownies, and so on. Today, we talk about cookies 🙂 There’s a great TED video on the cookie chemistry and my favourite line from the video is – “Don’t let that apron deceive you. Bakers are mad scientists”♥ ♥

Not every cookie is made equally. Some are soft & chewy, some are thin & crisp, and some are cakey. Have you ever wondered why? It’s all about the chemistry 🙂. Stick with me and I’ll help you unravel this mystery over a series of posts – understanding each ingredient (part 1which is this post as you read further), experimenting with different recipes (part 2) & finally arriving on my ultimate chocolate chip cookie recipe that’s my favourite (part 3)!

Let’s start at the beginning. While there may be countless variations, each cookie at the core has four ingredients – butter, sugar, flour & eggs. The proportions of ingredients and the methods of mixing are what define our cookies.


Before we jump into details of each of these, let’s understand what happens when a cookie dough hits the oven*

  1. Dough spreads – Inside the hot oven, the butter starts to melt and the dough gradually starts to spread out.
  2. Edges set – As the cookie spreads, the edges thin out and start setting before the centre does.
  3. Cookies rise – Eventually, the water in the dough starts turning into steam and the vapours make the cookie rise. The baking agent (e.g. baking soda) is then able to react with the acidic components of sugar (present more in brown sugar because of molasses), creating gases that cause the cookies to rise up and develop a more open interior structure.
  4. Proteins & starches set – Egg proteins and hydrated starches from the flour will begin to set in structure, thus stopping the cookie from spreading indefinitely and finalising the shape and size of the finished cookie.
  5. Caramelization – Just as the cookie is almost finished baking, two chemical reactions happen – caramelization & Maillard reaction. As sugars in the dough break down (especially around the edges & the hot bottom), they transform into a brown, fragrant caramel gold adding to the flavours of the cookie.
  6. Maillard reaction – Proteins in the flour and the eggs brown along with the sugar (as carbohydrates react with amino acids). This results in toasty, nutty and even slight savoury flavours. The Maillard reaction is what is responsible for giving a dark surface to the cookie as well.
  7. Cookie cools – Two things happen after you take out the cookies from the oven – the air inside the pockets of structure starts to cool and the cookies deflate slightly. Here is where the protein and gluten structure (formed thanks to eggs and flour) helps it retain some of its rise. Also, the melted sugar/caramel starts to cool and harden and hence you get a toffee-like crisp texture, especially around the edges.

Looks deceivingly simple on the surface, doesn’t it? So how do you decipher what and how to adjust a standard chocolate chip cookie recipe to make a cookie just like how YOU like it – YOUR ultimate cookie recipe! Here it’s important to understand how each of the ingredients works and affects the final outcome. So let’s break down the key ingredients –

1. Butter


The most obvious contribution of butter is its flavour (the milk protein browns as the cookie bakes and adds to nuttiness and overall flavour). Apart from that, butter also inhibits gluten formation by coating the flour and protecting it from the liquid, resulting in a tender cookie.

HOW you add butter also makes a difference to the cookie. Soft butter will spread, and hard butter will hold its shape for longer – thus deciding how much the cookie will spread in the oven. How butter is incorporated can also affect texture – creaming it with sugar will incorporate air and some of the sugar is dissolved which gives the cookie some lift. Melted butter leads to flatter denser cookies as the dough is wetter and spreads out faster. Using chunks of cold butter will give you a fluffier and cakier cookie.

There are some recipes that use brown butter (where butter is cooked till water is cooked off and you get browned milk solids) – less water means less gluten development and hence a soft and chewy cookie. But then, you won’t get the butterscotchy flavour since there’s little water left for the sugar to dissolve into.

2. Sugar


First and foremost, sugar adds flavour. Beyond the obvious sweetness, it also plays a key role in how other flavours are perceived. But the flavour isn’t where sugar’s true power lies. Sugar makes cookies browner (by caramelising) and crisper (by absorbing moisture in the dough). Sugar attracts and binds the water (I learnt a new word – hygroscopic!) and hence there’s lesser water for gluten formation. Too much sugar, there’ll be very little water for building the protein structure; too little sugar and excess water will activate gluten and result in a tough cookie.

Brown sugar makes cookies moister and chewier than does white sugar, thanks to the presence of glucose and fructose which participate better in Maillard reaction. Brown sugar also contains molasses which adds moisture and, because it’s slightly acidic, works with the baking soda to give the cookies a rise and a cakier end result. Using only white sugar will result in a flatter and crisp cookie. A mixture of the two provides a good balance, and their proportion can be adjusted to personal preference.

3. Flour


If you’ve read my cupcakes war post, you’ll know what role gluten plays in the end product. All-purpose flour is about 10-12% protein and rest of it is starch.

The starches in flour (which are about 70%) absorb water and a subtle web of proteins is created by gluten. As the cookie bakes, this web stretches and traps the expanding air (else the air will just fizz out from the top!) and thus lends the structure to a cookie. Cake flour with lesser protein content (about 6-7%) will give you very soft and mushy cookies. Bread flour with high protein content (about 12-14%) will give extra chewiness. I find the all-purpose flour with protein content somewhere in between works the best, but some bakers like to use a mix of all-purpose and bread flour.

Since flour provides the bulk of the structure in a cookie, the amount you use can alter the texture of the cookie: less flour to butter ratio means thin spread out cookies; more flour to butter ratio means dense and doughy cookies that don’t spread as much.

4. Eggs


These are a major source of moisture and protein in cookie dough. The liquid in eggs gives a cookie structure by bonding with the starch and protein in the flour, and their protein helps to make cookies chewy. The higher the proportion of egg whites in a cookie, the more it rises during baking. Because of the extra water, you also get more gluten formation, which again leads to a taller cookie. Egg yolks also provide some moisture and protein, but more importantly, they provide a well-emulsified source of fat. When cooked, egg yolk forms a tender protein coagulum that can keep cookies tender and fudge-like. A high proportion of egg yolk leads to a more brownie-like texture in a finished cookie.

Eggless recipes of cookies may rely on milk or yoghurt or even a combination of oil & water as replacements for moisture & fat/protein. That’s an experiment for another day 🙂

5. The secret ingredient – AIR!

There are three ways to create air in a cookie: mechanically (by creaming the butter and sugar), chemically (leavening agents like baking soda), and physically (steam created by water from butter & eggs). We’ve already spoken about the others, let’s talk about the leavening agents in a little more detail.

The baking soda (pure sodium bicarbonate, alkaline) releases carbon dioxide when it comes in contact with water and acid (from flour and brown sugar).  Baking powder is basically baking soda with powdered acids built right in and it doesn’t become soluble until it is heated. This means that as the cookie bakes, it gets an additional boost of air right about the time the starches and proteins in the cookie are firming up. Baking powder generally produces cakier cookies that rise higher during baking, producing smoother, shinier tops, while soda yields cookies that are craggier and denser in texture. The combination of the two leaveners produces the best results in my opinion – crisp at the edges, soft in the middle, with a good amount of spread.

6. OthersSalt plays an important part to balance the flavour of caramelised sugars.  Salt also strengthens the protein in a dough, making cookies chewier. Resting the dough for 24 hours gives your cookies a deeper flavour and an even-browning and texture: large molecules of flour and sugar breakdown, which gives them a jumpstart on browning the next day.

In Conclusion 

The beauty of understanding how all of these ingredients work together is that the cookie recipe can be adjusted to just how YOU want! Like your cookies chewier? Substitute some of that all-purpose flour for bread flour. You like them crispy with a soft centre? Use a combination of baking soda and baking powder. Want your cookies with more prominent butterscotch flavour? Increase the proportion of brown sugar as against white sugar.

Next on my list (Part 2 of this ‘Science-Behind’ series) would be where I take the original Nestle Tollhouse chocolate chip cookies recipe as a base, experiment with the ingredients and compare results. That’ll help me arrive at MY ultimate chocolate chip cookie recipe (Part 3 of the ‘Science-Behind’ series).  Keep watching this space 🙂 

* Sources & Inspirations – TED -Ed talk on the chemistry of cookies, The Food Lab at;
Cookie Baking Chemistry at; and many others across the internet.


Leave a Reply