AI personally use a program called "Cake Boss". You input each ingredients with how much you are getting and the cost for it. Then under the recipes tab, you put in how much of each ingredient you are using and it will tell you exactly how much you invested in ingredients alone. Then what everyone seems to do is (x3) of that, to get a total. The (x3) is suppose to cover the cost to make, labor, and electric/gas bill.
Hope This helps.