| Ingredient | Pack price | Pack size | Unit | Qty used | Unit | Yield % | Line cost |
|---|
Weight, volume and count don't convert. A highlighted line uses different kinds of unit for the pack and the quantity, so it is left out of the plate cost.
The food cost formula
Line cost = pack price ÷ pack size × quantity used ÷ yield
Food cost % = plate cost ÷ (menu price ÷ 1.1) × 100
Menu price at target = plate cost ÷ target × 1.1
Pack size and quantity must be the same kind of unit: weight with weight, volume with volume, count with count. 1 L of cream is not 1 kg.
Use it in code
import { costDish } from './src/foodCost.js';
from food_cost import cost_dish
JavaScript (ES module) and Python, no dependencies, MIT licence. See the README for the full API.