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
- Enter quantities, prices, priceChanges, budget. Keep parallel arrays aligned. Use the units and conventions below.
- Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
- 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 field | Meaning and units | Accepted input |
|---|---|---|
| quantities | Quantities | Required. Array of finite number; maximum items 256. |
| prices | Prices | Required. Array of finite number; maximum items 256. |
| priceChanges | Fractional changes, for example 0.1 for +10% and -1 for a complete price reduction. | Required. Array of finite number; maximum items 256. |
| budget | Budget | Required. Finite number; minimum 0. |
| Output field | Interpretation | Returned shape |
|---|---|---|
| baselineCost | Baseline Cost | Required. Finite number. |
| shockedCost | Shocked Cost | Required. Finite number. |
| budgetGap | Budget Gap | Required. Finite number. |
{
"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
Similar or alternative tools
- Food Voucher Purchasing Power Price Factor
Divide value by each price and return old/new price ratio.
- Food Security Seasonal Price Gap
Return their difference and subtract signed transportDifference for adjustedGap.