Go Back

Homemade Rainbow Cupcakes (from scratch!)

These homemade rainbow cupcakes are made completely from scratch! They’re so moist and delicious, with vibrant colors that make them a sweet and beautiful, fun dessert.
Course Dessert
Cuisine American
Keyword birthday, homemade, rainbow cupcakes
Prep Time 15 minutes
Cook Time 20 minutes
Total Time 35 minutes
Servings 12 servings
Author I Heart Recipes



  • 2 ½ cups all-purpose flour sifted
  • 1 ¾ cups granulated sugar
  • 3 eggs
  • ¾ cup vegetable oil
  • ½ tsp salt
  • 2 ½ tsp baking powder
  • 1 ¼ cups milk 2% or whole milk
  • 2 tsp vanilla extract
  • 1 ½ tsp lemon extract

Homemade Frosting:

  • 8 tbsp salted butter
  • 1 lb powdered sugar
  • 2 tsp vanilla extract
  • ¼ cup milk
  • Vibrant gel food coloring your favorite colors


  • Sift all-purpose flour, baking powder, and salt in a bowl and mix.
  • Use a smaller bowl to create a well in the flour mixture. (This prevents you from having to use multiple bowls for your wet and dry ingredients.)
  • Add eggs, sugar, milk, and oil, and vanilla. Mix all ingredients together with a hand mixer until well-combined.
  • Add lemon extract into batter and mix until combined.
  • Divide batter equally into 4 bowls (about 1 cup eacand add the gel food coloring to each bowl. I used pink, purple, orange, and blue.
  • Line a muffin tin with cupcake liners.
  • Add about 1-2 tablespoons of each color batter to the cupcake tins at a time. Do not mix the batter to keep the layered rainbow effect when baking!
  • Leave about ¾ of an inch of room in the cupcake tins to avoid overflow when baking.
  • Bake cupcakes at 350 degrees for 15-20 minutes.
  • Allow cupcakes to cool for about an hour before icing.


  • Mix together softened butter, powdered sugar, vanilla extract and milk. MIx with a hand mixer until fully creamed together.
  • Use a pastry bag to pipe frosting onto cooled cupcakes.
  • Sprinkle cupcakes with rainbow sprinkles.
  • Serve and enjoy!