Skip to content

Main content

Basket Commodity Share Gap Tool

Calculate basket commodity share gap from explicit caller-supplied inputs.

Loading tool…

Description

share = commodityCost/totalBasketCost; gap = share-referenceShare.

Historical price series need compatible quantities, quality, dates and currency conventions. Rebasing or splicing a series changes its numerical scale without resolving source comparability or proving a change in living standards.

share = commodityCost/totalBasketCost; gap = share-referenceShare.

When to use this tool

Use Basket Commodity Share Gap when checking a supplied historical price or index transformation.

How to use the tool and how it works

  1. Enter commodityCost, totalBasketCost, referenceShare. 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 share, gap. Use the output convention below.

Require positive totalBasketCost, commodityCost in [0,totalBasketCost] and referenceShare in [0,1]. share = commodityCost/totalBasketCost; gap = share-referenceShare.1

Input fieldMeaning and unitsAccepted input
commodityCostCommodity CostRequired. Finite number; minimum 0.
totalBasketCostTotal Basket CostRequired. Finite number; strictly above 0.
referenceShareReference ShareRequired. Finite number; minimum 0; maximum 1.
Output fieldInterpretationReturned shape
shareDimensionless selected contribution divided by the stated total; not percent.Required. Finite number.
gapSigned difference from the stated reference, using compatible units.Required. Finite number.
json
{
  "input": {
    "commodityCost": 20,
    "totalBasketCost": 100,
    "referenceShare": 0.25
  },
  "output": {
    "share": 0.2,
    "gap": -0.04999999999999999
  }
}

Limitations and assumptions

  • Money covers the same basket and period. A fractional gap is not a price inflation rate, confidence interval or complete living-standard comparison.
  • 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

Verify the original quotation basis and comparable series concepts, and use appropriate historical evidence for quality and unit adjustments.

References

  1. Calculation and input contract: economic-history/basket-commodity-share-gap — tool.io

Similar or alternative tools