Skip to content

Main content

Food Bank Edible Weight Packaging Deduction Tool

Calculate food bank edible weight packaging deduction from explicit caller-supplied inputs.

Loading tool…

Description

Subtract both and add overlap once for edible mass and fraction.

Food quantities depend on whether their basis is gross, edible, drained, wet, dry or solid mass. Changing the denominator can change a reported concentration or yield without changing the actual sample or proving anything about its safety.

Subtract both and add overlap once for edible mass and fraction.

When to use this tool

Use Food Bank Edible Weight Packaging Deduction when you need a stated food-mass, composition-basis or yield calculation.

How to use the tool and how it works

  1. Enter grossMass, packaging, inedible, packagingInInedible. 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 edibleMass, edibleShare. Use the output convention below.

Require positive gross mass and bounded nonnegative packaging/inedible overlap so their union fits gross. Subtract both and add overlap once for edible mass and fraction.1

Input fieldMeaning and unitsAccepted input
grossMassGross MassRequired. Finite number; strictly above 0.
packagingPackagingRequired. Finite number; minimum 0.
inedibleInedibleRequired. Finite number; minimum 0.
packagingInInediblePackaging In InedibleRequired. Finite number; minimum 0.
Output fieldInterpretationReturned shape
edibleMassEdible MassRequired. Finite number.
edibleShareEdible Share Unit: 1.Required. Finite number.
json
{
  "input": {
    "grossMass": 100,
    "packaging": 10,
    "inedible": 20,
    "packagingInInedible": 5
  },
  "output": {
    "edibleMass": 75,
    "edibleShare": 0.75
  }
}

Limitations and assumptions

  • PackagingInInedible prevents double subtraction. The categorization is supplied and does not establish whether recovered food is safe to eat.
  • 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 measured quantities and preparation records on a common basis. Use the appropriate laboratory, nutritional or safety assessment when arithmetic alone cannot establish the intended property.

References

  1. Calculation and input contract: food-security/food-bank-edible-weight-packaging-deduction — tool.io

Similar or alternative tools