Pricing is a very regional thing and everyone has a different formula.
That being said for my cake and cupcakes to calculate my price I add up all the ingredients and multiply that by 10%. To that price I add in the cost of all the other items needed for the cake (ie boards, fondant, boxes). Then I add my per hour price. I estimate how long I feel it would take be from baking to completely decorated cake. In the beginning I was way off but now I have a good sense on how long a cake would will take me.
As for decorated cookies I start at 3.00 per cookie and then depending on the size and design I gage from there if I need to charge more.
I hope this helps you guys