Here’s the most important reason to make a doughnut at home: You will treat yourself to the pastry at peak freshness.

This matters because the half-life of a doughnut is short, like a bagel’s. During the first few hours of existence, your doughnut has a crisp exterior and a soft inside—either the coarse leavened crumb of a cake doughnut, or the puffy, chewy pull of a yeast one. During the first few minutes, things are even better.

“A warm doughnut—you can’t beat it,” says Fany Gerson, owner of the NYC’s cult doughnut shop Dough.

Before very long, though, the crisp softens, the crumb stales, and the divinity of the doughnut fades. It’s still perfectly edible, just not perfect. The best shops fry small batches almost to order. But you never what to expect when when you pick one up from any old place, and you could be indulging in yesterday’s leftovers.

Aside from this built-in countdown to self-destruction, the doughnut is simple—and its ingredients cheap—says Gerson. She came to doughnuts as an outsider herself, but then she mastered dough, frying, glazes, and toppings like almost no one else. The meticulous testing she did to gain that expertise makes her the ideal guide for bringing the great American doughnut—sugar-covered or filled, ring-shaped or twisted—home with us. Here’s how to make your own.

1. Cake Doughnuts

1_Cake Dough

A cake doughnut has the texture and ingredient list of a coffee cake. That’s flour, sugar, leavening (both baking soda and powder), salt, eggs, butter, and liquid (which, for many cake doughnuts, is buttermilk). The farmers’-market favorite cider doughnuts call for cider, obviously; but to get a real apple flavor, boil a ½ cup of cider until reduced to 2 tablespoons of essential apple flavor, then round out the liquid with buttermilk again. You’ll also see chocolate-cake doughnuts, which use cocoa powder.

The process here follows regular cake-making, too. For 10 doughnuts and accompanying holes, beat 2 tablespoons butter and a ½ cup sugar together, before adding ¼ cup buttermilk and reduced cider and finishing by incorporating the dry ingredients (1¾ cups flour, 1 teaspoon baking powder, ½ teaspoon baking soda, ¼ teaspoon salt, and pinches of cinnamon and nutmeg). Cake-doughnut dough is sticky and thick. To tame it, flour your hands and pat your batch down on a parchment-lined baking sheet. Then, store in the refrigerator or freezer for at least half an hour before trying to cut out doughnuts. Chill the cut-outs again before you fry.

2. Yeast Doughnuts

2_Yeast DoughA yeast doughnut puffs dramatically when it fries, a rising process that starts when you add yeast and warm milk to a dough that also calls for flour and eggs but almost no sugar, because a yeast doughnut is almost savory. “It should have just a hint of sweetness and a balance of flavors,” says Gerson, like “a seasoned bread.” You can achieve sublime doughnuts without high-end flour and eggs, according to Gerson, so don’t splurge unless it’s on a good high-fat butter. Instead, the character of yeast doughnuts comes mainly from the yeast; leave time for it to do its work.

If you don’t have grandma’s recipe, here’s how to make a dozen yeast doughnuts: Warm 2 tablespoons butter, ¾ cup milk, and 2 tablespoons and 2 teaspoons of water together, then add these ingredients to a bowl where you’ve mixed together 2½ cups flour, 1½ teaspoons dry active yeast, 1 tablespoon sugar, pinches of nutmeg and cinnamon, and ½ teaspoon salt. Beat this well with a spatula or the dough hook on an electric mixer, then add an egg and mix again. Continue mixing with the dough hook or well-floured hands until you’ve kneaded the dough into a cohesive, uniform mass. Set it aside in a covered, oiled bowl until it’s doubled in size, which should happen in an hour in a warm place—but not too warm! Don’t keep the bowl too close to the oven, since too much heat will kill the yeast. You can also own the schedule by letting the dough rise all night in the refrigerator so you can shape and fry first thing in the morning. Once risen, press or roll the dough out until it’s a ½-inch thick.

3. Seasoning the Dough

3_SeasoningBeneath their glazes, sprinkles, and crumb topping, doughnuts are kind of plain. That’s okay, it’s part of who they are. You can combat potential dullness with pinches of this and that. When seasoning, consider the final use of the dough, and build up a profile from the beginning. “If you use any flavoring, use fresh [ingredients],” says Gerson. A jelly doughnut goes well with just-grated citrus zest in its dough. A cider doughnut wants cinnamon. Even a basic glazed doughnut needs a morsel of something. Gerson often opts for ground nutmeg and vanilla.

4. Cutting the Dough

4_Cutting Yeast DoughnutsThe hardest part of doughnut creation entails fiddling around with dough that can be sticky, stretchy, and a little finicky. You have three lifelines in making this work. First, temperature: Make sure your kitchen’s not too hot in the first place, and if you’re having a lot of trouble, give the dough a short vacation in the fridge. Second, time: especially with yeast dough, a couple of minutes of hands-off time can allow the dough to relax and become workable again. A good time for a rest is after you’ve pressed or rolled it out but before cutting. Third, flour: keep your hands, your surfaces, and your cutters coated in flour to prevent sticking. Flour will burn in the oil when you fry, though, so don’t go totally nuts.

You want dough to be about ½-inch thick when you go to cut out the shapes. Then, cut out doughnuts with a doughnut cutter, which will guarantee perfectly centered holes, or you can use two circle cutters—one big (3 to 3½ inches), one small (1 inch). You can also improvise with circular objects in your kitchen, like jar lids and shot glasses. Be patient, and don’t worry if you stretch out your circles when you cut them. During frying, everything evens out. “Have fun with it,” says Gerson. “You’re making doughnuts!”

5. Frying

5_FryingLet’s not even talk about baked doughnuts. “To me, doughnuts by definition are fried,” says Gerson. “It’s a fried dough.” To fry, you’ll need a lot of neutral-flavored oil like canola, a quart or maybe two, depending on the size of your pot. Fill the pot until there are 2 to 3 inches of oil in it. Bring the oil up to about 375°F—a thermometer, obviously, is useful. Then cook the doughnuts and holes a few at a time, being careful not to crowd the pot, which will lower the oil temperature. A slotted spoon or spider is helpful for flipping and removing the doughnuts. If the oil is the right temperature, the doughnuts should cook 1 to 2 minutes per side before puffing and turning golden. But don’t rely on that timing. “Use your instinct,” urges Gerson. “Don’t just follow the recipe. Feel it.” You’re cooking with hot oil, after all, so you’ve got to pay attention and react. Adjust the heat if the doughnuts are cooking too quickly or too slowly.

Gerson likes to let the doughnuts drain on brown paper bags, which absorb oil even better than paper towels, the next best alternative. Once drained, move the doughnuts to a rack to finish cooling.

6. Other Shapes

6_ShapesDoughnuts don’t have to be ring-shaped. Doughnut holes are your first step in branching out, and they happen naturally when you make regular doughnuts. Other shapes to consider at home are rectangles for Long Johns (no round cutters needed!) and hole-less circles for filled doughnuts like Boston Crème, lemon, or jelly. For complicated French crullers, you’ll need to pipe the yeast dough, which can be a pain, but cake doughnut dough is easier to shape into twists or logs.

7. Glazes

7_GlazingThere are two kinds of glazes to play with: the clear, sweet, all-over type that coats Krispy Kremes, and thicker, frosting-style glazes that sit on top (think a Dunkin’ Donuts chocolate with sprinkles).

For the plain, you want to brush or pour the stuff on when the doughnuts are warm. To make the glaze, stir together about ½ cup powdered sugar with about 2 tablespoons of milk or cream, adjusting as needed. For the thicker glazes that garnish the top, wait until the doughnuts have hit room temperature. Make a good chocolate glaze by melting semi-sweet chocolate, milk, and butter together, then adding powdered sugar until you reach a spreadable consistency. Gerson likes to keep her toppings all natural, tapping hibiscus flowers, for example, for pink glaze. I, on the other hand, couldn’t resist not-so-natural rainbow sprinkles. Get inspired by your favorite flavors when you go to glaze, and finish things off with something crunchy, like cookie crumbs, toasted almonds, toffee bits, or poppy seeds.

8. Sugar Coating

8_Sugar CoatingYou’ll often see cider doughnuts covered in cinnamon sugar. You don’t really need this, since cake-style are already so sweet. But you can do it anyway, and on yeast doughnuts, a sugar coating is truly the best. Combine about ¼ cup for sugar with ½ a teaspoon of cinnamon in a shallow bowl, then Gerson recommends doing two coatings. Dredge the doughnut through the sugar first while it’s still warm, so the sugar melts and then glues onto the second coating, applied a few minutes later. Powdered sugar is another option; wait until the doughnuts are more or less room temperature to sift sugar over both sides.

9. Filling

9_FillingWhen yeast doughnuts cook, they naturally develop air pockets, and if you haven’t made a hole in your doughnut, you can fill that void with jelly, pastry cream, lemon curd, whipped cream, or chocolate pudding. Except for jelly, make your fillings from scratch, since you’ve already gone to the trouble of preparing homemade doughnuts. Wait until the doughnuts are cool to fill them, then fit a pastry tip on a pastry bag, or improvise with a sandwich bag with one of the corners snipped. Use a sharp knife to cut a hole in the side of the doughnut, then start pumping until you feel the doughnut grow really heavy in your hand. “I take it to the extreme: how much can it take?” says Gerson. “You don’t want to keep looking for the filling.”

10. Leftovers

10_LeftoversLook, a doughnut isn’t going to be bad the next day. Day-olds are still sweet, rich, and bready. Commercial doughnuts often contain stabilizers that keep them springy on day two, but your additive-free homemade pastries just won’t last. There are things to do with them, though. With an unglazed yeast doughnut, you can make killer croutons for salads, says Gerson. In summer, doughnut pieces can become the topping of a sundae or the mix-in of a concrete, and in winter, they’re the perfect base for a ridiculously rich bread pudding.