Rainbow Cake has 6 colorful layers stacked between luscious buttercream frosting. This gorgeous cake is a showstopper, and it tastes amazing too.

Once you slice into this Rainbow Layer Cake, you will see all the stunning layers. With 6 colorful layers, it is such a pretty cake recipe. This cake would be perfect for a rainbow themed birthday party, St. Patrick’s Day or any special occasion.
We love to make cakes and also enjoy Hummingbird Cake, Margarita Cake, Mardi Gras King Cake Recipe, Honey Bun Cake Recipe and Easy Homemade Zucchini Cake Recipe.
Table of contents
Why We Love This
The recipe starts with a cake mix so it is very easy to make. The frosting is homemade buttercream, and this white frosting is rich and delicious. Top the cake with rainbow sprinkles if desired for an extra special touch!
Another fun and colorful treat is Easy Rainbow Sugar Cookies for more birthday desserts. If you like bundt cakes, try Crack Cake Recipe.

Ingredients
Cake
- White Cake Mix. Any brand is fine.
- Large eggs. Room temperature eggs so it blends together and cooks evenly.
- Rainbow Colors of Gel Food Coloring. You can use any selection of colors you desire.
Frosting
- Butter. Softened at room temperature.
- Vanilla Extract. Clear is suggested so the frosting does not change in color.
- Confectioners Sugar. Sift before using so it’s smooth. You might find this called icing sugar but it’s the same thing.
- Milk. Whole milk is recommended for richness.
- Rainbow Sprinkles. Optional but looks so festive.
Find the entire ingredients list at the bottom of the page.
Variations
- Store bought frosting. If you want to save more time, use store bought frosting instead of homemade in this recipe.
- Different colors of layers. You can make this any color you want. It would be fun to do red and green at Christmas, different shades of purple for someone’s favorite color and more. The ideas are endless for this rainbow layer cake.
- Different colors of frosting. We used white but you can use any color you prefer in this recipe.
How to Make Rainbow Cake
- Step 1. Preheat the oven and prepare the cake pans. Preheat the oven to 350 degrees and spray the round cake pans with cooking spray. You can also line with parchment paper.

Step 2. Combine the cake ingredients. In a large bowl, beat with a hand mixer or a stand mixer. Use medium speed to whisk together the cake mixes, water, oil and eggs until the mixture is smooth and creamy.

Step 3. Divide the cake batter. Then divide the batter evenly into 6 small bowls. Use the gel food coloring to dye each bowl of icing a different color of the rainbow. I used red, orange, yellow, green, blue and purple.

Step 4. Chill a portion of the batter. Refrigerate 3 colors of the batter and pour the remaining 3 colors each into a separate baking pan.

Step 5. Bake the cake. Bake for 18-20 minutes until a toothpick inserted into the middle comes out clean. Allow to cool on a wire rack and remove from the pan. Use a serrated knife to trim the cake layers so they are level.

Step 6. Make the frosting. In a large bowl, cream the butter until smooth with an electric mixer. Gradually add the powdered sugar and beat on low speed until well combined. Then stir in the vanilla and milk.

Step 7. Start adding frosting. Place the purple layer on a large cake plate or cake stand. Spread a layer of the frosting on top of this cake.

Step 8. Continue with all the layers. Repeat this process with the blue layer, green, yellow, orange and red cakes.

Step 9. Add remaining frosting. Start with a thin layer of frosting on the sides of the cake. Spread the crumb coat with an offset spatula and then add remaining frosting. Decorate the top as desired with the rainbow sprinkles.
Storage
Refrigerate the leftover cake, covered, up to 5 days. How Long Does Birthday Cake Last?
Pro Tips
- Make the layers level. If your cake is domed shaped once you bake it, level the cake with a serrated knife. This will help the layers to stack evenly.
- Allow the layers to cool. The layers need to cool completely before adding frosting or it will slide off.
- Room temperature butter. The frosting will combine smoother if the butter is room temperature. Cold butter will make the frosting lumpy.
- Don’t overmix the cake batter. Combine the cake ingredients until just combined. Mixing the ingredients excessively will make the cake dense instead of soft and fluffy.
- Allow to cool before removing from pan. The cake needs to cool slightly before removing from the pan. This will help it to come out easier and not fall apart.
- Adjusting the colors of the cake. You can add as much or as little food coloring as you prefer. The colors can be as vibrant or as faint as you desire.
- Remove any excess frosting. As you frost the layers, remove the excess frosting so you have a clean edge when you frost the outside.
- Divide the batter evenly. Make sure that you divide the batter evenly between all of the cake pans. You do not want varying sizes of cake layers.

Frequently Asked Questions
If you only have 3 pans, make the cakes in batches. Bake the 3 cake layers first. Then wash the pans and reuse the same pans.
Use cake pans that are all the same brand and size. You do not want to use various brands.
They may not be the same size and the layers will be uneven. This will cause the cake to lean.
Use gel food coloring for the prettiest most vibrant colors.
Yes, you can make the cake layers in advance. However, it is best to assemble the cake when ready to serve. Make each cake layer up to 2 to 3 days in advance.
Wrap each layer securely in plastic wrap and store in the refrigerator. Add the icing to the layers and assemble the cake when ready to serve. See How Long Does Cake Last in the Fridge.
You can freeze the unfrosted cake layers up to 3 months. Wrap in plastic wrap and foil. Place in the freezer. Make sure it is completely cool before freezing.
Allow to thaw in the refrigerator overnight when ready to use. Then decorate as normal.
Another option is to freeze the cake completely frosted and decorated. If you have leftovers, freeze the slices up to 3 months.
We prefer to flash freeze the slices on a baking sheet for 1 to 2 hours. Then wrap in plastic wrap and foil to freeze. The extra step of flash freezing will keep the icing intact, and the cake will still look great.
More Easy Cake Recipes
- Carrot Cake Recipe
- Ding Dong Cake
- Strawberry Lemonade Bundt Cake
- Butterscotch Cake Recipe
- Punch Bowl Cake
- Atomic Cake
Suprise your friends and family with this stunning rainbow cake recipe at your next party or function. Please leave a comment once you make this gorgeous dessert. I love hearing from you.
Rainbow Cake
Ingredients
For the Cake:
- 2 boxes White Cake Mix
- 2 cups Water
- 1 cup Vegetable Oil
- 6 large eggs
- Rainbow Colors of Gel Food Coloring
For the Frosting:
- 2 cups Butter softened
- 2 tsp Clear Vanilla Extract
- 8 cups sifted Confectioners Sugar
- 4 Tbsp Milk
- Rainbow Sprinkles optional
Instructions
For the Cake:
- Preheat the oven to 350 degrees Fahrenheit and spray 3 (8 inch) round cake pans with a non-stick cooking spray.
- In a large bowl, beat with a hand held mixer or a stand up mixer the cake mixes, water, oil and eggs until the mixture is smooth and creamy.
- Then divide the batter evenly into 6 small bowls (should be approximately 1 ½ cups of batter in each bowl). Use the gel food coloring to dye each bowl of icing a different color of the rainbow. I used red, orange, yellow, green, blue and purple.
- Refrigerate 3 colors of the batter and pour the remaining 3 colors each into a separate baking pan.
- Bake for 18-20 minutes until a toothpick inserted into the middle of the cake comes out clean.
- Let the cakes cool for 10 minutes and then carefully remove from the pans and allow them to cool completely on wire racks.
- Wash the cake pans. Re-spray for non-stick cooking spray and pour the remaining colors of the batters into the pans. Bake the same as you baked the 1st 3 colors. Let them cool completely.
For the Frosting:
- In a large bowl cream the butter until smooth.
- Beat in the confectioners sugar (one cup at a time) on low speed until well combined.
- Stir in vanilla and milk. Whip until thoroughly mixed and fluffy on a medium-high setting.
To Assemble:
- Use a serrated knife to trim the cake layers to make sure that both of the cakes are leveled.
- Place the purple cake on a large plate or cake stand.
- Spread a layer of the frosting on top of this cake.
- Repeat this process with the blue, green, yellow, orange and red cakes.
- Then frosting the sides of the cake and decorate the top as desired with the rainbow sprinkles.
- Then the cake is ready to slice, serve and enjoy!