Go Back
+ servings
An American flag cake decorated with blueberries, raspberries, and white frosting with a patriotic star towel.
Print Recipe
5 from 3 votes

American Flag Cake

Bake a patriotic American Flag Cake with red, white, and blue marbled cake inside and "bakery-style" frosting. Always a party crowd pleaser for July 4th!
Prep Time45 mins
Cook Time30 mins
Total Time1 hr 15 mins
Course: Dessert
Cuisine: American
Keyword: American flag cake, flag cake, flag cake recipe, Flag Sheet Cake
Servings: 20
Calories: 585kcal


9 X 13 rectangle cake pan

  • 1 white vanilla boxed cake mix
  • water vegetable oil eggs called for on cake mix box
  • red food color or gel
  • blue food color or gel
  • fresh raspberries
  • fresh blueberries

cake frosting

  • 2 cups salted butter - room temperature (4 sticks)
  • 1 cup vegetable shortening
  • 10 cups powder sugar (confectioners' sugar)
  • 4 tablespoons hot water
  • 1 tablespoon vanilla extract
  • ½ teaspoon almond extract (optional but great!)


cake pan prep

  • Put a few drops of vegetable oil in the bottom of your pan. Next, line with parchment paper cut to fit the bottom of the pan.
  • This prepared pan will release the cake easier and makes for a faster clean up. If you are serving right from the pan and not removing the cake to decorate it, don’t line the pan of course!

make frosting

  • Beat soft butter and shortening in a mixer on medium-high speed until creamy for 5 minutes.
  • At low speed, add powder sugar 1 cup at a time until smooth.
  • On high speed, mix in vanilla, almond extract, and hot water for 5 minutes until fluffy and smooth. This frosting holds really well at room temperature for a few hours.


  • Stir your boxed cake mix and ingredients in a medium bowl, the bowl of a stand mixer with a paddle attachment, or using a hand mixer on medium speed.
  • Deeper pans might need more cake batter. I used a deeper pan, 3 inches deep, so I mixed up 2 boxed mixes. Most standard pans are 2 inches deep, so 1 box will be fine.
  • In a small bowl place 1-2 cups of batter and scrap down the sides of the bowl as you go, stir in red food color until it’s the red you like. In another small bowl, place 1-2 cups of the batter; stir in blue food color until it’s the blue you like. Save 1-2 cups of plain white batter.
  • Now, pour batter of dollops into the prepared baking pan alternating from red, white and blue. Try to place the batter on top of each area, it will begin to spread out.
  • When all the batter is in the cake pan, use a skewer to pull lines from the center outward, and then do some slight swirls around the pan. This helps create the marble design. Rap the pan down on the counter to help level the batter and pop any bubbles in the batter that would make it bake unevenly.
  • Heat oven to 325 degrees. Bake in the center of the oven according to your box directions. Most classic cake mixes require a 350-degree oven for 28 minutes for a regular 9 x 13 cake pan. If you use a pan deeper than 2 inches, reduce baking temperature to 325 degrees and bake longer for 55 minutes. Check with a toothpick, if it comes out clean the cake is done.

decorate cake

  • Cool the cake for 10 minutes in the pan, then remove it to a wire rack to finish cooling. Cool the cake in the refrigerator for at least two hours or preferably overnight before decorating. I like to bake one day, then decorate the next. This helps release the steam in the cake and the frosting holds on well.
  • Place a dollup of frosting on a small piece of cardboard or a tray, and set the cake on top. This keeps it from sliding around while decorating and makes it easier to transfer cakes to a party.
  • Frost the entire cake with the vanilla buttercream using a small offset spatula. Smooth out the frosting in an even layer as best you can all over the top and sides.
  • For the flag design, use the tip of a small knife and draw a line about 5 inches long and 4 inches tall for the blue part of the flag in the upper left corner. Place blueberries in that box, pick the best larger ones and place them with the smooth side up.
  • Starting at the top edge, use large raspberries pointed up and make long rows of red, leaving a 1" white stripe in between each row of raspberries.
  • Fill a large pastry bag with a large 1M large star tip and cake frosting. To fill the piping bag, rest the piping bag in a tall sturdy jar or glass and pull the piping bag down around the edge of the container, this helps to fill it up the bag. Pipe stars on blueberries for the stars of the flag working in slightly offset rows like the American flag.
  • For the white stripes of the flag, pipe stars in between rows of raspberries, and decorate the sides of the cake if you wish. You will have some frosting leftover, it freezes great in a zip-top bag, and can be used for another dessert like cupcakes.
  • The cake will hold well overnight in the refrigerator for 1 day, and possibly 2 days if your berries are really fresh. I would decorate either the day of your party or the night before. I have also had guests decorate it during the party which was SO much fun!
  • The best way to keep any leftovers is to cover it on the board with plastic wrap and put the entire thing in the refridgerator. Eat up the cake within a couple of days.



cake storage

The flag cake will last up to 2 days chilled in the fridge. The frosting will firm up, so remove it at least one hour before serving to let the frosting soften up before serving. 


This frosting recipe is SOOO fluffy and easy to spread at room temperature. But it firms up nicely when chilled in the fridge, so decorate your cake with room temperature frosting. You can freeze any leftover frosting, and use it for another dessert.

baking pans

You can bake this in a sheet pan, glass 9 x 13 dish, or metal cake pan. If you use a pan deeper than 3 inches, you will want to lower the temperature from 350 down to 325 degrees and bake it longer, about 50 minutes. Also, be sure to line the pan with parchment, it makes taking the cake out so much easier, and in one piece. 🍰


Coloring the batter is really easy, be sure to use bowls that won't stain with the dye, and just work to put big dollops on top of each other, with lots of white batter all over. Then use a chopstick to pull outward from the center and then in a circle, this makes the swirls you want! 🥣


You can bake a day ahead, and keep it chilled in the fridge until it's time to decorate it. You will want the cake very cool before you frost it!


A small offset spatula makes it really easy, but you can use a butter knife too. I had fun piping stars on the cake, totally optional but looks so patriotic. 🇺🇸 Use a large pastry bag and 1M tip to create the stars. I used regular food coloring, just mix until it's a dark enough shade. Red took the whole little bottle.


I used blueberries and raspberries, but you could use fresh strawberries and slice them for the red stripes. You could also use colored sugar or sprinkles for the stripes. 🫐❤️


July 4th Recipes

I have a collection of over 100+ July 4th Desserts with treats from my food blogger friends plus a few of mine, with something for everyone. Happy July 4th 🇺🇸, you can also get over 100+ July 4th Recipes and food ideas for your party.


Calories: 585kcal | Carbohydrates: 81g | Protein: 1g | Fat: 30g | Saturated Fat: 15g | Polyunsaturated Fat: 4g | Monounsaturated Fat: 9g | Trans Fat: 2g | Cholesterol: 49mg | Sodium: 343mg | Potassium: 24mg | Fiber: 1g | Sugar: 70g | Vitamin A: 567IU | Calcium: 63mg | Iron: 1mg