This Rainbow Cake is a colorful layered cake recipe that is perfect for birthdays, parties, St. Patrickโ€™s Day, and special celebrations. Made with vibrant rainbow cake layers and creamy homemade buttercream frosting, this easy cake recipe looks impressive but is simple to make.

We love making this rainbow birthday cake for kids because the bright colors make every celebration extra memorable and the recipe can easily be made ahead for parties.

Close up image of a slice of frosted rainbow cake.
Want to save this?
Just enter your email and I’ll send it right to you, plus great new recipes weekly!

Why You’ll Love This Recipe!

Carrie, the owner, with long dark hair, wearing earrings and a purple top, smiles at the camera in front of a textured, beige background.

We love making this Rainbow Cake for birthdays because it always surprises everyone when sliced. Even though it looks fancy, the recipe uses simple ingredients and boxed cake mix to keep things easy and stress-free for busy families.

  • Bright colorful layers inside every slice
  • Perfect for birthdays and parties
  • Kid-friendly baking project
  • Can be made ahead of time
  • Easy to customize with frosting and sprinkles

No matter the occasion, this cake always makes a great centerpiece dessert for your celebration!

Ingredients

Ingredients needed to make the recipe.
  • White Cake Mix – White cake mix creates bright rainbow colors because the batter stays light. Vanilla cake mix also works but may slightly affect the colors.
  • Rainbow Colors of Gel Food Coloring – Gel food coloring gives the cake vibrant colors without thinning the batter. A little goes a long way compared to liquid food coloring.
  • Butter – Use softened butter for smooth and creamy buttercream frosting.
  • Clear Vanilla Extract – Clear vanilla helps keep the frosting bright white for a cleaner rainbow look.
  • Confectioners Sugar – Sift the powdered sugar before mixing to help create fluffy frosting without lumps.

How to Make a Rainbow Cake

Step 1 – Heat Oven – Preheat the oven to 350 degrees Fahrenheit. Then spray 3 (8-inch) round cake pans with a non-stick cooking spray.  

Step 2 – Combine Cake Ingredients – In a large bowl, beat with a hand held electric mixer or a stand mixer. We use the paddle attachment. Combine the cake mixes, water, oil and eggs until the mixture is smooth and creamy.

Step 3 – Divide Cake Batter – Then divide batter evenly into 6 small bowls. There 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.

Making the cake and dividing batter into bowls.

Step 4 – Place in Fridge – Refrigerate 3 colors of the batter. Pour the remaining 3 colors each into a separate baking pan.  

Step 5 – Bake Cake – Bake for 18-20 minutes until a toothpick inserted into the middle of the cake comes out clean.  

Step 6 – Cool Cakes – Let the cakes cool for 10 minutes. Then carefully remove from the pans. Allow them to cool completely to room temperature on wire racks.  

Step 7 – Wash Pans – Wash the cake pans.ย  Re-spray for non-stick cooking spray. Then pour the remaining colors of the batters into the pans.ย  Bake the same as you baked the 1st 3 colors.ย  Let them cool completely on wire rack.ย ย 

Step 1 – Cream Butter – In a large bowl cream the butter until smooth.

Step 2 – Add in Powdered Sugar – Beat in the confectioners sugar (one cup at a time). Beat on low speed until well combined.

Step 3 – Add Milk – Stir in vanilla and milk.  Whip until thoroughly mixed and fluffy on a medium-high setting.

How To Assemble

Step 1 – Trim Cake Tops – Use a serrated knife to trim the cake layers. This make sure that both of the cakes are leveled.

Step 2 – Purple Layer – Place the purple cake on a large cake plate or cake stand.

Step 3 – Layer with Frosting – Spread a thin layer of frosting on top of this purple cake layer.

Preparing frosting and cakes to frost.

Step 2 – Add Other Cake Layers – Repeat this process with the blue, green, yellow, orange layer and red cakes.  

Step 3 – Add Frosting – Then frosting the sides of the cake and decorate the top as desired with the rainbow sprinkles.  

Step 4 – Serve – Then the rainbow layer cake is ready to slice, serve and enjoy.

Close up image of the cake sliced to see all the rainbow layers.

Tips for Success

  • Removing Cake Tops – Before frosting the cake layers, make sure to smooth the top with a knife. This helps the cake to be even and prevents it from falling.
  • Prepare Cake Pans – Before pouring the cake batter into the pans, make sure to grease with cooking spray. This prevents the cakes from sticking and to easily remove from pan. It also helps to make sure cake has cooled before removing.
  • Combining Cake Ingredients – We recommend using a electric mixture or a stand mixer to combine cake ingredients. Beat the cake mix ingredients on medium speed. This ensures that the cake batter is smooth and creamy.
  • Dividing Batter – Feel free to make this cake in as many layers as you prefer. We did 6 layers but you can easily do less. You will have to work in batches depending on how many round cake pans you have. Just make sure to divide the batter evenly to ensure that the cakes are even when stacking.
  • Adding the Food Coloring – When making this rainbow cake it is all about the vibrant shades of color. Make sure to use quality food coloring to dye the cake with. Add as much food coloring as your prefer. Add more to make it more vibrant colors.
  • Frosting the Cake – We recommend preparing the cakes ahead of time to ensure they are completely cooled before frosting. We like to place on cooling racks to cool. Frosting the cake creates a crumb coat.
  • Butter – The butter is best when it is softened. When combining the unsalted butter with the other ingredients it provides a smooth and creamy texture.

Variation and Substitutions

  • Frosting – We used a homemade butter cream frosting. You can also make this cake with a cream cheese frosting if you prefer. Feel free to use store bought frosting.
  • Cakes – To make this cake recipe easy, we used box cake mixes. But feel free to make homemade cakes with baking powder, baking soda, and all purpose flour.
  • Cake Flavor – We used a white cake mix in this recipe. But you can use a vanilla cake if you prefer. It may alter the colors on the cake but it will still taste amazing.
  • Decorating Cake – Feel free to decorate the cake how you prefer. You can even use a piping bag to pipe designs on the cake.

Storage and Freezing Tips

Refrigerate the leftover cake and cover with plastic wrap. Store the cake for up to 5 days. 

To freeze:

  • Freeze unfrosted cake layers individually wrapped
  • Store for up to 3 months
  • Thaw overnight in the refrigerator before assembling and frosting

This is a great make-ahead cake for birthday parties and celebrations.

Close up image of a slice of frosted cake.

Frequently Asked Questions

How Many Pans Do I Need to make this Cake

In this recipe we used 3 cake pans. Depending on how many cake pans you have, you may need to work in batches. Just make sure to wash and spray with cooking spray after baking the cakes.

How to Prevent Cake from Leaning

To prevent the cake from leaning, make sure to level the cake toppings. You also want to make sure to pour the exact amount of cake batter into each cake pans.

What is the best food coloring for Rainbow Cake?

Gel food coloring works best because it creates bright colors without changing the batter texture.

Can I use homemade cake batter?

Yes, homemade white cake batter works great if preferred.

More Easy Dessert Recipes

This Rainbow Cake is one of our favorite celebration cakes because it is colorful, fun, and always surprises everyone when sliced. It is perfect for birthdays, parties, and special occasions.

If you make this recipe, leave a comment and star rating below. We love hearing how your family celebrated with this fun rainbow cake.

A slice of Rainbow Cake, featuring six vibrant layersโ€”purple, blue, green, yellow, orange, and redโ€”separated by white frosting, sits on a plate in front of the rest of the cake.

Rainbow Cake Recipe

5 from 3 votes
Estimated Cost: $13.81, $1.15 per Servings
If you are looking for a fun cake to celebrate someone special, make this Rainbow Cake. The vibrant colors will make anyone smile.
Prep Time 30 minutes
Cook Time 20 minutes
Let Cool 10 minutes
Total Time 1 hour
Servings 12
Cuisine American
Course Dessert
Calories 1100

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

See how we calculate recipe costs.

Want to save this?
Just enter your email and Iโ€™ll send it right to you, plus great new recipes weekly.

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.
  • Prepare 2 boxes white cake mix with 2 cups water, 1 cup vegetable oil, and 6 large eggs according to the package directions.
  • 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 mixing bowl, beat 2 cups softened 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!

Recipe Notes

Refrigerate the leftover cake, covered, for up to 5 days.ย 

Nutrition Facts

Calories 1100kcal, Carbohydrates 150g, Protein 7g, Fat 54g, Saturated Fat 25g, Polyunsaturated Fat 12g, Monounsaturated Fat 14g, Trans Fat 2g, Cholesterol 164mg, Sodium 877mg, Potassium 103mg, Fiber 1g, Sugar 115g, Vitamin A 1072IU, Calcium 218mg, Iron 2mg

Pin This Now to Remember It Later

Pin Recipe

Share this recipe!

Pin

About the Author

Hi, Iโ€™m Carrie Barnard โ€” a professional food blogger with over 14 years of experience helping busy families make dinner fast, easy, and affordable.

At Eating on a Dime, I share simple, budget-friendly recipes that are tested in my own kitchen and approved by my 8 kids. With millions of readers each month, I’m here to help you cook real food for real families โ€” without the stress.

5 from 3 votes (3 ratings without comment)

Leave A Review

Your email address will not be published. Required fields are marked *

Recipe Rating