Desserts
This pie in a cake recipe reimagines dessert as a warm, layered masterpiece where cake and pie filling dance together in perfect harmony.
The secret lies in a tender vanilla cake base that absorbs rich custard filling, creating bites that are both cakey and creamy—like a slice of warm pie with the structure of cake. I developed this recipe after years of experimenting with hybrid desserts, and it never fails to impress.
What makes this recipe special is the balance of textures: a moist, fluffy cake that stays tender even after baking, paired with a velvety vanilla custard filling that stays warm and gooey.
The filling is infused with real vanilla bean for depth, while the cake's subtle sweetness lets the custard shine. It's the kind of dessert that feels indulgent but isn't overly heavy—perfect for gatherings or a cozy night in.
By the time you pull it from the oven, you'll have golden layers of cake separated by pools of custard that look like molten caramel. The edges stay crisp while the center remains soft and inviting, with every bite offering that magical contrast between cake and pie.
This is dessert redefined—elegant enough for company but simple enough for weeknights.
The best part? It bakes in one pan, so cleanup is minimal, and the filling stays warm longer than traditional pie. Serve it slightly warm with whipped cream or a scoop of ice cream for the ultimate comfort. Let's get started on this showstopper dessert.
Ingredients for pie in a cake
Golden cake layers hugging velvety custard pools—this dessert is pure magic in every bite.
| Ingredient | Amount | Notes |
|---|---|---|
| All-Purpose Flour 🌾 | 2 ½ cups | Sifted for fluffy texture |
| Granulated Sugar 🍚 | 1 ½ cups | White or light brown |
| Unsalted Butter 🧈 | 1 cup | Room temperature, full-fat |
| Large Eggs 🥚 | 3 whole | Room temperature, beaten |
| Pure Vanilla Extract 🌿 | 2 tbsp | Or 1 vanilla bean scraped |
| Baking Powder 🧂 | 2 tsp | Aluminum-free preferred |
| Salt 🧂 | ½ tsp | Fine sea salt |
| Whole Milk 🥛 | 1 cup | Room temperature |
| Heavy Whipping Cream 🥛 | 1 cup | Full-fat for custard |
| Large Egg Yolks 🥚 | 4 whole | Separated from whites |
| Granulated Sugar 🍚 | ¾ cup | For custard filling |
| Vanilla Bean 🌿 | 1 whole | Scraped seeds only |
| Cornstarch 🌾 | 2 tbsp | For thickening custard |
| Powdered Sugar 🍚 | 1 cup | For dusting layers |
| Whipped Cream 🍦 | 1 cup | Optional for serving |
The cake's secret is in the butter—full-fat, room-temperature is non-negotiable for that tender crumb. I always grab Land O'Lakes or Plugrá from the store's dairy case, but any good brand works. The vanilla? Real vanilla bean makes all the difference—split it lengthwise, scrape the seeds, and save the pod for next time. For the custard, egg yolks are essential—they create that silky texture. If you're nervous about separating them, use a bowl and whisk over a glass jar (the yolks won't slip through!). The custard also needs heavy cream—don't skimp here, or it'll turn out thin and watery.
No vanilla bean? Pure vanilla extract works in a pinch, but you'll miss that floral depth. Running low on powdered sugar? Sifted granulated sugar is a 1:1 swap, though it'll be slightly grainier. The custard thickens with cornstarch, but if you've got arrowroot powder, use half the amount. For the cake, baking powder is crucial—Rumford or Clabber Girl are my go-tos, but check the expiration date. Fresh is always better. And if you're feeling fancy, swap the powdered sugar dusting for flaky sea salt—trust me, it's a game-changer.
This dessert is best served warm, straight from the oven, with pools of custard oozing out of every slice. Store leftovers in an airtight container for up to 3 days in the fridge, but reheat gently—microwave blasts turn the custard rubbery. For parties, assemble it a day ahead and refrigerate. The flavors meld beautifully overnight, and the custard sets up just enough to hold its shape. Freeze individual slices for up to 2 months—just thaw at room temperature before serving. And if anyone asks, whipped cream is optional but highly recommended—it's the perfect contrast to the warm, custardy layers.
Why You'll Love This Recipe
- No Mixer Needed: I swear by this recipe when my hands are full—just cream butter and sugar by hand, crack in eggs, and fold. The butter’s cold, so it stays flaky even if I rush, and the vanilla cuts through the sweetness without overpowering.
- Vanilla Buttercream Magic: That rich, buttery crumb? It’s like pie filling in cake form. The sugar caramelizes just enough to taste like a warm slice of apple pie, but with the texture of a moist vanilla sheet cake. Honestly, I’ve been called “cake whisperer” for this one.
- Weeknight or Dessert Party: Same batter, endless uses—layer it with whipped cream for breakfast, slice it for lunch with a scoop of ice cream, or serve it at a potluck where no one will guess it’s not a traditional pie. (Yes, even on a Tuesday night.)
- Half-Baked Leftovers: The cake keeps for days in the fridge, and the flavor only gets better. I’ll take slices straight from the pan, let them cool, and pack them for work—no reheating needed. Budget-friendly too: this uses pantry staples and stretches for gatherings.
Step-by-step instructions for warm vanilla layers that melt like magic
This dessert combines cake and pie into one showstopping treat—creamy custard layers between tender vanilla cake that bakes together beautifully.
Bake the Vanilla Cake Layers
Preheat your oven to 350°F and grease two 8-inch round cake pans. In a large bowl, whisk together the 2.5 cups all-purpose flour, 1.5 cups granulated sugar, 2 tsp baking powder, and 0.5 tsp salt. Set aside.
In a separate bowl, cream the 1 cup unsalted butter until light and fluffy, about 3-4 minutes. Add the 3 whole eggs one at a time, mixing well after each addition. Stir in the 2 tbsp pure vanilla extract and 1 cup whole milk until smooth. Gradually fold in the dry ingredients until just combined—don't overmix.
Divide the batter evenly between the prepared pans and bake for 20-25 minutes or until a toothpick inserted into the center comes out clean. Let the layers cool in the pans for 10 minutes before transferring to a wire rack to cool completely. This cooling step prevents the custard from making the cake soggy later.
Prepare the Vanilla Custard Filling
In a medium saucepan, whisk together the 4 whole egg yolks, 0.75 cup granulated sugar, and the seeds scraped from the 1 whole vanilla bean. Slowly pour in the 1 cup heavy whipping cream while whisking constantly to prevent curdling.
Place the saucepan over medium heat and cook, stirring constantly with a wooden spoon, until the mixture thickens enough to coat the back of the spoon, about 5-7 minutes. The custard should reach 170°F on an instant-read thermometer. Immediately remove from heat and stir in the 2 tbsp cornstarch to help stabilize the texture.
Press a piece of plastic wrap directly onto the surface of the custard to prevent a skin from forming, then refrigerate for at least 2 hours or until completely chilled. This chilling step is crucial for clean layers when assembling the dessert.
Assemble the Layers with Powdered Sugar
Once the cake layers are completely cool, level the tops if needed. Place one layer on a serving plate and spread a thin layer of the chilled custard over the top. Dust generously with 1 cup powdered sugar—this creates that signature "pie in a cake" texture when sliced.
Repeat with the second cake layer, spreading the remaining custard and dusting with more powdered sugar. The powdered sugar will melt slightly when warm, creating that magical custard effect between each bite. For an extra touch, top with the 1 cup whipped cream and serve immediately or refrigerate for up to 4 hours before serving.
Warm and Serve for the Ultimate Experience
For the best results, serve this dessert slightly warm. If chilled, slice and warm individual portions in the microwave for 10-15 seconds or until the custard begins to soften. The contrast between the warm custard and cool cake layers is what makes this dessert truly special.
Slice through the center to reveal those beautiful custard layers that melt in your mouth. Each bite delivers tender cake, creamy vanilla custard, and that perfect powdered sugar finish. The secret to this recipe is patience—letting the custard chill completely and assembling carefully ensures clean layers every time.
Pro Tips For Making Pie In A Cake
- CHILL THE BUTTER FIRST: I learned this the hard way—trying to cut cold butter into flour when it’s still too soft leads to greasy lumps instead of flaky layers. Pop that butter in the fridge for 20-30 minutes before starting, or even better, freeze it for 10 minutes and chop it into tiny pea-sized pieces. Your future self will thank you when the texture is light, not dense.
- WEIGH YOUR FLOUR LIKE A PRO: Scooping flour from the bag packs it down, and that’s how you end up with a cake that’s more brick than pie. Use a kitchen scale and measure by weight—1 cup of all-purpose flour is about 120 grams, but scooping gives you closer to 150 grams. If you’re stuck with volume, spoon the flour into the cup, then level it off with a knife. Precision here keeps the crumb tender.
- DON’T OVERMIX THE BATTER: I was skeptical until I tried it: pie in a cake relies on a delicate balance, and overmixing develops gluten faster than you’d think. Mix the dry ingredients first, then cut in the butter until it’s just combined with pea-sized crumbs. When you add the eggs and vanilla, stop mixing as soon as the batter comes together—lumps are fine. Overworking it turns your pie-cake into a tough, chewy mess.
- BAKE IN TWO STAGES: This isn’t the prettiest method, but it’s the tastiest: bake the cake layer at 350°F (175°C) for 12-15 minutes until the edges are set but the center still jiggles slightly. Then, reduce the heat to 300°F (150°C), add the pie filling, and finish baking. The lower temp prevents the filling from curdling or the cake from overbrowning—especially if you’re using a custard or fruit filling that needs gentle heat.
Essential equipment for pie in a cake
Cake Pan Essentials
You’ll need two 8-inch round cake pans with removable bottoms for perfect layers. I recommend Wilton Perfect Results pans—they release cleanly and create even layers. If you only have one pan, bake the layers one at a time, spacing them 10 minutes apart to avoid oven temperature fluctuations.
For a rustic look, try springform pans—they’re easier to remove and add texture to the edges. 🧑🍳
Mixing Tools
A stand mixer with a paddle attachment is ideal for creaming butter and sugar, but a hand mixer works too. For the custard, a whisk is essential—use a balloon whisk for smooth, lump-free results.
I also keep a small saucepan (2-3 quart capacity) for heating the custard, as it needs even heat distribution. A wooden spoon helps prevent scorching while stirring.
Baking Gear
An oven thermometer is a must—home ovens often run hot or cold. I use a Thermoworks Oven Thermometer to ensure 350°F accuracy. For cooling, a wire rack prevents soggy cake bottoms.
If you’re short on space, prop the pans on a cooling rack placed directly on the counter. A parchment-lined baking sheet also helps if you’re baking layers separately.
Custard Prep Tools
The custard requires precision, so grab a medium saucepan (preferably stainless steel) and a heatproof spatula for stirring. A fine-mesh sieve helps strain any lumps if needed. For chilling, I use shallow glass or ceramic bowls—they conduct cold evenly.
Pressing plastic wrap directly onto the custard surface prevents skin formation, and a small offset spatula makes spreading it between cake layers effortless. 🍮
Assembly Must-Haves
For dusting powdered sugar, a fine-mesh sieve or sifter ensures an even, cloud-like layer. A serrated knife levels cake tops neatly, while a long metal spatula helps transfer layers without crumbling.
To serve, I use a sharp chef’s knife for clean slices—angle it slightly to reveal those stunning custard layers. A damp towel wrapped around the knife prevents crumbs from sticking.
Serving Touches
Whipped cream deserves a piping bag with a star tip for elegant swirls, but a spoon works in a pinch. For presentation, a large serving plate (12-inch diameter) holds the dessert securely.
If reheating, a microwave-safe plate with a damp paper towel prevents drying. And for that final flourish, keep edible gold leaf or flaky sea salt on hand—both elevate the dish instantly. ✨
Nutrition facts
Frequently asked questions
Can I make this dessert in a single layer instead of two?
For a single-layer version, bake just one 8-inch cake pan and spread the custard directly on top. Dust with ½ cup powdered sugar and top with whipped cream. This works especially well for smaller gatherings or when you want a more dramatic presentation. The texture will be slightly different but still delicious!
Why does the custard need to chill before assembling?
The chilling step is crucial because warm custard will melt the cake layers, making them soggy. A fully chilled custard (2 hours in the fridge) stays stable when layered, creating those clean custard pools when sliced. Think of it like setting a pie filling—it needs to hold its shape until served.
What if I don't have vanilla bean? Can I use extract?
Yes, you can substitute 2 tbsp pure vanilla extract for the vanilla bean, but you'll lose some depth of flavor. For better results, use 1 tbsp extract + ½ tsp vanilla bean paste (if available). The bean's seeds contain natural compounds that enhance the custard's richness—extract alone is a good backup but not quite the same.
How do I fix runny custard in my dessert?
If your custard is too thin after baking, mix 1 tsp cornstarch with 1 tbsp cold water, then stir it into the warm custard. Cook for another 1-2 minutes until thickened. For assembled desserts, you can also sprinkle extra powdered sugar on top before serving—it'll melt slightly and help stabilize the custard layers.
Can I make this dessert ahead of time?
Yes! Assemble the dessert up to 24 hours ahead and refrigerate. The flavors meld beautifully overnight. When ready to serve, slice and warm individual portions in the microwave for 10-15 seconds to bring out the custard's warmth. For parties, this makes prep much easier—just reheat and serve!
