Go Back
Slice of key lime cake with pale green frosting on a white plate, with a fresh lime in the background.

Key Lime Cake from Scratch

Course: Dessert
Cuisine: American
Keyword: key lime cake
Difficulty Level: Beginner
Prep Time: 20 minutes
Cook Time: 35 minutes
Total Time: 55 minutes
Servings: 15 slices
Calories: 444kcal
Author: Kara @I Scream for Buttercream
Homemade key lime cake that’s easy to make, is moist and made from scratch, all topped off with a tangy lime cream cheese frosting.
Print Recipe

Ingredients

For the cake:

  • 2 ⅔ cups all-purpose flour (Measured correctly: Spooned into the measuring cup and leveled off – don't scoop and pack the flour into the cup, that will add too much flour.)
  • 2 ½ teaspoons baking powder
  • ½ teaspoon baking soda
  • ½ teaspoon salt
  • 1 cup sour cream, close to room temperature
  • ¼ cup vegetable oil
  • 1 ½ tablespoons lime zest (from about two limes)
  • ¼ cup lime juice
  • ¼ cup milk
  • 1 teaspoon vanilla extract
  • 2 ½ teaspoons lime extract
  • green gel food coloring (optional)
  • 3 large eggs, close to room temperature
  • ¾ cup unsalted butter, room temperature
  • 1 ⅔ cups sugar

For the frosting:

  • ½ cup unsalted butter, room temperature (1 stick)
  • 1 (8 ounce) package cream cheese, almost room temperature
  • 1 small pinch of salt
  • ½ teaspoon lime extract
  • 3 cups confectioner's sugar
  • 1 teaspoon lime juice (can use more if needed to reach the desired consistency)
  • green gel food coloring (optional)

Instructions

For the cake:

  • Preheat the oven to 350 degrees F.
  • Spray a 13x9 inch pan with non-stick baking spray. (I use a glass pan.)
  • In a medium-sized bowl, whisk together the dry ingredients: flour, baking powder, baking soda, and salt. Set aside.
  • In another bowl, add the liquid ingredients: sour cream, oil, lime zest, lime juice, milk, vanilla extract, lime extract and gel food coloring. Set aside.
  • In a separate large bowl, add the butter and sugar and mix with an electric mixer on high for about 2 minutes until light and fluffy.
  • Add the eggs, one at a time, mixing on medium for about 20 seconds after each egg is added.
  • Scrape down the sides and bottom of the bowl.
  • Alternately add in the dry mixture and the liquid mixture to the butter/sugar mixture, starting and ending with the dry mixture as follows:
  • Add in a third of the dry mixture and mix on medium speed only until just combined (about 10-15 seconds only).
  • Add in half of the liquid mixture, mixing on medium speed only until just combined (about 10-15 seconds only).
  • Add in another third of the dry mixture, mixing on medium speed only until just combined (about 10-15 seconds only).
  • Add in the last half of the liquid mixture, mixing on medium speed only until just combined (about 10-15 seconds only).
  • Add the last third of the flour mixture and mix on medium speed only until just combined (about 15 seconds only).
  • Scrape down the sides of the bowl and mix again on medium speed only for about 10 seconds or feel free to mix by hand at this point just using a large spoon or silicone spatula.
  • IMPORTANT NOTE ABOUT SCRATCH CAKES: Be very careful only to mix until well combined. Once the batter is well combined, stop mixing. The batter does not have to be silky smooth. Mixing scratch cake batter too long and/or at too high of a speed can cause the gluten in the flour to over-develop and that will cause the cake to come out dense, rubbery or it may fall in the middle.
  • Pour the batter into the prepared pan and smooth the top with a spatula.
  • Bake for approximately 35-40 minutes, or until a toothpick inserted into the center comes out either with a few moist crumbs on it or clean.
  • Set the baked cake on a cooling rack and allow to cool completely before adding frosting.

For the frosting:

  • In a large bowl, add the room temperature cream cheese and butter and mix with an electric mixer on medium-high speed until smooth.
  • Add the lime extract and salt and mix again until well mixed.
  • Add ½ the confectioner's sugar, mix well on medium-high speed, then add the second half and mix again on medium-high until smooth.
  • Check the consistency. If it's too thick, add a teaspoon of lime juice, mix again and check the consistency.
  • Add a drop or two of green gel food coloring if desired and mix again for a couple minutes until light and fluffy.
  • Spread onto the cooled cake.

Notes

How to Store: Because this cake is topped with a cream cheese buttercream, it should be stored in an airtight container or covered well in the refrigerator and can last up to 6 days. Let it set out for at least 20 minutes to come closer to room temperature for serving, so that the cake texture is at its best and not so firm because it’s chilled. Always return the cake back to the fridge as it’s topped with perishable frosting.
How to serve: Most cakes are best served closer to room temperature, especially when made with butter like this one. If the cake is cold, set it out to come closer to room temperature for about 20 minutes before serving. You can also pop a slice in the microwave to warm up a bit. If you prefer to eat the cake cold, just know that cakes made with butter will be firmer when cold.
For other questions: Make sure to check out the TIPS & FAQs section in this post, which should answer other questions you may have about ingredients, substitutions, other pan sizes, etc.
Nutritional values are an estimate. Nutritional values do not include frosting.
*This recipe card may contain affiliate links. As an Amazon Associate, I earn from qualifying purchases.

Nutrition

Calories: 444kcal | Carbohydrates: 65g | Protein: 4g | Fat: 20g | Saturated Fat: 12g | Polyunsaturated Fat: 1g | Monounsaturated Fat: 5g | Trans Fat: 1g | Cholesterol: 83mg | Sodium: 137mg | Potassium: 140mg | Fiber: 1g | Sugar: 47g | Vitamin A: 626IU | Vitamin C: 2mg | Calcium: 64mg | Iron: 1mg