The first time I attempted Mary Berry’s rainbow cake, I seriously considered giving up halfway through. I had optimistically thought, “How tricky can it be to bake a few colourful layers and add some frosting?” Oh, how naïve I was.
By the third layer, things were already going sideways. One came out dry as a biscuit, another turned a swampy shade of green thanks to a colouring misjudgment, and I discovered—too late—that my fridge couldn’t fit the fully assembled cake.
Still, I pushed through—and I’m so glad I did. Once you settle into the rhythm of baking, cooling, and repeating, it all starts to click. The final result? A true showstopper. But more importantly, it tastes every bit as amazing as it looks. Let me share what I learned the hard way, so your masterpiece doesn’t resemble a wobbly Leaning Tower of Rainbow.
What Makes This Recipe Special
Sure, the colours are fun—but that’s not what sets this rainbow cake apart. The real magic lies in the sponge. It’s light yet sturdy enough to support six vibrant layers without collapsing into a sugary mess. Paired with a tangy cream cheese frosting, it strikes a perfect balance between sweet and satisfying.
Unlike most rainbow cakes, which often sacrifice flavour and texture for visual appeal, Mary Berry’s version delivers on all fronts. It’s fluffy, flavourful, and surprisingly forgiving—even if you forget to level one of the layers (guilty as charged).
And here’s a pro tip: using buttery spread straight from the fridge is a total game-changer. It creams beautifully without the hassle of waiting for it to soften.
Ingredients & Why They Matter
-
Buttery spread (375g) – Surprisingly easy to work with cold. It gives the sponge a soft, tender crumb without making it greasy. I tried regular butter once—too stiff and tricky to mix.
-
Eggs (6 total) – Essential for structure and richness. Let them come to room temperature so they blend more smoothly.
-
All-purpose flour (375g) – Provides the necessary stability for stacking. Avoid self-raising flour—it throws off the texture due to the extra leavening.
-
Gel food colouring – Use gel or paste for bold, vibrant hues. Liquid food colouring can thin the batter and bake into dull tones.
-
Full-fat cream cheese (275g) – No low-fat substitutes here—it’ll make your frosting runny and disappointing.
-
Confectioners’ sugar (750g) – Sift it! Lumpy frosting is nearly impossible to rescue once it’s mixed.
Making It Yours (Without Ruining It)
-
Egg-free? I’ve tested it with an egg replacer—it worked, but the texture was a bit gummy. You’re better off using a dedicated eggless sponge recipe and colouring that.
-
Gluten-free? I haven’t fully tested this version, but a 1:1 gluten-free flour blend should work. Just expect a more delicate crumb.
-
Prefer pastel layers? Use less food colouring gel for a softer, spring-like palette instead of bold rainbow stripes.
-
No cream cheese on hand? Go with classic buttercream. Add a pinch of salt and a splash of lemon juice to cut the sweetness.
| What Went Wrong | Why It Happens | How to Fix It |
|---|---|---|
| Uneven layers | Eyeballing the batter amounts | Weigh the batter for each colour |
| Layers dried out | Overbaked by even 2–3 minutes | Check at 13 mins, not just 15 |
| Frosting turned soupy | Used low-fat cream cheese | Only use full-fat, and beat it cold |
| Cake leaned sideways | Stacked on a slanting board | Level layers + use a spirit level |
How to Make Mary Berry’s Rainbow Cake
-
Prep Your Tins
Preheat the oven to 180°C (160°C fan). Grease and line two 8-inch round cake tins. You’ll be baking in batches, so keep these tins ready for re-use. -
Make the Batter
In a large bowl, beat the buttery spread and sugar together until light and fluffy. Add the eggs one at a time, mixing well after each addition. Sift in the flour, baking powder, and salt. Stir in the vanilla extract and milk until smooth. -
Divide and Colour
Weigh your total batter and divide it evenly into six bowls. Tint each batch with gel food colouring, using a cocktail stick to add colour gradually until you get your desired shades. -
Bake in Batches
Bake two coloured layers at a time for about 15 minutes, or until a skewer comes out clean. Transfer to wire racks to cool. Don’t forget to re-grease and re-line your tins before each batch. -
Make the Frosting
Beat the butter and milk with half the confectioners’ sugar until smooth. Add the remaining sugar, vanilla, and cold full-fat cream cheese. Beat just until the frosting is fluffy—overmixing can make it loose. -
Assemble the Layers
Starting with violet and working up to red, stack the cake layers with a thin layer of frosting in between each. Apply a light crumb coat over the entire cake to seal in loose crumbs. -
Chill
Refrigerate the cake for about 20 minutes to let the crumb coat firm up. -
Final Frost and Decorate
Apply a smooth final coat of frosting using a cake scraper. Finish with a generous sprinkle of nonpareils or your choice of decorations.

Tips From My Kitchen
-
Cool cakes upside-down on a wire rack — it naturally flattens domed tops without needing to trim.
-
Red gel looking dull? Add a touch of pink to brighten the final baked colour.
-
Smooth frosting like a pro using an offset spatula dipped in hot water—just wipe it between swipes.
-
Frosting too soft? Pop it in the fridge for 10 minutes, then re-whip briefly to bring it back to life.
Storage + Serving
-
Room temperature: Keeps for up to 2 days in an airtight container in a cool spot.
-
Fridge: Lasts up to 5 days. Let it come to room temperature before slicing for the best texture.
-
Freezer: Freeze unfrosted layers wrapped tightly in cling film and foil. Assemble fresh for best results.
-
Serving idea: Pairs beautifully with a glass of cold milk or a strong cup of Earl Grey.
Frequently Asked Questions
Q: Can I use liquid food colouring instead of gel?
A: Best not. Liquid colouring can water down your batter and results in faded colours. Stick with gel or paste.
Q: My frosting keeps turning runny—what’s going wrong?
A: It’s likely your cream cheese. Always use full-fat, and keep it cold until mixing. Warm or low-fat versions won’t hold.
Q: Can I bake all six layers at once if I have enough tins?
A: Technically yes—but only if your oven distributes heat evenly. I prefer baking in batches for more control and consistency.
Q: Why does my cake lean or wobble?
A: Uneven layers or soft frosting are usually to blame. Trim domes and chill between stacking to keep everything stable.
Q: Can I make this ahead of time?
A: Definitely. I often bake the layers a day ahead, wrap them well, and frost fresh the next morning.
Try More Mary Berry Favourites:
-
Mary Berry’s Gingerbread Men
-
Mary Berry’s Doughnuts
-
Mary Berry’s Chocolate Mirror Cake
-
Mary Berry’s Death by Chocolate Cake
Ingredients
- For the Cake
-
6 eggs
-
375g (1¾ cups + 2 tbsp) granulated sugar
-
375g (1¾ cups) buttery spread, straight from the fridge
-
375g (3 cups) all-purpose flour
-
2½ tbsp baking powder
-
¾ tsp salt
-
3 tsp vanilla extract
-
3 tbsp milk
-
Food colouring paste or gel (in 6 different colours)
- For the Cream Cheese Frosting
-
375g (1 cup + 2 tbsp) salted butter, softened
-
3 tbsp milk
-
750g (4 cups) confectioners’ sugar, sifted
-
1½ tsp vanilla extract
-
275g (¾ cup + 1 tbsp) full-fat cream cheese
-
Nonpareils or sprinkles, to decorate
Directions
- Preheat oven to 180°C. Grease and line two 8-inch tins.
- Make batter: Cream butter and sugar. Add eggs. Fold in dry ingredients. Add vanilla and milk.
- Divide into 6 bowls. Tint each with gel colouring.
- Bake 2 layers at a time for 15 mins. Cool completely.
- Make frosting: Beat butter, milk, and half the sugar. Add rest of sugar, vanilla, and cream cheese.
- Stack cakes in rainbow order with frosting in between.
- Chill for 20 minutes.
- Apply final frosting layer and decorate.
Notes
- I cool my cakes upside-down on the rack—helps flatten domed tops without trimming.
- My red gel always bakes duller—so I add a smidge of pink to brighten it.
- I use an offset spatula dipped in hot water to smooth the final frosting layer.
- If your frosting’s too soft, pop it in the fridge for 10 minutes—then re-whip briefly.




