Sources & Methodology
Purpose and scope
This public methodology describes the implemented nutrition calculations, reference values, food data paths and chart models in NutriLog. It is documentation of software behaviour, not a claim of clinical validation. The formulas and choices below are taken from the linked application source code. Research papers support background considerations; their appearance in the source list does not mean they validate NutriLog's specific score weights or guarantee an individual health effect.
Food database provenance
The app's food-source enumeration distinguishes CIQUAL, Swiss food composition data, USDA, Open Food Facts and local user-created records. The release also bundles an offline SQLite catalog. A source label identifies a provenance category, not laboratory testing by NutriLog. A food may have incomplete nutrients, a computed serving size or a user-edited record. The exact per-record upstream license and transformation history cannot be independently reconstructed from the enum alone.
Food entries support canonical identifiers, localized names and token columns for English, German, French, Spanish, Portuguese, Italian, Polish and Turkish. Foods and cooking states are distinguished through catalog metadata. Existing licenses, required dataset acknowledgments and attribution obligations are handled separately in the Licenses document; attribution is not a substitute for permission to redistribute data.
Serving sizes and nutrient sums
The logged food contains nutrient values with units and a quantity multiplier. Actual nutrient amount for an entry equals its catalog nutrient amount multiplied by entry.nutrientMultiplier; daily totals add the standardized amounts of each matching nutrient across logged entries. A familiar household portion is an estimated food-specific weight, not a universal gram value. Entered quantities, recipes, preparation state, serving metadata and rounding therefore affect all downstream plots.
Unknown or absent nutrient values must not be confused with a measured zero. NutriLog has a separate data-completeness indicator; users should check underlying data before relying on apparently exact results.
Food search and ranking
The local SQLite full-text search uses prefix matches over English tokens and those of the current language, with English always active. Terms are normalized, deduplicated and sorted, and candidate selection searches matched prefixes. Source, category, diet-label and cooking-state exclusions are applied through catalog metadata.
Candidates are then ranked by normalized Levenshtein edit similarity of the full displayed title against the query: similarity = 1 - editDistance(normalizedQuery, normalizedTitle) / max(title lengths). The best of English and current-localized title similarity is used. Results are grouped by rounded ten-percentage-point similarity bands; within a band, more complete food records rank first, then higher exact similarity, then stable ID. Search-token coverage itself is not a separate ranking bonus.
BMI, basal metabolic rate and daily energy
BMI = body weight in kilograms divided by the square of height in metres. Basal metabolic rate uses the Mifflin-St Jeor model: male BMR = 10 × weightKg + 6.25 × heightCm - 5 × ageYears + 5; female BMR uses -161 instead of +5. Total daily energy expenditure (TDEE) = BMR × selected activity factor. These are estimates, not measured metabolic rates.
The body-metric provider also implements algebraic inverses for weight from BMI, BMR or TDEE. They are mathematical rearrangements with fixed profile inputs; they do not establish a causal prediction of future weight loss or gain.
BMI reference visualization
The illustrative BMI plot computes a normal-distribution density, f(x) = exp(-(x - mean)\textasciicircum{}2/(2 × sigma\textasciicircum{}2))/(sigma × sqrt(2\ensuremath{\pi})), and divides it by its maximum at the mean so the peak is 1. It generates 320 points between BMI 10 and 45. The hardcoded male comparison uses mean 29.0 and sigma 4.73; the female comparison uses mean 27.7 and sigma 6.15. These constants are display-model assumptions in the code, not a current representative population survey verified by this page.
Displayed BMI markers include 17, 18.5, 25, 30, 35 and 40. A population-shaped curve does not diagnose health or represent an individualized clinical probability.
Nutrient recommendations and goal progress
Reference values and nutritional targets depend on the nutrient and can use age, biological sex selection, body weight and estimated TDEE. Each nutrient defines its own calculation and reference type: minimum, maximum or special target/range. Source links for reference policies are listed below, including DGE, WHO and EFSA. Some nutrients have no implemented daily recommendation.
For energy, the reference converter creates a range centred on TDEE with an offset of 300 standardized energy units; the progress display also calculates a separate 90%–110% energy band for its detailed view. These are different constructs and should not be presented as equivalent clinical boundaries. A progress ratio compares recorded consumption against its displayed target. Overshooting a minimum is not automatically equivalent to overshooting a maximum.
Nutrient quality and Body Balance
The nutrient-reference model maps an amount to a quality score in [0,1] according to its minimum, maximum or range specification. A signal score is a weighted mean: signalScore = sum(nutrientQuality × signalWeight) / sum(signalWeight). Missing data, absent references and relevant filtering influence the displayed state; a high score therefore is not a medical measurement.
The radar contains six sub-balances rather than treating the aggregate Body Balance as a seventh dimension. Signal categories correspond to energy, regeneration/recovery, hydration, defense, concentration/focus and metabolism. Weights in these categories are application design choices and are not measured effect sizes from the listed clinical studies. The high-level radar display state averages the six individual scores, treating unavailable scores as zero for that particular state calculation.
Body Balance scores and hourly snapshots are derived from food history and reference values rather than written as permanent server-side health assessments.
Daily pace and hourly radar
The day-pace series compares what was actually logged by each hourly boundary with the fraction of daily goals expected by that hour. For the current and future hourly segments the observed intake is held at the current real amount, while the expected pace increases. This deliberately does not forecast future consumption. Earlier days can be evaluated as completed days; future dates do not have a completed-day pace.
Charts present approximations generated by the local app, not direct sensor measurements of bodily condition.
Food health grade
The food grade computes a per-100-g points model from energy in kJ, sugars, saturated fat and sodium, with fibre and protein as potential deductions. Energy thresholds are 335–3350 kJ in ten steps, sugars 4.5–45 g, saturated fat 1–10 g, sodium 90–900 mg, fibre has five thresholds and protein has five. If negative points reach 11 or more, protein deductions are excluded; fibre remains eligible. Final raw score = negativePoints - eligiblePositivePoints.
The normalized display percentage equals clamp(100 × (40 - rawScore)/55, 0, 100). Grades are A for rawScore ≤ -1, B for ≤ 2, C for ≤ 10, D for ≤ 18 and E otherwise. Sodium may be estimated from salt using a salt-to-sodium factor of 2.5. The app flags scores as based on limited data when its completeness measure falls below 0.75. This score is an app-specific implementation; it must not be mistaken for independent certification of a branded nutrient-scoring system.
Data completeness
For a food/product structure, completeness is a ratio of present fields to potential fields, including title, description, barcode, component/product name, product weight and every nutrient listed in the application's trackable nutrient enum. All tracked nutrients are treated equally for this completeness indicator. Completeness is about how much information is represented, not whether the represented measurements are accurate.
Caffeine and alcohol timelines
Caffeine uses exponential elimination: remaining milligrams from an event after t hours = doseMg × exp(-ln(2) × t/5), with a five-hour half-life assumption and events ignored after 24 hours. Contributions from recorded events are summed. Caffeine chart points are sampled every 30 minutes and may include entries from the previous two days.
The alcohol display uses a simplified Widmark-inspired per-event calculation: initial contribution = alcoholGrams/(weightKg × distributionFactor); subtract 0.15 per hour, clamp at zero, then multiply by a linear absorption factor clamped between 0 and 1 over the first 0.75 hours. The code uses factors 0.68 (male), 0.55 (female), or 0.62 (unknown), considers events for up to 16 hours and sums their contributions. This is an approximation, not a dependable blood-alcohol measurement, and must never be used to judge fitness to drive, operate machinery or make legal decisions.
The timeline includes a plot even when calculated values are zero. If no usable body weight is available, the timeline provider uses a fallback weight of 75 kg.
Monthly visualizations and progress ranks
The monthly goal heatmap groups entries by local calendar day. It maps positive goal progress to four opacity levels by ceiling the ratio to the next quarter step: ceil(4 × clamp(progress,0,1))/4. Zero progress stays empty and values above 100% display at 100%. These intensity bands are visualization choices, not direct health measurements.
The local tracking-rank display requires both active-day and total-entry thresholds; the next-rank progress uses the minimum of the two independently normalized progress fractions. A premium account can override the displayed activity rank. A source-code comment explicitly describes certain rank-based Magic Wand and Optimize allowances as display-only, not the server-enforced AI quotas. The actual backend AI limits are separate from these local progress visuals.
Optimization and suggestions
The local optimization provider assembles candidate foods from the existing local product entries rather than searching the complete catalog as a new global optimization pool. It evaluates gaps against target nutrients, user choices, and available foods, and reports before/after totals. A suggested food combination is a computational proposal, not a nutritionally complete meal plan or professional treatment advice.
Optimization can expose or exclude certain nutrients according to minimum, maximum and special target rules, but all results depend on input completeness and current scoring choices. Users should inspect suggestions before saving them.
Scientific references and interpretation
The following linked source declarations are transcribed from the checked-in NutrientSources and HealthSignalSources classes. They represent reference material chosen by the application maintainers. They have not all been individually checked for current publication status, updated guideline versions, applicability to every age group, or whether a research result justifies a specific code constant. Citations are for transparency and must not be interpreted as an endorsement of NutriLog by the publishers.
Scientific guidelines, observational findings, controlled studies, mathematical models and NutriLog-specific heuristic weights are not interchangeable forms of evidence. Comparisons and plots can use simplified models for usability.
Transparency and corrections
NutriLog aims to show the basis of its estimates and to correct material methodological errors. Report suspicious nutrition data, unsupported references, misleading scores or mathematical errors to info@nutri-log.com. Methodology changes may change historical plots or estimated values when the app is updated.
This methodology page supplements the Privacy & Cookie Policy and Terms of Use, and does not supersede third-party dataset or code license obligations.
Reference bibliography
- DGE Referenzwerte-Tool (DGE). https://www.dge.de/wissenschaft/referenzwerte-tool/
- DGE Referenzwerte: Fett, essenzielle Fettsäuren (DGE). https://www.dge.de/wissenschaft/referenzwerte/fett-essenzielle-fettsaeuren/
- DGE Referenzwerte: Kohlenhydrate (DGE). https://www.dge.de/wissenschaft/referenzwerte/kohlenhydrate/
- WHO Guideline: Sugars intake (WHO). https://www.who.int/publications/i/item/9789241549028
- DGE Referenzwerte: Protein (DGE). https://www.dge.de/wissenschaft/referenzwerte/protein/
- DGE Referenzwerte: Ballaststoffe (DGE). https://www.dge.de/wissenschaft/referenzwerte/ballaststoffe/
- DGE Referenzwerte: Wasser (DGE). https://www.dge.de/wissenschaft/referenzwerte/wasser/
- PMC: Creatine supplementation (PMC). https://pmc.ncbi.nlm.nih.gov/articles/PMC5469049/
- EFSA: Dietary reference values for fats (Omega-3) (EFSA). https://efsa.onlinelibrary.wiley.com/doi/10.2903/j.efsa.2012.2815
- EFSA: Caffeine (EFSA). https://www.efsa.europa.eu/en/topics/topic/caffeine
- DGE Referenzwerte: Alkohol (DGE). https://www.dge.de/wissenschaft/referenzwerte/alkohol/
- DGE Referenzwerte: Vitamin A (DGE). https://www.dge.de/wissenschaft/referenzwerte/vitamin-a/
- DGE Referenzwerte: Thiamin (Vitamin B1) (DGE). https://www.dge.de/wissenschaft/referenzwerte/thiamin/
- DGE Referenzwerte: Riboflavin (Vitamin B2) (DGE). https://www.dge.de/wissenschaft/referenzwerte/riboflavin/
- DGE Referenzwerte: Niacin (Vitamin B3) (DGE). https://www.dge.de/wissenschaft/referenzwerte/niacin/
- DGE Referenzwerte: Pantothensäure (Vitamin B5) (DGE). https://www.dge.de/wissenschaft/referenzwerte/pantothensaeure/
- DGE Referenzwerte: Vitamin B6 (DGE). https://www.dge.de/wissenschaft/referenzwerte/vitamin-b6/
- DGE Referenzwerte: Biotin (Vitamin B7) (DGE). https://www.dge.de/wissenschaft/referenzwerte/biotin/
- DGE Referenzwerte: Folat (Vitamin B9) (DGE). https://www.dge.de/wissenschaft/referenzwerte/folat/
- DGE Referenzwerte: Vitamin B12 (DGE). https://www.dge.de/wissenschaft/referenzwerte/vitamin-b12/
- DGE Referenzwerte: Vitamin C (DGE). https://www.dge.de/wissenschaft/referenzwerte/vitamin-c/
- DGE Referenzwerte: Vitamin D (DGE). https://www.dge.de/wissenschaft/referenzwerte/vitamin-d/
- DGE Referenzwerte: Vitamin E (DGE). https://www.dge.de/wissenschaft/referenzwerte/vitamin-e/
- DGE Referenzwerte: Vitamin K (DGE). https://www.dge.de/wissenschaft/referenzwerte/vitamin-k/
- DGE Referenzwerte: Natrium/Salz (DGE). https://www.dge.de/wissenschaft/referenzwerte/natrium/
- DGE Referenzwerte: Calcium (DGE). https://www.dge.de/wissenschaft/referenzwerte/calcium/
- DGE Referenzwerte: Eisen (DGE). https://www.dge.de/wissenschaft/referenzwerte/eisen/
- DGE Referenzwerte: Magnesium (DGE). https://www.dge.de/wissenschaft/referenzwerte/magnesium/
- DGE Referenzwerte: Phosphor (DGE). https://www.dge.de/wissenschaft/referenzwerte/phosphor/
- DGE Referenzwerte: Kalium (DGE). https://www.dge.de/wissenschaft/referenzwerte/kalium/
- DGE Referenzwerte: Zink (DGE). https://www.dge.de/wissenschaft/referenzwerte/zink/
- DGE Referenzwerte: Selen (DGE). https://www.dge.de/wissenschaft/referenzwerte/selen/
- DGE Referenzwerte: Kupfer, Mangan, Chrom, Molybdän (DGE). https://www.dge.de/wissenschaft/referenzwerte/kupfer-mangan-chrom-molybdaen/
- WHO Guideline: Saturated and trans fat intake (17 July 2023) (WHO). https://www.who.int/publications/i/item/9789240073630
- WHO: WHO updates guidelines on fats and carbohydrates (WHO). https://www.who.int/news/item/17-07-2023-who-updates-guidelines-on-fats-and-carbohydrates
- Soluble fiber supplementation and glycemic control in adults with type 2 diabetes: Systematic Review and Meta-analysis (PubMed). https://pubmed.ncbi.nlm.nih.gov/33162192/
- Fasting and energy restricting diets and glucose and insulin control: Systematic Review and Meta-analysis (PubMed). https://pubmed.ncbi.nlm.nih.gov/32744094/
- Varying protein amounts and types and diet-induced thermogenesis: Systematic Review and Meta-analysis (PubMed). https://pubmed.ncbi.nlm.nih.gov/39486625/
- Oral magnesium supplements and insulin resistance in diabetes and pre-diabetes: Updated Systematic Review and Meta-analysis (PubMed). https://pubmed.ncbi.nlm.nih.gov/42426860/
- Zinc supplementation and glycemic control for diabetes prevention and management: Systematic Review and Meta-analysis (PubMed). https://pubmed.ncbi.nlm.nih.gov/31161192/
- De novo lipogenesis, lipid kinetics, and whole-body lipid balances after acute alcohol consumption (PubMed). https://pubmed.ncbi.nlm.nih.gov/10539756/
- Oral iron supplementation and cognition in older children and adults: Systematic Review and Meta-analysis (PubMed). https://pubmed.ncbi.nlm.nih.gov/20100340/
- Dehydration Impairs Cognitive Performance: A Meta-analysis (PubMed). https://pubmed.ncbi.nlm.nih.gov/29933347/
- Omega-3 supplementation and cognitive function: Systematic Review and Dose Response Meta-analysis (PubMed). https://pubmed.ncbi.nlm.nih.gov/40836005/
- Acute effect of caffeine on attention: Systematic Review and Meta-analysis (PubMed). https://pubmed.ncbi.nlm.nih.gov/40335666/
- Creatine supplementation and cognitive function in adults: Systematic Review and Meta-analysis (PubMed). https://pubmed.ncbi.nlm.nih.gov/39070254/
- Acute alcohol administration and working memory: Systematic Review and Meta-analysis (PubMed). https://pubmed.ncbi.nlm.nih.gov/35075512/
- Zinc for prevention or treatment of acute viral respiratory tract infections in adults: Systematic Review and Meta-analysis (BMJ Open). https://bmjopen.bmj.com/content/11/11/e047474
- Vitamin D supplementation to prevent acute respiratory infections: Systematic Review and Meta-analysis (Nutrition Journal). https://link.springer.com/article/10.1186/s12937-024-00990-w
- Vitamin C supplements and respiratory tract infections: Systematic Review and Meta-analysis (PubMed). https://pubmed.ncbi.nlm.nih.gov/34967304/
- Host defense mechanisms in protein energy malnutrition (PubMed). https://pubmed.ncbi.nlm.nih.gov/6782841/
- Excessive vitamin A supplementation and acute respiratory tract infections: Systematic Review and Meta-analysis (PMC). https://pmc.ncbi.nlm.nih.gov/articles/PMC8706818/
- Alcohol and the risk of pneumonia: Systematic Review and Meta-analysis (BMJ Open). https://doi.org/10.1136/bmjopen-2018-022344
- Rehydration and recovery of fluid balance after exercise (PubMed). https://pubmed.ncbi.nlm.nih.gov/11131686/
- Postexercise rehydration: potassium-rich drinks versus water and a sports drink (PubMed). https://pubmed.ncbi.nlm.nih.gov/25017113/
- Caffeine ingestion and fluid balance: a review (PubMed). https://pubmed.ncbi.nlm.nih.gov/19774754/
- Restoration of fluid balance after exercise-induced dehydration: effects of alcohol consumption (PubMed). https://pubmed.ncbi.nlm.nih.gov/9338423/
- Dietary protein supplementation and recovery from resistance exercise-induced muscle damage: Systematic Review and Meta-analysis (PubMed). https://pubmed.ncbi.nlm.nih.gov/36513777/
- Carbohydrate with and without protein and muscle glycogen re-synthesis during post-exercise recovery: Systematic Review and Meta-analysis (PubMed). https://pubmed.ncbi.nlm.nih.gov/33507402/
- Magnesium supplementation and muscle soreness: Systematic Review (PubMed). https://pubmed.ncbi.nlm.nih.gov/38970118/
- LC n-3 PUFA supplementation and muscle pain, function and damage following exercise: Systematic Review and Meta-analysis (PubMed). https://pubmed.ncbi.nlm.nih.gov/42124047/
- Vitamin D supplementation and muscle function and recovery after exercise-induced muscle damage: Systematic Review (PubMed). https://pubmed.ncbi.nlm.nih.gov/36149089/
- Alcohol consumption and recovery following resistance exercise: Systematic Review (PubMed). https://pubmed.ncbi.nlm.nih.gov/33467356/
- Low Energy Availability and Relative Energy Deficiency in Sport: Systematic Review and Meta-analysis (PubMed). https://pubmed.ncbi.nlm.nih.gov/39485653/
- Acute carbohydrate feeding and endurance performance: Systematic Review and Meta-analysis (PubMed). https://pubmed.ncbi.nlm.nih.gov/37449467/
- Fluid Intake Following Dehydration and Athletic and Cognitive Performance: Systematic Review and Meta-analysis (PubMed). https://pubmed.ncbi.nlm.nih.gov/28316054/
- Iron supplementation and fatigue in non-anaemic iron-deficient adults: Systematic Review (PubMed). https://pubmed.ncbi.nlm.nih.gov/29626044/
- Mineral and Trace Element Supplementation in Exercise and Athletic Performance: Systematic Review (PubMed). https://pubmed.ncbi.nlm.nih.gov/30909645/
- Magnesium supplementation and muscle fitness: Meta-analysis and Systematic Review (PubMed). https://pubmed.ncbi.nlm.nih.gov/29637897/
- Mental and physical benefits of a high-dose B-complex multivitamin/mineral supplement: Evidence Review (PubMed). https://pubmed.ncbi.nlm.nih.gov/34530623/
- Vitamin D3 and self-perceived fatigue: Double-blind randomized placebo-controlled trial (PubMed). https://pubmed.ncbi.nlm.nih.gov/28033244/
- Intravenous vitamin C and fatigue in office workers: Double-blind randomized controlled trial (PubMed). https://pubmed.ncbi.nlm.nih.gov/22264303/
- EFSA: Dietary Reference Values (EFSA). https://www.efsa.europa.eu/en/topics/topic/dietary-reference-values
- WHO Guideline (9789241549028) (WHO). https://www.who.int/publications/i/item/9789241549028
- WHO Publikation (9789240073593) (WHO). https://www.who.int/publications/i/item/9789240073593
- WHO Publikation (9789241504836) (WHO). https://www.who.int/publications/i/item/9789241504836
- PMC Artikel PMC7019700 (PMC). https://pmc.ncbi.nlm.nih.gov/articles/PMC7019700/
- PMC Artikel PMC5867436 (PMC). https://pmc.ncbi.nlm.nih.gov/articles/PMC5867436/
- PMC Artikel PMC8978023 (PMC). https://pmc.ncbi.nlm.nih.gov/articles/PMC8978023/
- PMC Artikel PMC11547435 (PMC). https://pmc.ncbi.nlm.nih.gov/articles/PMC11547435/
- EFSA: Dietary reference values for water (2010) (EFSA). https://efsa.onlinelibrary.wiley.com/doi/pdf/10.2903/j.efsa.2010.1459
- PMC Artikel PMC7019735 (PMC). https://pmc.ncbi.nlm.nih.gov/articles/PMC7019735/
- PubMed Artikel 31963293 (PubMed). https://pubmed.ncbi.nlm.nih.gov/31963293/
- PMC Artikel PMC11275561 (PMC). https://pmc.ncbi.nlm.nih.gov/articles/PMC11275561/
- EFSA Artikel (10.2903/j.efsa.2015.4102) (EFSA). https://efsa.onlinelibrary.wiley.com/doi/10.2903/j.efsa.2015.4102
Implementation reference
The Flutter app documents the underlying methods in the core providers and source enums.