This is the most frequent cry of despair I get from the comment sections of cookie recipes on Smitten Kitchen and the truth is that there are many, many factors that can cause a cookie to spread. But the biggest one? Temperature. Dough that is too warm or soft will spread more than dough that is cooler, so if you’re working in a very warm kitchen, putting your dough in the fridge for 15 minutes or longer before using it will help prevent spread. Butter that is too warm or soft is also a major culprit. When a recipe calls for “softened” or “at room temperature” butter, you’re looking for butter that you can make an impression in by poking it with your finger, but that impression shouldn’t stay. (Source). A baking sheet that is still warm from the last batch will encourage cookies to spread before they even begin to bake.
There are factors beyond temperature too. A greased cookie sheet promotes spreading; one tip is to flour it after you grease it to hinder spread, or to use silicone paper or a Silpat mat instead. Because sugar liquefies as it is heated, a more sugary cookie (with less flour and/or fat in it) is more likely to spread than one with a lower proportion of sugar. When a recipe says to “cream” your butter and sugar together, just beat it long enough to combine the ingredients — about 30 seconds on an electric or stand mixer, says David Lebovitz — so you do not whip too much air into your cookies, causing too much expansion as the air bubbles steam in the oven. (With cakes, there’s no such limit on airiness.) Finally, at higher altitudes, cookies with baking soda in them tend to spread more.
Lastly, it is worth noting that butter, which melts at your body’s temperature and is nearly one-fifth water, spreads more than margarine, and both spread more than shortening. Now, all cookie recipes on Smitten Kitchen are all-butter (because I like butter’s melt-in-your-mouth feel and flavor above all else), so making sure that your butter, dough and baking sheets aren’t too warm is especially key.