How we calculate the Index
The Canadian Food Inflation Index is a confidence-weighted blend of three independent inflation signals. The published reading is reproducible from the raw upstream data using only a browser and a spreadsheet. This page walks through the math step by step.
For the formal version with full notation, derivation matrix, and edge cases, see the methodology pillar (which links the ADR-numbered changelog).
1. The three sources
Each source contributes a base weight and a freshness timestamp.
- Statistics Canada — CPI Food Component (Table 18-10-0004-01, NSA). The gold-standard published methodology. Base weight
0.45. - Bank of Canada — CPI all-items (Valet Web Service, series V41690973). Cross-checks directional accuracy across the broader basket. Base weight
0.35. - Internal price-history observations. Daily-cadence shelf-price observations contributed by the project. Base weight
0.20.
Base weights sum to 1.00 — the blend re-normalizes against the actual contributing weights so a fallback or missing source does not under-weight the headline.
2. Freshness decay
A source loses weight as its most recent published value ages. The decay is exponential with a 30-day half-life — a source one publication cycle stale carries half its base weight. This is anchored to the monthly publication cadence of StatsCan and BoC.
freshness_decay = 2 ^ (-lag_days / 30)3. Fallback factor
When a source could not refresh on its expected cadence (StatsCan outage, Valet timeout, fork pipeline operator self-hosting), it retains a small fraction of its base weight rather than zeroing out entirely. The fallback factor is 5% — bounds contamination from a wild stale value to less than 0.1 percentage points when 1 of 3 sources falls back.
effective_weight = base_weight × fallback_factor × freshness_decay4. Blended value
The headline reading is the weighted average of each source's published value, weighted by the effective weights from above.
blended_value = Σ(value_i × effective_weight_i) / Σ(effective_weight_i)5. Source agreement
Every reading carries a source-disagreement scalar between 0 and 1. Higher means tighter agreement across contributing sources; lower means the sources are telling different stories about the same period. The scalar is published alongside the blended value so a reader can decide how confident to be in the reading.
6. Try it yourself
The blended value is reproducible. Pick a period (canonical YYYY-MM) and a basket, then fetch:
GET https://canadianfoodindex.ca/api/v1/inflation-index/series?period=2026-04&basket=food_combinedThe response carries the per-source values + each source's freshness timestamp + the effective weights. Multiplying through recovers the published blended value exactly.
Read next
- Three baskets the Index publishes — food_combined, food_stores, food_restaurants.
- Full methodology pillar — formal version with ADR-numbered changelog + math notation.
- About the Index — editorial posture + how decisions get made.
Looking for something else?
- For shoppers (in progress)
Why grocery prices changed this month, where prices are highest, and what the headline number means in real-life basket terms.
- For business (in progress)
Free B2B inflation index for CPG brands, retailers, and pricing analysts. JSON + CSV + OData; source attribution on every reading.
- For press (in progress)
Monthly Canadian food inflation readings with reproducible math and citable source attribution. Embed charts and quotes.
- For researchers (in progress)
Open methodology + raw monthly levels per basket. Dataset JSON-LD on every page; X-13ARIMA-SEATS seasonal adjustment derivation documented.
- For educators (in progress)
Index design walkthroughs for stats / data / journalism / economics classrooms. Three-baskets diagram and worked-example calculator.