Skip to content

Main content

Household Food Budget Price Shock Term Tool

Calculate household food budget price shock term from explicit caller-supplied inputs.

Loading tool…

Description

Sum baseline cost, then cost with each price×(1+change), and subtract shocked cost from budget.

Food affordability calculations combine prices, basket quantities, currency factors and available resources. Fixed-basket arithmetic does not by itself account for substitution, actual benefit rights or an individual household's circumstances.

Sum baseline cost, then cost with each price×(1+change), and subtract shocked cost from budget.

When to use this tool

Use Household Food Budget Price Shock Term when you need a supplied food-cost or purchasing-power calculation.

How to use the tool and how it works

  1. Enter quantities, prices, priceChanges, budget. Keep parallel arrays aligned. 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 baselineCost, shockedCost, budgetGap. Use the output convention below.

Require aligned nonnegative quantities/prices, price changes at least -1 and nonnegative budget. Sum baseline cost, then cost with each price×(1+change), and subtract shocked cost from budget.1

Input fieldMeaning and unitsAccepted input
quantitiesQuantitiesRequired. Array of finite number; maximum items 256.
pricesPricesRequired. Array of finite number; maximum items 256.
priceChangesFractional changes, for example 0.1 for +10% and -1 for a complete price reduction.Required. Array of finite number; maximum items 256.
budgetBudgetRequired. Finite number; minimum 0.
Output fieldInterpretationReturned shape
baselineCostBaseline CostRequired. Finite number.
shockedCostShocked CostRequired. Finite number.
budgetGapBudget GapRequired. Finite number.
json
{
  "input": {
    "quantities": [
      2,
      3
    ],
    "prices": [
      10,
      20
    ],
    "priceChanges": [
      0.1,
      0
    ],
    "budget": 100
  },
  "output": {
    "baselineCost": 80,
    "shockedCost": 82,
    "budgetGap": 18
  }
}

Limitations and assumptions

  • Changes are fractions, not percentages. Quantities are fixed without substitution behavior, inflation forecasts or affordability criteria being inferred.
  • 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

Align basket contents, currency, price date and household scope before comparison. Verify actual assistance rules and seek the appropriate financial or service guidance for consequential decisions.

References

  1. Calculation and input contract: food-security/household-food-budget-price-shock-term — tool.io

Similar or alternative tools