All sugar is sweet, but that doesn’t mean it’s all the same.

As with many ingredients at the grocery store, there are more options than you’ll likely ever want or need. If you’re even a casual baker, though, it pays to have more than one variety in your pantry.

A quick sugar primer: Despite the fact that you and I keep these in our cabinets, all these sugars are known as table sugar, or sucrose, which consists of glucose and fructose. It comes from either processed sugar cane or sugar beets. The way or the extent to which the source is processed, as well as what parts of the result are used or what ingredients are added, determine which type of grocery store sugar is created. I’m also focusing on crystalline (or dry), as opposed to liquids.

So which types should be in your cupboard? These are my picks for the most essential and a few tips for what you can do with them. (For simplicity’s sake in this overview, I’m steering clear of special diets that might require less sugar or sugar alternatives.)

Granulated sugar. This is probably what you think of first when you hear the word sugar. Its sweet but neutral flavor and medium-size crystals make it the all-purpose sugar of choice. It is as refined as sugar gets. All of the molasses that is a byproduct of the refining process has been removed, which leads to its white color. There is also a filtering process that sometimes involves bone char, which can be a concern for those who avoid animal products. Because it’s so versatile, you can use granulated sugar in almost any dessert — cookies, cakes, pies, ice cream, bars, etc.

This is really the type you don’t want to get caught without. Why? Sugar (of all types) performs very specific functions in baked goods, including browning, leavening and creating a tender texture. There’s a lot of chemistry involved, in other words, and the other sugars I’m including on this list are different enough in moisture content, flavor and particle size that you can end up with a bad result if you don’t know what you’re doing in substitutions. That said, if you’re a bit savvier about the science, by all means experiment with swapping in something like brown sugar. I recommend this guide by Stella Parks at Serious Eats that explores the differences between brown and white sugars.

A variety of granulated sugar you might come across is superfine, or caster (castor), sugar. Its smaller crystals that dissolve faster and easier than regular granulated sugar make it ideal for such delicately textured baked goods as meringues and angel food cake. That’s also why superfine is a great choice for sweetening cold drinks. You can make your own superfine by whirring regular granulated sugar in the food processor for a minute or two. Most of us don’t need to have a separate stash.

Brown sugar. The original brown sugars were semi-refined, writes baking expert Alice Medrich in her cookbook “Pure Dessert.” That meant that some of the molasses was left on them. Now, however, the light and dark brown sugars we’re most familiar with are made by adding molasses back to white refined sugar (dark brown sugar has more molasses than light). Granulated sugar attracts water, and brown sugar even more so. A common generalization is that it leads to thick and chewy cookies, which as Parks points out, isn’t always true, because so many other variables are in play, particularly with regard to what other ingredients are present. But there are plenty of bars and cookies designed to take advantage of brown sugar to achieve a chewy end result. Brown sugar can also lend a fudgy texture and flavor to brownies. It’s a natural in butterscotch, too.

Generally, light and dark brown sugars are interchangeable, especially when the recipe doesn’t specify which type. The biggest difference is flavor: Dark will taste deep and more caramelized than light. The difference in moisture content because of the varying additions of molasses isn’t significant enough to affect your baked goods.

Muscovado sugar is a brown sugar more like the original ones Medrich refers to, in that it is semi-refined and retains naturally occurring molasses rather than having it added back. You can certainly use it instead of regular brown sugar, but keep in mind that it is more expensive and more flavorful. The latter is not a bad thing, but take care especially with dark muscovado, which Medrich describes as having “dark flavors of molasses, ripe tropical fruits and smoke.” She prefers to save muscovado for settings where its flavor will shine, such as in a brioche bread, ice cream sauce and bread pudding.

Confectioners’ sugar. This is granulated sugar ground to a powder and combined with cornstarch to keep the powder from clumping. It’s often referred to as powdered sugar. You might see boxes labeled as 4X, 6X or 10X, which refers to how fine the powder is. The higher the number, the finer the powder. Because it dissolves so readily, it’s used in many frostings, icings and glazes. In a cookie, it can lead to a wonderful melt-in-your-mouth texture, as in Mexican wedding cookies. In a recipe that calls for granulated sugar, though, its fast dissolving can cause the cookies to flatten and spread. Confectioners’ sugar is often dusted on top of desserts for an elegant, snowy look. When you need confectioners’ sugar but don’t have any, America’s Test Kitchen recommends whirring 1 teaspoon of cornstarch and 1 cup of granulated sugar in a blender to approximate 1 cup of confectioners’ sugar.

Parks has almost won me over to the merits of organic powdered sugar, which is made with fine-textured tapioca starch instead of cornstarch. If you’ve ever complained about the grittiness of a frosting made with confectioners’ sugar, try using the organic type. Parks emphasizes this in her recipe for easy peanut butter frosting, which happens to be the smoothest buttercream with confectioners’ sugar I have ever made. Conventional is still better for dusting treats, because the organic has a tendency to melt into the surface.

Raw sugar. It might be more appropriate to say “raw.” As the FDA so succinctly states, actual raw sugar “is unsuitable for human food use” and must be refined to eliminate “such impurities such as filth, dirt, and decomposition.” Yum! So, despite the marketing, the raw sugar you can eat is more like partially, or minimally, refined, with some of its molasses intact. Muscovado, as explained above, can fall into this category, but it acts more like a standard brown sugar.

Most of the time when people talk about raw sugar, they’re referring to something like Demerara or turbinado, which are a little different but interchangeable. (Other varieties include Indian jaggery or Mexican piloncillo.) They feature large and free-flowing crystals, a slight caramel or molasses flavor and an amber-to-blonde color. They’re perfect for sprinkling on top of baked goods for an attractive, crunchy exterior — lots of elegance for very little effort. This is the main reason I keep turbinado around, and even a small bag will last you a long time. As far as substituting raw for granulated, Cook’s Illustrated found that using raw sugars in pourable cake batter was okay because the moisture helped dissolve the larger crystals. But in drier doughs they can cause grittiness or a dense result. Plus, as Medrich writes, “To treat them as mere sugar is to miss their essence; indeed, if they are used when only a sweetener is needed, their rich and compelling flavors can actually get in the way.”

More from Voraciously: