I just did this last week. I went to the grocery store and bought all the items i would need for my cookie recipe. I then used a conversion chart and broke it down to what my cost was per batch. I was surprised that my cost was almost 3 dollars a batch, but that was because my vanilla bean paste was 1.50 per batch. I then was able to find a bigger container of vanilla bean paste for a better value and that brought my total down to a less than 2 dollars a batch without losing quality.
I have yet to break down my royal icing recipe, but once i buy more meringue powder, I will do that too!
Don't forget to add in other materials (boxes, bags, tissue, bubble wrap if needed, ribbon..etc)... Also, I learned that it takes a while to cut/wrap ribbon on cookies!!!!
I also created a chart (like Sugarbelles), and then I have add-ons such as making cookie pops, the ribbons, boxes, etc.
There are so many hidden costs (parchment, heating the oven, ziplock bags, etc)
ACK, dont get me started
Oh, to keep track of expenses and orders, I use excel spreadsheets!