Recipe cost calculator
Cost of a dish from its ingredient list, and the price of a single serving.
Fill in the fields and the result will appear here automatically.
Builds the cost of a dish from a list of ingredients and divides it by the number of servings. Each line is a name, a quantity and a unit price, and the last two numbers are read as quantity and price while everything before them counts as the name — so «plain flour 0.5 45» parses correctly even with spaces in the name. A line without a price is rejected rather than filled with a zero: a substituted price would quietly understate the cost and the mistake would look plausible. The table shows each contribution without assuming which one dominates. All prices must use one selected currency; its display symbol does not convert entered amounts.
How it works
Formula and logic
The final two numbers are quantity and price per its unit; preceding text is the name. Row cost = quantity × price; total = sum; serving cost = total ÷ positive equal serving equivalents. Fractional equivalents are allowed. Quantity and price can be zero, not negative. Calculations retain unrounded values; money is displayed to two decimal places.
Example
Flour 0.5 kg at 45, butter 0.2 kg at 890 and sugar 0.3 kg at 68 give 22.50 + 178 + 20.40 = 220.90 in one currency. Four servings give 55.225, displayed as 55.23. Two and a half equal servings give 88.36. A zero-quantity row costs zero.
Fields and units
- Ingredients: name, quantity and price per line — name; quantity in ingredient unit; price per that unit in one currency
- Servings — unitless
How to use
- — Enter ingredients one per line.
- — On each line the last two numbers are the quantity and the unit price.
- — The name may be several words: «plain flour 0.5 45».
- — Enter how many servings the recipe makes.
Method and limitations
- Calculation method
- Formula and logic
- Limitation
- Selected costs are summed in one currency, without exchange conversion, taxes or automatic labour and waste accounting.
FAQ
Which units should the quantity use?
Match quantity to the unit price: kg for a price per kg, items for a price per item. Different rows can use different units because money, rather than quantities, is summed.
What if the name contains spaces?
Nothing special: the last two numbers are read as quantity and price, and everything before them is the name. «Plain white flour 0.5 45» parses correctly.
Why is a line without a price rejected?
Because a substituted price would understate the cost silently. Stopping the calculation is better than showing a plausible but wrong number.
Are gas, electricity and labour included?
Only when explicitly entered as suitable additional cost rows. The default result covers entered ingredients, not complete production cost or profit.
How do I account for spices used in tiny amounts?
Enter a measured or estimated fraction and a price using matching units. Omission is a deliberate scope choice, not a rule that small amounts never matter.