Description
Compare fractional-pack cost with the cost of sufficient whole food packs.
Food-assistance records track sources, quantities, vouchers, transfers and purchasing units. Nominal person-rations and whole-pack costs depend on supplied assumptions; they do not determine nutritional adequacy or legal entitlements. Returned quantities also do not establish that food can safely be redistributed.
Compare fractional-pack cost with the cost of sufficient whole food packs.
When to use this tool
Use Food Basket Local Pack Price when checking the stated supplied assistance inventory, quantity or cost convention.
How to use the tool and how it works
- Enter packPrice, packQuantity, requiredQuantity. Use the units and conventions below.
- Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
- Read fractionalPackCost, wholePacksNeeded, wholePackCost. Use the output convention below.
Require nonnegative pack price/required quantity and packQuantity>0. Return prorated fractional-pack cost, ceil(required/packQuantity) whole packs and their full purchase cost.1
| Input field | Meaning and units | Accepted input |
|---|---|---|
| packPrice | Pack Price | Required. Finite number; minimum 0. |
| packQuantity | Pack Quantity | Required. Finite number; strictly above 0. |
| requiredQuantity | Required Quantity | Required. Finite number; minimum 0. |
| Output field | Interpretation | Returned shape |
|---|---|---|
| fractionalPackCost | Prorated equivalent cost; actual whole-pack cost is reported separately. | Required. Finite number. |
| wholePacksNeeded | Whole Packs Needed | Required. Safe integer. |
| wholePackCost | Whole Pack Cost | Required. Finite number. |
{
"input": {
"packPrice": 3,
"packQuantity": 2,
"requiredQuantity": 5
},
"output": {
"fractionalPackCost": 7.5,
"wholePacksNeeded": 3,
"wholePackCost": 9
}
} Limitations and assumptions
- Fractional cost need not be purchasable; pack sizes, prices, availability and an adequate food basket are supplied rather than assessed.
- 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
Use verified inventory and program records with qualified nutrition, food-safety and humanitarian professionals for actual dietary, distribution or benefit decisions.
References
Similar or alternative tools
- Food Access Queue Time Cost
Express food-access queue time as a supplied hourly-value cost.
- Food Parcel Component Shortfall
Compare explicit compatible food-parcel component quantities without prescribing nutritional requirements.