That's why the formula I wrote worked so well for the 10+ years selling to wholesale customers. It covers time and overhead in the retail position I worked in. The trick is, you have to be OCD about "cost to make" -- don't leave anything out, i.e., the cost of ingredients plus shipping, for example.
There are a LOT of costs that folks just don't realize that go into making something.
It starts with the cost of your ingredients. And not just the actual cost, but you have to at a minimum include the cost of shipping. Example...10lbs of Shea Butter at BB is $65.49 which is $0.41oz. But when you add in the cost of shipping ($11.18), the cost is now $0.48oz.
I am fortunate that I don't have to pay 'shipping' for a lot of my ingredients...Costco is about a mile from my house (and work) and I have a local soap supplier 20 minutes from work for the bulk of soap ingredients. But I still have costs...my time and mileage. And even though I am not making a special trip to Costco since I shop there for home and work, I still my costs for acquiring my ingredients.
Then there is your costs for packaging and labeling your soap. Like with your soap ingredients, you need to include shipping and/or the cost for obtaining these items. And if you are printing your labels, you need to include the cost of the ink used to print them.
Then comes 'labor'. It takes me approximately 30 minutes from start (pulling my ingredients from inventory) to finish (cleaning up) to make a single batch of soap. It actually only takes me about 20 minutes, but I Master Batch and so I include that time. And even though it takes me less time per batch when doing multiple batch, I still base my costs on a single batch.
Now that is just the labor for making the soap. There are additional labor costs for cutting, planning, trimming, stamping the soap. Then there are additional labor costs for packaging and labeling. And don't forget your labor costs for printing your labels.
Now all of the above costs are what are called "direct" costs. Now you have to add in your "indirect" costs aka "overhead". It takes electricity/gas, it takes water, it takes space. If you have a store, these are easily to figure out as you are paying the bills, but a lot of us make soap out of our homes either in a dedicated or shared space. And there is a fairly simple way to figure it out (see IRS Form 8829) and then divide by the number of bars you make per year.
And let's not forget costs like having a website, advertising, licenses, insurance, etc. Oh...and equipment; your scale, stick blender, bowls and spatulas, measuring spoons and cups, and molds. And don't forget software.
Oh...and Merchant Fees. This can be a direct/indirect cost depending on what your agreement is.