How Rinvy calculates product cost

The number on a product page, the number on a report, and the number on a recipe-output product are computed in three different ways. Knowing which is which lets you read any report without second-guessing the numbers.

1. The case cost on the product page

The case cost on the product page is the most recent per-case price Rinvy has seen, rolling forward.

  • When you create a product, you enter case cost manually.
  • Every time you receive a delivery, Rinvy overwrites the product's case cost with the per-case cost from the new receipt. For a product with several purchase options, a delivery through a non-default option leaves it unchanged.
  • Editing or deleting a receipt rewinds it to the previous receipt's value.

The product page's Unit cost is case cost ÷ case size — read-only, derived from this rolling value.

A product's edit form showing Case size 4 and Case cost 40.00, with the Unit cost (calculated) field below them greyed out and read-only at $10.00

2. The weighted-average cost reports use

Reports don't read the product's case cost. They compute their own weighted average across the receipts that fall inside the report's date range. Weighted average is one of the two cost formulas that the international inventory standard, IAS 2 Inventories, allows for interchangeable stock such as cases of the same ground beef. The other is first-in, first-out (FIFO).

The fallback chain:

  1. If there's at least one receipt in the report's date range, use the weighted average of those receipts (total $ ÷ total quantity).
  2. If no in-range receipts but at least one all-time receipt, use the most recent receipt's per-unit cost.
  3. If no receipts ever, fall back to the product's case cost (which is the value you originally entered).

The fallback chain is why the Spending and Inventory Value reports can show a different per-unit cost than the product page. A report answers "what did this cost us on average?" The product page answers "what's the last price we saw?"

On the Inventory Value report, Ground Beef's Cost / unit reads $9.90 — the weighted average of its receipts — while its product page shows $10.00, the last case cost ÷ case size. The est.-tagged rows have no receipts to average, so they fall back to the case cost you entered — the last step in the fallback chain above.

The Inventory Value report breakdown listing each product's Cost / unit: Ground Beef at 20 lb reads $9.90, below the $10.00 on its product page, while est.-tagged rows like Olive Oil ($8.00) fall back to the entered case cost

3. Recipe-output cost (computed recursively)

A recipe-output product (marinara, pizza dough) has no purchase price — it's made in-house. Its cost is computed by:

  1. Walking the recipe's ingredients.
  2. Looking up each ingredient's per-unit cost using the rules above (weighted average → fallback chain).
  3. Multiplying by the recipe quantity and unit conversions.
  4. Dividing by the yield quantity to get the output's per-unit cost.

If an ingredient is itself a recipe output, the calculation recurses.

Why does a menu item say "cost incomplete"?

A menu item says cost incomplete when Rinvy could not cost one or more of its ingredients and left them out of the sum. An ingredient is skipped entirely when its unit can't be converted to the product's counting unit, when its product record is missing, or when it's a recipe output with no recipe behind it. The remaining ingredients still add up, so the food cost comes out lower than reality rather than failing outright.

Menu items in that state are marked cost incomplete in the menu items list. The tag names the ingredient, for example "cost incomplete: Brick Blend Cheese", or counts them when there are several. Tap the tag to see each cause in plain words and a button that fixes it:

  • Can't convert cup to lb for Feta: tap Edit Feta and add the conversion on the product.
  • Marked made in-house, but no recipe makes it: tap Create a recipe to write the recipe for it. If you buy the product, tap Edit product, turn off Recipe output only and enter its case cost.
  • An ingredient's product no longer exists: tap Edit menu item and pick a product for that ingredient.
  • These recipes use each other: open Recipes and remove the loop.

The same list shows on the menu item's edit form, above the ingredients, and on the Cost incomplete tag in the Menu engineering report. The menu item report also flags the ingredient responsible. When the gap is inside a sub-recipe, the report flags that sub-recipe's row instead — open its own menu item to follow it down to the source. Treat the number as one you can't act on until it's fixed, usually by adding the missing unit conversion on the product. For a recipe in cups and a product counted in pounds, weigh one cup of the ingredient on a kitchen scale and enter that weight. NIST's culinary measurement tips call measuring by weight a best practice for recipe accuracy.

The Deluxe House Salad menu item report showing a red 36.4% Food Cost %, with the Ingredient Cost Breakdown flagging House Salad Mix at $0 and the note "Recipe output product — no recipe data found to compute cost"

The Menu list showing two salad items flagged in red: Garden Salad tagged "est." and Deluxe House Salad tagged "est. · cost incomplete", next to two taco items showing complete food-cost percentages in green

How edits cascade

  • Editing a receipt updates the product's case cost AND retroactively changes weighted-average cost on any report whose date range includes that receipt.
  • Deleting the most recent receipt rewinds the product's case cost to the previous receipt and removes the receipt from report averages.
  • Changing case size updates the displayed unit cost immediately (it's case cost ÷ case size) but past receipts are unchanged — the weighted average in reports still reflects the cases as they were at receive time.

Where this matters

  • Menu item food cost: uses the recipe-output cost (#3), which recurses to weighted-average ingredient costs (#2).
  • Variance report: theoretical cost uses #2 from sales × recipes; actual uses #2 from inventory changes.
  • Food Cost report: values beginning and ending inventory with #2, then adds purchases and divides COGS by sales for your actual food cost — see actual food cost for a period. Sales come from your POS feed. For a day with no POS sales, Rinvy uses net sales you typed and saved on the report.
  • Order list and product page: shows #1 (rolling latest).

Common mistakes

Editing the product's case cost to "fix" a report

The report doesn't read the product's case cost (unless there are zero receipts in range). Editing it changes the future starting point, not history. To fix a report, fix the underlying receipt or recipe.

Expecting a recipe-output product to have a fixed cost

A recipe output's cost moves every time an ingredient receipt lands. That's the point: food cost reports stay accurate.

Setting a case cost on a product that's never received

Reports will use the product's case cost as the fallback. That's fine for a quick starting estimate but you should add at least one real receipt as soon as you can — the weighted-average path produces much better numbers.

Related