How to use this calculator
Replace the example ingredient prices with yours. For each ingredient, enter the package price, the amount in that package, and the amount used in the recipe. Both quantities must use the selected unit. Enter the number of servings the batch yields. Add or remove ingredients as needed.
The math behind it
Ingredient cost used = package price × quantity used ÷ package quantity Batch cost = sum of ingredient costs used Cost per serving = batch cost ÷ servings
A worked example
Flour costing 2 for 1,000 g contributes 0.50 when 250 g is used. Butter costing 3 for 250 g contributes 1.20 when 100 g is used. The batch costs 1.70; across 4 servings that is 0.425 each, displayed as 0.43 in a currency with two decimal places.
Assumptions & precision
Ingredient consumption cost, not the cash needed to buy whole packages. Quantities used may exceed one package. Package quantity must be positive; price and amount used must be nonnegative and finite. Both quantities in a row use the same unit; changing the unit label does not convert values. No mass-to-volume conversion or ingredient density assumptions. One to 50 ingredients; positive servings up to 1,000,000, including fractional yields. No labor, energy, packaging, waste allowance, tax, margin or selling-price calculation. Enter usable quantities and any relevant purchasing cost consistently. Currency changes display only. Intermediate costs remain unrounded; results above 10¹⁵ are rejected. Displayed line costs or per-serving amounts may not sum exactly due to rounding.
A common question
Is this the amount I need to spend at the store?
Not necessarily. It prorates the ingredients consumed in the recipe. If you need part of a package, you may have to buy the whole package, so the checkout total can be higher.