Skip to content

Main content

Household Stock Source Gap Tool

Calculate household stock source gap from explicit caller-supplied inputs.

Loading tool…

Description

Return opening+received-used-loss and observed minus that expected closing value.

Stock planning relates quantities to use rates, reservations, losses and package sizes. The resulting coverage is a model of supplied inventory, not assurance of edibility, safe storage, adequate nutrition or actual recipient eligibility.

Return opening+received-used-loss and observed minus that expected closing value.

When to use this tool

Use Household Stock Source Gap when you need an explicit food-inventory or distribution-budget calculation.

How to use the tool and how it works

  1. Enter openingStock, receivedStock, usedStock, observedClosing, measuredLoss. Use the units and conventions below.
  2. Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
  3. Read expectedClosing, discrepancy. Use the output convention below.

Require nonnegative opening/received/used/closing stock and loss. Return opening+received-used-loss and observed minus that expected closing value.1

Input fieldMeaning and unitsAccepted input
openingStockOpening StockRequired. Finite number; minimum 0.
receivedStockReceived StockRequired. Finite number; minimum 0.
usedStockUsed StockRequired. Finite number; minimum 0.
observedClosingObserved ClosingRequired. Finite number; minimum 0.
measuredLossMeasured LossRequired. Finite number; minimum 0.
Output fieldInterpretationReturned shape
expectedClosingExpected ClosingRequired. Finite number.
discrepancyDiscrepancyRequired. Finite number.
json
{
  "input": {
    "openingStock": 20,
    "receivedStock": 10,
    "usedStock": 8,
    "observedClosing": 20,
    "measuredLoss": 1
  },
  "output": {
    "expectedClosing": 21,
    "discrepancy": -1
  }
}

Limitations and assumptions

  • Expected closing may be negative. Stock units and period must match; discrepancy does not identify theft, spoilage, need or source authenticity.
  • Inputs must satisfy both the field types and the cross-field conditions above. Invalid input causes an error; a successful false flag or documented placeholder is a different result.
  • Numeric calculations use binary floating point unless exact decimal-integer arithmetic is explicitly stated. No hidden measurement tolerance or decimal rounding is added; nonfinite or out-of-contract results are rejected. Numeric signed-zero results are exported as zero.

Alternative or Complementary methods

Reconcile physical stock and the applicable handling and distribution procedures. Assess food condition and appropriate nutritional requirements independently of inventory arithmetic.

References

  1. Calculation and input contract: food-security/household-stock-source-gap — tool.io

Similar or alternative tools