Zimt

Pencil Cake Recipe: Fun Back-to-School Dessert

· 6 min read · Cakes

In this article
  1. Ingredients
  2. Instructions
  3. Tips
  4. Serving Suggestions
  5. Variations
  6. Storage and Reheating
  7. Frequently Asked Questions

This pencil cake is a playful, nostalgic dessert that looks like a giant pencil on a plate. It's a moist vanilla sheet cake, cut and arranged to resemble a pencil, then frosted with buttercream in classic yellow, pink, and gray. The cake is easy to assemble, uses simple ingredients, and is a guaranteed hit for back-to-school parties, teacher appreciation days, or any occasion that calls for a bit of whimsy.

Serves 12 · Prep 45 min · Cook 30 min · Total 1 hr 45 min

Ingredients

  • 2 ½ cups (300 g) all-purpose flour
  • 2 ½ tsp baking powder
  • ½ tsp salt
  • 1 cup (226 g) unsalted butter, softened
  • 1 ¾ cups (350 g) granulated sugar
  • 4 large eggs, at room temperature
  • 1 tbsp vanilla extract
  • 1 cup (240 ml) whole milk, at room temperature
  • For the buttercream:
    • 1 ½ cups (340 g) unsalted butter, softened
    • 4 cups (480 g) powdered sugar
    • 2 tbsp heavy cream (or milk)
    • 1 tsp vanilla extract
    • Yellow, pink, and gray (or black) gel food coloring

Instructions

  1. Preheat your oven to 350°F (175°C). Grease and flour a 9x13-inch baking pan, or line it with parchment paper for easy removal.
  2. In a medium bowl, whisk together the flour, baking powder, and salt. Set aside.
  3. In a large bowl, using an electric mixer, beat the butter and sugar together until light and fluffy, about 3 minutes. Add the eggs one at a time, beating well after each addition. Mix in the vanilla extract.
  4. With the mixer on low speed, add the dry ingredients in three additions, alternating with the milk, starting and ending with the dry ingredients. Mix just until combined—do not overmix.
  5. Pour the batter into the prepared pan and smooth the top. Bake for 28–32 minutes, or until a toothpick inserted into the center comes out clean. Let the cake cool in the pan for 10 minutes, then turn it out onto a wire rack to cool completely.
  6. While the cake cools, make the buttercream. In a large bowl, beat the butter until creamy. Gradually add the powdered sugar, then the cream and vanilla, and beat until light and fluffy, about 3 minutes. If the frosting is too thick, add a little more cream; if too thin, add more powdered sugar.
  7. Divide the frosting into three bowls. Color one portion yellow (for the pencil body), one pink (for the eraser), and one gray (for the metal ferrule and the tip).
  8. Once the cake is completely cool, cut it in half crosswise, so you have two 6.5x9-inch rectangles. Place one rectangle on a serving board or platter.
  9. Take the second rectangle and cut it diagonally from one corner to the opposite corner, creating two triangles. These will form the pointed tip of the pencil.
  10. Position the two triangles on one short end of the whole rectangle, with their pointed ends meeting at the center, to create a pencil point. You may need to trim the triangles slightly to fit neatly.
  11. Frost the entire assembled cake with a thin crumb coat of yellow frosting, then refrigerate for 15 minutes to set.
  12. Apply a thicker layer of yellow frosting over the main body of the pencil. Use the pink frosting to cover the opposite short end (the eraser). Use the gray frosting to create a band where the eraser meets the body, and also to cover the pointed tip.
  13. For a realistic look, use a toothpick or a small offset spatula to create subtle lines in the yellow frosting, mimicking the facets of a pencil. You can also add a few gray lines on the tip to suggest the wood grain.
  14. Refrigerate the cake for at least 30 minutes to let the frosting set before slicing. Use a sharp knife dipped in hot water for clean cuts.

Tips

  • Substitutions: You can use a boxed white or yellow cake mix for a shortcut—just bake it in a 9x13-inch pan according to the package directions. For the frosting, cream cheese frosting works well in place of buttercream.
  • Storage: This cake keeps well in the refrigerator for up to 4 days. Bring it to room temperature for about 20 minutes before serving for the best flavor and texture.
  • Common mistake: Don't skip the crumb coat—this thin layer of frosting traps crumbs and ensures a smooth final finish. Also, make sure the cake is completely cool before frosting, or the buttercream will melt.
  • Coloring: Use gel food coloring for vibrant colors without thinning the frosting. If you don't have gray, mix black and a tiny drop of blue.

Serving Suggestions

Serve the pencil cake as the centerpiece at a back-to-school party, a teacher appreciation luncheon, or a graduation celebration. Pair it with a glass of cold milk, coffee, or a scoop of vanilla ice cream. For a fun touch, add a few chocolate “pencil shavings” (made by grating chocolate curls) around the base of the cake.

Variations

  • Chocolate Pencil: Use a chocolate cake recipe and chocolate buttercream for the body, with a pink eraser and gray tip.
  • Red Pencil: Color the body frosting red instead of yellow for a classic red pencil look.
  • Mini Pencils: Bake the cake in a 9x13-inch pan, cut into individual rectangles, and shape each into a small pencil. Perfect for party favors.
  • Add a “Lead” Tip: Use a small piece of black licorice or a dark chocolate triangle to make the very tip of the pencil look like a graphite point.

Storage and Reheating

Store the frosted pencil cake in an airtight container in the refrigerator for up to 4 days. Because the cake is frosted, it doesn't need reheating—in fact, it's best served at room temperature. If you have unfrosted cake scraps, they can be frozen for up to 2 months in a freezer-safe bag. Thaw overnight in the refrigerator before using.

Frequently Asked Questions

Can I make this cake ahead of time? Yes, you can bake the cake and make the frosting a day in advance. Store the unfrosted cake wrapped in plastic wrap at room temperature, and the frosting in an airtight container in the refrigerator. Let the frosting come to room temperature and re-whip it before assembling.

How do I get clean slices? Use a long, sharp knife and wipe it clean between each cut. Dipping the knife in hot water and drying it before slicing helps the knife glide through the frosting without dragging.

Can I use a different pan size? A 9x13-inch pan is ideal for this recipe. If you only have a 9x9-inch pan, you'll need to double the baking time and adjust the assembly—the cake will be thicker, so you'll have to cut it more carefully to fit the pencil shape.

My frosting is too runny. What should I do? This usually happens if the butter was too soft or if you added too much liquid. Chill the frosting in the refrigerator for 15–20 minutes, then re-whip it. If it's still runny, add more powdered sugar, a tablespoon at a time, until it holds its shape.

Can I use a store-bought frosting? Absolutely. You'll need about 3 cups of vanilla frosting. Color it as directed—just be aware that store-bought frosting is often softer, so you may need to chill it longer before piping or spreading.

How do I make the pencil look more realistic? After frosting, use a toothpick to draw fine lines lengthwise along the yellow body to mimic the ridges of a pencil. You can also dust the gray tip with a little cocoa powder or black food coloring to give it a graphite sheen.