Start with package cost and package size
Divide what you paid for the package by its size in grams, milliliters or pieces. A 1,000 g bag of flour that cost $4.80 works out to $0.0048 per gram. Using 320 g costs $1.536. Keep the unrounded amount during the calculation and round the batch total.
Use matching units on each ingredient row
Convert a bag listed in kilograms to grams when the recipe uses grams. If the recipe uses a volume measure and the package is sold by weight, weigh the amount or use a reference specific to the ingredient. A cup of flour and a cup of sugar can weigh different amounts.
Divide by pieces you will actually sell
If a tray costs $12.60 to make and you can sell only 14 of its 16 cuts, the cost is $0.90 per sellable square. This captures normal trimmings and breakage in the batch.
Take ingredient cost into the order price
Ingredient cost is one part of the quote. Add packing, labor and overhead, then account for fees and the margin you want.
Try it with your own numbers. Recipe cost calculator