Replacing oil, butter or eggs with applesauce in baking is a great alternative for vegans, people with allergies, or people who simply want to enjoy a cupcake (or two) without the extra calories and fat. If you want to get extra crafty, you can even make your own applesauce.

This substitution works best in cake-like recipes, including quick breads, muffins, cupcakes, and some brownies. Why? Well, the fat in butter and oil is important because it coats the flour, preventing it from combining with water and forming gluten. Most baking recipes try to limit the formation of gluten because it gives elasticity (chewiness) to the final product, when you really want something light, moist and fluffy. Applesauce can somewhat imitate this effect because it contains pectin, which can also, to a certain extent, inhibit gluten formation in dough.

The rule of thumb for replacing the oil in a recipe is to use a 1:1 ratio, so use one cup of applesauce instead of one cup of oil. For eggs, use 1/3 cup applesauce for each egg or  ¼ cup applesauce plus 1 teaspoon of baking powder. Butter is a little more complicated to substitute. When you completely replace the butter with applesauce, you may end up with a dense baked good. Instead, only substitute half of the butter with applesauce and keep the other half. The process tends to work well with boxed mixes like this Betty Crocker blueberry bread.

Next time you’re craving a baked treat but want to lighten up, give this applesauce sub a try.