The science behind the app
Tracking what you eat is only worth anything if the numbers hold up. Every formula Cal 3D uses is here — with its published source and the file that runs it.
Last updated:
This is not medical advice
Cal 3D is not a medical device. It makes no diagnoses, treats no conditions and does not replace advice from a doctor or dietitian. Talk to a medical professional before changing your diet — especially with diabetes, kidney or liver disease, during pregnancy or breastfeeding, and with food allergies. The full health notice is part of the terms of use.
Calorie target and pace
These are the sources behind the daily target the app shows you at the end of setup.
Resting metabolic rate. Cal 3D uses Mifflin-St Jeor: 10 × kg + 6.25 × cm − 5 × years, plus 5 for men and minus 161 for women. If you give no sex, you get the midpoint of both terms (−78).
Mifflin MD, St Jeor ST, Hill LA, Scott BJ, Daugherty SA, Koh YO. A new predictive equation for resting energy expenditure in healthy individuals. Am J Clin Nutr. 1990;51(2):241–247.
pubmed.ncbi.nlm.nih.govIn the app:
nutritionGoals.ts:9–17From resting rate to daily burn. The three activity bands multiply by 1.3, 1.55 and 1.725 — the standard PAL bands for little, moderate and heavy movement.
FAO/WHO/UNU. Human Energy Requirements. Report of a Joint FAO/WHO/UNU Expert Consultation. FAO Food and Nutrition Technical Report Series 1. Rome; 2004.
fao.orgIn the app:
plan.ts:39–78How fast a goal can be reached. One kilogram of body mass is planned at 7,700 kcal, which is where the daily surplus or deficit for your chosen pace comes from.
Wishnofsky M. Caloric equivalents of gained or lost weight. Am J Clin Nutr. 1958;6(5):542–546.
pubmed.ncbi.nlm.nih.govIn the app:
plan.ts:39–78Floors. The target never drops below 1,200 kcal, and never below 1,500 for men — whatever weight and pace would work out to arithmetically.
National Institutes of Health, National Heart, Lung, and Blood Institute. Clinical Guidelines on the Identification, Evaluation, and Treatment of Overweight and Obesity in Adults: The Evidence Report. NIH Publication 98-4083; 1998.
nhlbi.nih.gov (PDF)In the app:
plan.ts:39–78
Burned calories
These are the sources behind the calories a logged workout adds back to your target.
Every burn in the app comes from one formula: kcal = MET × body weight in kg × hours. A MET is the metabolic equivalent of task — the energy cost of an activity expressed as a multiple of sitting quietly. Cal 3D quotes its MET values unchanged from the 2024 Adult Compendium, which is what the exercise-science literature uses. The Run picker is not an effort slider but three named paces, and each one is the published row for that pace: sprinting at 22 km/h is the 14 mph row (23.0), jogging at 10 km/h is the 6–6.3 mph row (9.3), and the easy 5 km/h step is a walking row (3.8) because that step is labelled as a walk. Weight training spans 3.5 to 6.0 across three published rows. The two pickers and the fourteen activities behind the Describe card all read from the same table, and each row carries its verbatim Compendium description in the source. When you describe a workout in words, the model is asked for a MET value and a duration — never for a calorie number, because it cannot know your body weight and the answer would then disagree with the picker one screen over. Without a body weight in your profile the estimate uses 70 kg, and it says so rather than quietly producing a smaller number.
Herrmann SD, Willis EA, Ainsworth BE, et al. (2024). 2024 Adult Compendium of Physical Activities: A third update of the energy costs of human activities. Journal of Sport and Health Science 13(1):6–12. pacompendium.com.
pacompendium.comIn the app:
plan.ts:39–78What that number is, stated plainly: MET × kg × hours is GROSS energy. One MET is resting metabolism, so the figure includes the calories your body would have spent lying still for the same hour. The Institute of Medicine subtracts that resting hour and works with (MET − 1); at 75 kg the resting share is about a tenth of a run, a fifth of a lifting session and two fifths of an hour of yoga. Cal 3D does not subtract it, and the reason is not laziness but that two known errors point in opposite directions and are of similar size: the Compendium says its own values run low (“the standard MET values … underestimated the energy cost”), while the 1-MET anchor runs high — measured resting metabolism is 0.84 to 0.89 kcal per kg per hour, and across seven realistic body profiles that anchor sits 5 % to 47 % above what the app itself calculates as your basal rate. Correcting one and not the other would be false precision. This is also why adding burned calories back to your target is off unless you switch it on: the activity level you picked during setup is already indexed by workouts per week, so a logged workout would be counted a second time. The Compendium itself is explicit that it “was not developed to determine the precise energy cost of activities within an individual” — it is the best published table there is, and it is a table of averages.
Institute of Medicine. Dietary Reference Intakes for Energy, Carbohydrate, Fiber, Fat, Fatty Acids, Cholesterol, Protein, and Amino Acids. Washington, DC: The National Academies Press; 2005.
nap.nationalacademies.orgIn the app:
plan.ts:39–78
Protein, fat and carbohydrate
These are the sources behind how the daily target is split across the three macros.
How much protein — and the app answers this twice, on purpose. In the app itself: 1.6 to 2.2 grams per kilogram of bodyweight depending on your goal, at the upper end in a deficit, because that is where lean mass needs protecting. On the setup screen that first shows you a plan, the daily energy is split instead — 25 % protein, 50 % carbohydrate, 25 % fat — so that the first plan you see is built the same way the rest of that screen is. Both are defensible; they are different numbers and the app does not pretend otherwise.
Aragon AA, Schoenfeld BJ, Wildman R, Kleiner S, VanDusseldorp T, Taylor L, et al. International Society of Sports Nutrition position stand: diets and body composition. J Int Soc Sports Nutr. 2017;14:16.
pubmed.ncbi.nlm.nih.govIn the app:
nutritionGoals.ts:9–17 · plan.ts:39–78The ranges within which a split makes sense at all (AMDR). Fat defaults to 25 % of energy and carbohydrate takes the remainder.
Institute of Medicine. Dietary Reference Intakes for Energy, Carbohydrate, Fiber, Fat, Fatty Acids, Cholesterol, Protein, and Amino Acids. Washington, DC: The National Academies Press; 2005.
nap.nationalacademies.orgIn the app:
nutritionGoals.ts:9–17The conversion between grams and kilocalories: 4 for protein, 4 for carbohydrate, 9 for fat. Cal 3D also uses it to check every recognised meal for nutrition values that contradict each other.
FAO. Food Energy — Methods of Analysis and Conversion Factors. FAO Food and Nutrition Paper 77. Rome; 2003.
fao.orgIn the app:
aiScan.ts:362–364
Fibre, sugar and salt
These are the sources behind the three values that run alongside the macros.
Fibre. 14 grams per 1,000 kilocalories, plus the adequate intake by age and sex during setup (38 g for men up to 50, 25 g for women up to 50).
Institute of Medicine. Dietary Reference Intakes for Energy, Carbohydrate, Fiber, Fat, Fatty Acids, Cholesterol, Protein, and Amino Acids. Washington, DC: The National Academies Press; 2005.
nap.nationalacademies.orgIn the app:
plan.ts:106–120Sugar. Cal 3D counts TOTAL sugar — what the nutrition data reports for a food, including the sugar naturally in fruit and milk — so its ceiling is not the same quantity as the WHO limit below, which is about free sugars only. In the app the ceiling is 10 % of daily energy; the setup plan uses 15 %, which is 30 % of its carbohydrate allowance. The WHO guideline is cited as the anchor for the stricter of the two, not as a claim that the app measures free sugars.
World Health Organization. Guideline: Sugars Intake for Adults and Children. Geneva; 2015.
who.intIn the app:
nutritionGoals.ts:9–17 · plan.ts:39–78Sodium. 2,300 milligrams a day as an upper limit, the same for everyone.
U.S. Department of Agriculture and U.S. Department of Health and Human Services. Dietary Guidelines for Americans, 2020–2025. 9th ed.; December 2020.
odphp.health.govIn the app:
plan.ts:39–78
Recognition and nutrition data
These are the sources behind what Cal 3D recognises on the plate — and behind the nutrition values it looks up for it.
The benchmark a photo estimate has to be measured against. 28 weighed plates, 29.9 % MAPE on kilocalories — and the finding that the error has a direction: large portions read low, small ones high. These numbers describe the inherited photo pipeline, not Cal 3D itself.
Thames Q, Karpur A, Norlund W, Xia Q, Panait L, Weyand T, Sim J. Nutrition5k: Towards Automatic Nutritional Understanding of Generic Food. CVPR 2021:8903–8911.
openaccess.thecvf.comIn the app:
measuredPortion.ts:5–12The built-in food database: around 8,600 generic entries, almost a third of them carrying a density in grams per millilitre — the exact column that turns a measured volume into a weight. Since 23 August 2026 Cal 3D also carries an offline extract of 187,621 packaged products from USDA FoodData Central Branded Foods. Those are public domain, so they are kept in their own files, physically apart from the Open Food Facts extract, which is share-alike under the ODbL; the two are joined only in a search result, never in one table. Measured before it shipped: not one of the 187,621 barcodes appears in the Open Food Facts extract, and 165,068 of 165,190 distinct name-and-brand keys are new — the two sets add up rather than repeat each other.
U.S. Department of Agriculture, Agricultural Research Service. FoodData Central. fdc.nal.usda.gov.
fdc.nal.usda.govLicence: public domain (CC0 1.0)In the app:
foodDb.ts:1–40British cooking, and the states food is actually eaten in. Yorkshire pudding, haggis, bubble and squeak, a bakewell tart — none of them exist in an American database. Neither does a whole category that no brand database can carry, because nobody sells a package of it: the generic preparation states (“boiled in unsalted water”, “weighed with shells”, “canned in oil, drained”). Cal 3D carries 2,854 of the 2,887 CoFID entries offline — the 33 left out have no calorie figure in CoFID at all. Measured before it shipped, against 579,217 distinct names from Open Food Facts and USDA together: 93.3 % of these rows appear in neither. Laboratory analyses, and display side only — CoFID records no density, so a value from it never feeds back into a measurement.
McCance and Widdowson's The Composition of Foods Integrated Dataset (2021). Public Health England and Department of Health and Social Care, London. Available at gov.uk.
gov.ukLicence: Open Government Licence v3.0In the app:
foodDb.ts:1–40French cooking. The dishes a French kitchen actually produces — cassoulet, choucroute garnie, andouillette, blanquette de veau, rillettes — exist in no American database, the same way Speisequark exists in none. Cal 3D carries 2,298 of the 3,185 Ciqual entries offline: the ones that carry an energy value. The other 887 have no calorie figure in Ciqual at all — neither kcal nor kJ — so a calorie tracker can do nothing with them. These are laboratory analyses by the French food-safety agency, not label transcriptions, and they answer on the display side only: a value from them is never fed back into a measurement, because Ciqual records no density.
ANSES (2020). Table de composition nutritionnelle des aliments Ciqual. Agence nationale de sécurité sanitaire de l’alimentation, de l’environnement et du travail, Maisons-Alfort. ciqual.anses.fr.
ciqual.anses.frLicence: Licence Ouverte 2.0In the app:
foodDb.ts:1–40Nordic cooking, and a food safety authority that publishes its laboratory work as open data. Brunost — the brown whey cheese — lutefisk, kjøttkaker, fiskekaker, lefse: none of them exist in an American, German, French or British database. Cal 3D carries 2,118 of the 2,121 Matvaretabellen entries offline; the three left out carry no energy value at all. Two details worth naming. Matvaretabellen keeps added sugar and total sugar in separate fields, and Cal 3D reads the total one — reading the other would print 0 g of sugar on every raw banana. And 1,815 of the entries carry a real portion size, which is rare in a national table. Laboratory analyses, display side only: Matvaretabellen records no density, so a value from it never feeds back into a measurement.
Mattilsynet, Helsedirektoratet og Universitetet i Oslo (2026). Matvaretabellen. Norwegian Food Safety Authority, Oslo. matvaretabellen.no.
matvaretabellen.noLicence: NLOD 2.0 — data adapted by Cal 3DIn the app:
foodDb.ts:1–40Cuts and cooking states, in both official languages. The Canadian Nutrient File descends from the American standard reference, so the obvious worry was that it adds nothing. Measured before it shipped, against the 1,024,611 distinct names Cal 3D already carried from six sources: 5,582 of its 5,690 entries (98.1 %) appear in none of them, and 3,490 (61.3 %) are new down to the opening words. What it contributes is the parts and preparations nobody sells in a package — chicken gizzard simmered, veal leg braised, beaver tail roasted — and every one of the 5,690 carries calories, protein, carbohydrate and fat, a completeness none of the other sources reaches. Both the English and the French name are searchable, because Canada keeps both officially. Laboratory analyses, display side only: the file records no density.
Health Canada (2026). Canadian Nutrient File. Government of Canada, Ottawa. food-nutrition.canada.ca.
food-nutrition.canada.caLicence: Open Government Licence – CanadaIn the app:
foodDb.ts:1–40Swiss cooking, and a precision about preparation states that exists nowhere else. Älplermagronen, Butterzopf, Federkohl, Kartoffelstock — the German database does not carry them, and neither does any of the other six sources: measured against the 1,035,801 distinct names Cal 3D already held, 914 of the 1,216 Swiss entries (75.2 %) are new. Where the file is unusually careful is the states: Amaretti hard versus soft, canned fruit drained versus not drained, cooked with or without added fat and salt. 245 entries carry synonyms, and those are searchable too, so Agavendicksaft finds Agavensirup. One thing was checked and deliberately not used: the file is the only national source that records a density, but only 126 of 1,216 rows have one — too few to change the measurement path for. Display side only.
Bundesamt für Lebensmittelsicherheit und Veterinärwesen BLV (2026). Schweizer Nährwertdatenbank V 7.1. Bern. naehrwertdaten.ch.
naehrwertdaten.chLicence: Open use, source must be creditedIn the app:
foodDb.ts:1–40Packaged food. Barcodes and branded products come from there — for something with a printed nutrition table, measuring is the detour. Cal 3D carries an offline extract of 692,450 of those products inside the app, so a barcode still resolves with no connection, and it shows a product under its name in your language wherever Open Food Facts records one. The extract is kept in its own files, separate from the two databases below; nothing is merged into a single table.
Open Food Facts. An open, community-maintained database of food products from around the world. The database is licensed under the Open Database License (ODbL); its individual contents are under the Database Contents License (DbCL).
world.openfoodfacts.orgLicence: ODbL 1.0, DbCL 1.0In the app:
foodDb.ts:1–40The German nutrient database behind searching for a food by name: 7,140 entries, 2,050 of them cooked dishes rather than raw ingredients. It answers on the display side only — a value from it is never fed back into a measurement.
Max Rubner-Institut (2025): Bundeslebensmittelschlüssel (BLS), Version 4.0 — Deutsche Nährstoffdatenbank. Karlsruhe. DOI: 10.25826/Data20251217-134202-0.
How the measurement itself works — volume, density, grams — is set out on the method page.
Questions or feedback
If a source here has been superseded, or a number does not match the paper it cites, tell us and we will correct it. Every formula on this page names the file that implements it, so a correction can be checked — by you and by us.
Email support@cal3d.app