Skip to content

Main content

Urban Crop Consumed Donated Balance Tool

Calculate urban crop consumed donated balance from explicit caller-supplied inputs.

Loading tool…

Description

Return unaccounted=harvested-consumed-donated-spoiled-retained and edibleShare=(consumed+donated+retained)/harvested.

A farm or garden budget depends on a common area, quantity, observation period, and system boundary. Recovery, exclusions, overlap, and allocation change how a share is calculated. Supplied accounting or geometry terms remain separate from measured crop performance and verified environmental outcomes.

Return unaccounted=harvested-consumed-donated-spoiled-retained and edibleShare=(consumed+donated+retained)/harvested.

When to use this tool

Use Urban Crop Consumed Donated Balance when you need a clearly bounded area, material, resource, energy, or allocation term for supplied garden or farm records.

How to use the tool and how it works

  1. Enter harvested, consumed, donated, spoiled, retained. 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 unaccounted, edibleShare. Use the output convention below.

Return unaccounted=harvested-consumed-donated-spoiled-retained and edibleShare=(consumed+donated+retained)/harvested. Require positive harvested and nonnegative outcome quantities.1

Input fieldMeaning and unitsAccepted input
harvestedHarvestedRequired. Finite number; strictly above 0.
consumedConsumedRequired. Finite number; minimum 0.
donatedDonatedRequired. Finite number; minimum 0.
spoiledSpoiledRequired. Finite number; minimum 0.
retainedRetainedRequired. Finite number; minimum 0.
Output fieldInterpretationReturned shape
unaccountedUnaccountedRequired. Finite number.
edibleShareEdible ShareRequired. Finite number.
json
{
  "input": {
    "harvested": 100,
    "consumed": 40,
    "donated": 30,
    "spoiled": 10,
    "retained": 15
  },
  "output": {
    "unaccounted": 5,
    "edibleShare": 0.85
  }
}

Limitations and assumptions

  • Outcome totals are not constrained to harvest, so residual can be negative and share above one. Categories need a common unit and nonoverlapping records; food safety is not assessed.
  • The field tables state structural bounds; the mechanics also specify cross-field constraints. Malformed inputs and unsupported domains cause errors. A successful false flag, empty branch value, or zero placeholder has the meaning stated above and is distinct from an input error.
  • 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. Signed zero is exported as zero.

Alternative or Complementary methods

Verify the system boundary, units, and source records before combining this term into a resource or environmental report. Physical design and crop-performance questions require appropriate measurements and a broader model.

References

  1. Calculation and input contract: urban-agriculture/urban-crop-consumed-donated-balance — tool.io

Similar or alternative tools