Rainbow Cupcakes with Buttercream Frosting and sprinkles on white plate

Two words: rainbow cupcakes.

While the festive colors may have been what caught your eye, I guarantee it’s the sugar cookie-esque taste that will grab your taste buds’ attention. Cupcakes that taste like sugar cookies? Yes indeed!

These light, buttery, impossibly moist cupcakes star six layers of rainbow colors that bake up into a centerpiece-worthy treat perfect for birthdays, St. Patrick’s Day, and any other ordinary or extraordinary occasion in need of a little color and a whole lot of flavor.

Top down view of rainbow cupcake cut in half with more cupcakes on another plate

Top off the treats with pillowy buttercream frosting or opt for tangy cream cheese frosting then complete your cupcake creations with a shower of rainbow sprinkles. And if you love these rainbow cupcakes and are looking for even more of a wow factor in a fraction of the time, don’t miss my quick-fix Rainbow Cake!

Silky buttercream frosting in stand mixer bowl with paddle attachment

Six bowls containing various colors of cupcake batter

Paper-lined muffin tin with colorful batter next to piping bags with batter

Wire cooling rack containing cupcakes and piping bag with one cupcake perfectly piped with buttercream frosting

Two white plates containing easy rainbow cupcakes with silky buttercream frosting and sprinkles

Craving more? Subscribe to Just a Taste to get new recipes and a weekly newsletter delivered straight to your inbox! And stay in touch on Facebook, Twitter, Pinterest and Instagram for all of the latest updates.


Rainbow Cupcakes with Buttercream Frosting

Two words: rainbow cupcakes. While the festive colors may have been what caught your eye, I guarantee it’s the sugar cookie-esque taste that will grab your taste buds’ attention. Cupcakes that taste like sugar cookies? Yes indeed!
5 from 7 votes
Rainbow Cupcakes with Buttercream Frosting and sprinkles on white plate
Prep Time 30 mins
Cook Time 18 mins
Total Time 48 mins
Servings 14 cupcakes


For the cupcakes:

  • 3 cups all-purpose flour
  • 2 1/2 teaspoons baking powder
  • 1/2 teaspoon salt
  • 1 cup (2 sticks) unsalted butter, softened
  • 1 3/4 cups sugar
  • 2 large eggs
  • 1 1/2 teaspoons vanilla extract
  • 1 1/2 cups whole milk
  • Food coloring (red, orange, yellow, green, blue and purple)
  • Rainbow sprinkles

For the frosting:

  • 1 cup (2 sticks) unsalted butter, softened
  • 2 teaspoons vanilla extract
  • 2 Tablespoons heavy cream
  • 3 cups powdered sugar, sifted
  • Equipment: Cupcake wrappers


Make the cupcakes:

  • Preheat the oven to 350°F. Line cupcake tins with wrappers.
  • In a medium bowl, sift together the flour, baking powder and salt.
  • In the bowl of a stand mixer fitted with the paddle attachment, cream together the butter and sugar until light and fluffy. Add the eggs, one at a time, mixing between each addition then add the vanilla and mix until combined.
  • Alternately add the flour mixture and milk to the stand mixer in three increments each, beginning and ending with the flour mixture and beating between each addition. Divide the batter into six bowls then dye each with the red, orange, yellow, green, blue and purple food coloring.
  • Spoon a portion of the purple batter into each cupcake cup, top it with the blue, then green, yellow, orange and red, careful not to mix any of the layers. (Alternately, transfer each color into sealable plastic bags and pipe the batter into the cups.) Bake the cupcakes for 15 to 18 minutes until a toothpick inserted comes out clean. Remove the cupcakes from the oven and transfer them to a rack to cool completely while you make the frosting.

Make the frosting:

  • In the bowl of a stand mixer fitted with the paddle attachment, cream the butter until it is light and fluffy. Add the vanilla extract and beat until combined then add half of the powdered sugar and continue beating until well combined.
  • Add the heavy cream and continue beating and then add the remaining powdered sugar and beat until the frosting is thick and creamy. (See Kelly's Notes.)
  • Once the cupcakes have cooled completely, pipe or spread the frosting onto them then top with rainbow sprinkles and serve.

Kelly's Notes:

  • Beating the frosting in between each addition of the powdered sugar lightens the color of the frosting and will make it more white in color (rather than yellow).
  • If the frosting is too thin, add additional sifted powdered sugar ¼ cup at a time, or if it’s too thick, add additional heavy cream 1 teaspoon at a time until the frosting reaches your desired consistency.
  • ★ Did you make this recipe? Don't forget to give it a star rating below!


Did you try this recipe?

Share it with the world! Mention @justataste or tag #justatasterecipes!

Recipe by Kelly Senyei of Just a Taste. Please do not reprint this recipe without my permission. If you'd like to feature this recipe on your site, please rewrite the method of preparation and link to this post as the original source.

Feeling social?

Share this recipe!



Calories: 562kcal, Carbohydrates: 72g, Protein: 4g, Fat: 28g, Saturated Fat: 17g, Cholesterol: 98mg, Sodium: 109mg, Potassium: 151mg, Sugar: 51g, Vitamin A: 920IU, Calcium: 77mg, Iron: 1.4mg

Related Recipes

Check out more crave-worthy favorites

Kelly Senyei holding a copy of The Secret Ingredient Cookbook

love the recipes on just a taste?

Check out my cookbook!

Order your copy of The Secret Ingredient Cookbook featuring 125 brand-new family-friendly recipes with surprisingly tasty twists!

Join the Conversation

Rate and Comment

Your email address will not be published.

Recipe Rating


  1. They look delish. But I could have made 18. I thought it was too much batter for 14 cupcakes when I was filling tins. I have cooked for 18 min and still runny. Now have to keep checking at 3min intervals. (My oven is accurate for most baking/cooking I do) fingers crossed they work out. Albeit once iced no child will turn one away I’m sure.

    1. Hi Denise! Our recipes are written in the Imperial format, so feel free to use an online conversion program for metric. :)

  2. Hi Kelly, I’m so glad I stumbled on this recipe :) Trying to make 24 cupcakes by Friday. What color of liner/wrapper did you use to make the color stand out so boldly? I’m assuming white. Thanks for your input!

  3. The plastic baggie is a fantastic idea. My MIL used to decorate cakes and her frosting was incredibly light and fluffy. She used the Wilton buttercream recipe, but after mixing the frosting she whipped it on high in her Kitchenaid for 5 minutes. The frosting was airy like a marshmallow based frosting, but it still piped beautifully. I tried the technique with all butter buttercream, and it worked perfectly. The frosting isn’t overly sweet, and it also freezes well, although it’s not quite a fluffy when thawed. I love flavoring my frosting with vanilla and real almond extract that has bitter almond oil in it. It gives the frosting a wonderful flavor, but it doesn’t taste like almond. I also use salted butter in add a pinch of salt because I like how the slightly salty taste balances out the sugar. I love buttercream frosting, but it can be too sweet. Whipping it then adding almond makes it taste even better.

    Your baggie trick is similar to what I do for decorating. I use a ziplock bag and put the coupler on the inside of one corner then cut a small hole. It works just like a piping bag, and I already have ziplock bags in the kitchen. I did this once when I had run out of plastic piping bags, and I’ve never gone back. For storage I just put the filled bag inside another ziplock bag and refrigerate or freeze. Even smaller ziplock bags work. I like the zip top kind because they don’t pop open as easily as the others.

  4. 5 stars
    Hi Kelly made these cupcakes yesterday ,your recipe is a sure deal …Thank you so much .I am not going to cruise around the net for such recipe# sticking with this one .I even shared it with my friends here in Zimbabwe .

    1. Hi Diane – US cup! I hesitate to provide the amounts in grams for this recipe because I don’t use grams when I bake, and I’m concerned if I tried to convert everything just using an online converter, it wouldn’t be accurate.

  5. Please could you say in grams or ounces HOW MUCH IS A CUP. ???? I have made many cakes from recepies using an official set of CUP MEASURES and they do not always work out correctly. I would love to bake your rainbow cupcakes but not sure
    if my CUP MEASURES are correct

  6. Tried this for my niece’s birthday and she loved it! May i know if the recipe can be used as a cake instead of cupcake?

  7. Hi , I would love to try this but I need 28 cup cakes.. would it be advisable to double the quantities?

    Thank you

    1. Hi there! Sure! And you can adjust the ingredient measurements by hovering your cursor over the SERVINGS above and sliding the bar right or left.

    1. Hi Deema! I’ve never tried that so I can’t say for certainty what the results would be. If you decide to give it a shot, I’d recommend following the package directions. Let me know if you give it a shot!

  8. I love these, I’ve baked it twice with my kids and they love it Can it also work as a cake, and how long should I leave it in the oven?

  9. I tried this and it came out great!! I am so happy that I found this recipe. My only thing was that my red icing came out pink. I did use gel food coloring but I have no clue how to get my red to stay red. Maybe it’s the brand or a special technique?

    1. Hi Dominique! Brands and techniique can make a difference. Here are a couple of tips for making red buttercream frosting: 1. Make your red frosting a day or two ahead of time. The color will deepen as it sets. 2. Start with a pink frosting. A pink base makes it easier to turn the frosting red. Just use a pink gel food coloring to achieve this.

  10. Hi! Would love to make these for my daughter’s birthday, but they don’t sell vanilla extract at the supermarkets here in Japan. Can you recommend a substitute and the amount to add? Thanks in advance!

    1. Hi Leila! You could sub in an equal amount of maple syrup or use a vanilla bean (cut open the bean and scrape out the seeds). Hope this helps!

  11. Thanks for this awesome recipe… can I ask what Food coloring do You use because they are so intensive?

  12. 5 stars
    LOVE this recipe! My son and I baked these today. It was our first time EVER baking homemade cupcakes. It was so easy and so much fun! I do have one question. I can really taste the heavy cream in the frosting. Do you think the recipe could be done with just one Tablespoon instead of two?

    1. Hi Hilda! Yes, but the consistency of the buttercream will be slightly different. You could also try using whole milk instead :)

    1. Hi Hayley! If you prefer a very generous amount of frosting that can be piped into tall swirls atop the cupcakes (as shown), double the frosting recipe and refrigerate it for 20 minutes before transferring it to a piping bag and decorating the cupcakes.

    1. Hi Diana – I’ve never tried this recipe with orange juice but it *should* work. And to add even more orange flavoring, add 1 Tablespoon orange zest. Looking forward to hearing how they turn out!

  13. 5 stars
    We LOVE these. We bake them for special occasions and always change up the colors.

    Are these gluten-free?

    1. I’m SO thrilled you’ve been enjoying the cupcake recipe, Lori! You could try using a gluten-free flour such as Cup4Cup that’s a 1:1 ratio as regular flour. I’ve never tried this substitution so I’m not sure what the result would be.

  14. 5 stars
    I was so surprised how easy this recipe was! I thought for sure I’d completely fail (I never bake), but I knocked these out of the park. Thank you for this great recipe! :)

    1. Absolutely, Mary! However, I’ve never made mini cupcakes with this recipe so I’m not certain on the bake time.

  15. How many cupcake does this recipe make? using all the same measurements on your list of ingredients.

  16. But if I bake the cupcakes without evening out the batter that was poured into the cup won’t the cupcake come out oddly shaped?

  17. I made these for my daughter’s birthday party- she loves all things rainbow- and they definitely did taste a lot like a sugar cookie. Since I needed 30 cupcakes, I doubled the recipe and ended up with 46! I guess I did not fill the tin enough. It didn’t specify so I went with a standard 2/3 – 3/4 full and they turned out a little lower than the ones pictured. Also, I don’t know if they were supposed to be as dense as they were. Not unpleasant, but more like a pound cake than the usual cake. All in all, everyone enjoyed them and I am happy to have the leftovers.

  18. These are so adorable!! I’ve been trying to decide on cupcakes for my son’s 1st birthday this weekend and I think these are perfect! He will love all the colors! I can’t wait to make them!! Plus, you can’t beat buttercream frosting :)

  19. I made these to the kinds in my family and the loved it! I enjoyed it as well ? the only thing is, they were so sweet for my taste. I’ll reduce the sugar next time.

  20. Made these on the weekend and the first thing my son said when he tried them was this was the best icing he has ever had! Thanks for the recipe all three of my children loved them.

  21. I just made these, they are very colorful but I’m not happy with the taste. I do like someone’s suggestion for flavoring the batters and will try that next time, maybe a little jello.

    1. Hi Nikki! I’ve never tried freezing them so I’m not sure what the consistency/texture would be once you defrost them. Let me know if you give it a shot!

  22. Hi!!!
    They look superb….just one pointer if you could help me with…is there any eggless version of this recipe…may be using curd or butter milk.
    Would really appreciate!!!

    1. Hi there! I’ve never tried this recipe with an egg substitute so I’m not certain what a suitable alternative would be.

  23. Just made these and they’re fantastic! Thinking about flavoring them next time with lemon in the yellow, lime in the green etc. Thoughts?

    1. So glad you enjoyed the recipe, Jane! You could absolutely add additional flavorings to the various colors. That would be delish!