Dairy Free Carrot Cake Recipe

Whole dairy free carrot cake with frosting, two pieces cut and plated with forks.

The Spruce Eats / Kristina Vanni

Prep: 20 mins
Cook: 40 mins
Cool Time: 15 mins
Total: 75 mins
Servings: 12 servings
Yield: 1 two-layer cake
Nutrition Facts (per serving)
597 Calories
24g Fat
93g Carbs
6g Protein
Show Full Nutrition Label Hide Full Nutrition Label
Nutrition Facts
Servings: 12
Amount per serving
Calories 597
% Daily Value*
Total Fat 24g 30%
Saturated Fat 3g 14%
Cholesterol 62mg 21%
Sodium 472mg 21%
Total Carbohydrate 93g 34%
Dietary Fiber 3g 9%
Total Sugars 64g
Protein 6g
Vitamin C 4mg 19%
Calcium 51mg 4%
Iron 2mg 13%
Potassium 297mg 6%
*The % Daily Value (DV) tells you how much a nutrient in a food serving contributes to a daily diet. 2,000 calories a day is used for general nutrition advice.
(Nutrition information is calculated using an ingredient database and should be considered an estimate.)

Carrot cake is not only a decadent and delicious dessert, it is also a versatile treat suitable for many occasions and can be adjusted to suit various dietary needs. Carrot cake can be served at holidays such as Easter, for birthday parties, or even showers and weddings.

This version of carrot cake is dairy-free because it is made with vegetable oil instead of butter. It works so well because the oil and other ingredients keep the cake batter rich and moist. Besides the grated carrots, there is pineapple for additional flavor, texture, and moisture.

It can be topped with your favorite frosting recipe, or you can use a dairy-free version of cream cheese frosting that tastes just as wonderful as the original. Instead of cream cheese frosting, carrot cakes can simply be topped with a dusting of confectioners' sugar for a simpler presentation. The cake can even be made vegan by substituting the eggs for vegan flax eggs

"A classic carrot cake. Moist, flavorful, and fluffy. Line the bottom of your pans with a circle of parchment for easy removal. I baked mine as two separate single-layer cakes and topped each with a confectioners' sugar icing made with pineapple juice. Dairy-free and delicious." —Laurel Randolph

Dairy-free carrot cake/tester image
A Note From Our Recipe Tester


  • 1 cup vegetable oil, more for the pan

  • 3 cups all-purpose flour, more for the pan

  • 3 cups grated carrots (about 3 to 4 large carrots)

  • 1 cup packed light brown sugar

  • 2 teaspoons baking soda

  • 2 teaspoons ground cinnamon

  • 1 teaspoon salt

  • 1 teaspoon ground ginger

  • 1/2 teaspoon ground nutmeg

  • 1 1/2 cups granulated sugar

  • 4 large eggs

  • 1 (8-ounce) can crushed pineapple, drained

  • 2 teaspoons pure vanilla extract

  • 1 cup raisins

  • Dairy-free cream cheese frosting, for topping

Steps to Make It

  1. Gather the ingredients.

    Dairy free carrot cake ingredients gathered.

    The Spruce Eats / Kristina Vanni

  2. Position a rack in the center of the oven and heat to 350 F. Grease and flour two 9-inch cake pans. Set aside.

    Two round pans greased and floured.

    The Spruce Eats / Kristina Vanni

  3. Combine the grated carrots and brown sugar in a medium bowl and set aside while preparing the rest of the cake batter.

    Brown sugar and grated carrots in a bowl.

    The Spruce Eats / Kristin Vanni

  4. In a large bowl, combine the flour, baking soda, cinnamon, salt, ginger, and nutmeg. Set aside.

    Dry ingredients in a mixing bowl for dairy free carrot cake.

    The Spruce Eats / Kristina Vanni

  5. In another large bowl, beat the sugar and eggs using a whisk or hand mixer until combined and creamy.

    Eggs and white sugar in a mixing bowl.

    The Spruce Eats / Kristina Vanni

  6. Mix in the oil, crushed pineapple, and vanilla extract.

    Oil, crushed pinnapple, vanilla extract added to bowl with the eggs and white sugar for carrot cake.

    The Spruce Eats / Kristina Vanni

  7. Add the dry flour-spice mixture to the oil-pineapple mixture ingredients and fold to combine.

    Dry ingredients in one bowl, combined wet ingredients in a second bowl.

    The Spruce Eats / Kristina Vanni

  8. Fold in the carrot-brown sugar mixture and the raisins.

    Raisins and shredded carrot mixture being added to the cake batter for dairy free carrot cake.

    The Spruce Eats / Kristina Vanni

  9. Divide the cake batter evenly between the prepared pans. Bake until a toothpick inserted into the center comes out clean, about 40 minutes.

    Dairy free carrot cake batter divided evenly into the two prepared pans.

    The Spruce Eats / Kristina Vanni

  10. Place the pans on a wire rack to cool for 15 minutes, then invert and cool completely. Frost with dairy-free cream cheese frosting, if desired.

    Cooled cakes stacked on a plate with dairy-free cream cheese frosting being applied with a butter knife.

    The Spruce Eats / Kristina Vanni

How To Store and Freeze

  • Leftover cake can be covered and stored in the refrigerator for up to one week.
  • If you want to make the cake layers in advance, they can be wrapped tightly in plastic wrap and frozen for up to three months. Defrost completely in the refrigerator overnight and then frost and serve as desired.


  • When grating carrots for a carrot cake, it is important to use a medium-sized grater so the shredded carrots aren’t too thick or too fine. Also, don’t use pre-shredded carrots from the store because they are too dry for cakes and won’t provide the necessary moisture.
  • This recipe can also be made as a sheet cake. Bake in a greased and floured 9x13 pan for 50 minutes or until a toothpick comes out clean.
  • You can also turn this recipe into cupcakes by spooning the batter into lined muffin cups and baking for 25 minutes or until a toothpick comes out clean.
  • A single-layer cake can also be made by halving all of the ingredients and baking it in one round or square 9-inch pan. 

Recipe Variations

  • This recipe includes a cup of raisins, but they can be omitted or a cup of your favorite dried fruit can be used instead. You can also use a cup of chopped nuts instead of the raisins if desired. 
  • Carrot cakes are beautiful with just a decadent layer of frosting, but they can also be elegantly decorated in a variety of ways. Additional dairy-free frosting can be prepared and colored with orange and green food coloring. Using a piping bag, orange carrots and green carrot tops can be drawn around the edge of the cake so every slice gets a carrot decoration. Another option is to top the cake with thin ribbons of grated carrot, placed in beautiful swirls around the edge. 
  • To make this cake vegan, you will need to substitute the four eggs with the equivalent of four flax eggs. Combine 4 tablespoons of ground flax meal into 12 tablespoons of water. Allow to sit for 10 minutes before combining into the recipe.

What Is a Good Non-Dairy Substitute for Cream Cheese?

There are several non-dairy versions of cream cheese available at most supermarkets. Some are made with nuts such as cashews, others are made with tofu. They whip up nicely with powdered sugar and a touch of vanilla to create a non-dairy cream cheese frosting.

What Can You Substitute for Vegetable Oil in Carrot Cake?

Vegetable oil can be substituted with the equivalent amount of any mild oil. Canola oil, grapeseed oil, or even a very light olive oil works well. 

Why Is My Carrot Cake So Dense?

Carrot cakes tend to be denser than other cakes because of the shredded carrots, raisins, and sometimes nuts incorporated into the batter. However, make sure you use a medium grater for shredding the carrots to avoid an overly dense cake where the carrots are too large to incorporate properly.