How we calculate your numbers

Last updated: 3 November 2026

Every number in Habhar comes from published, peer-reviewed formulas. This page shows the exact calculation the app runs, with the source behind each step.

1. Resting energy (BMR)

We use the Mifflin-St Jeor equation [1]. Systematic reviews found it closer to measured values for most people than older equations such as Harris-Benedict [2].

Men: BMR = 10 × weight(kg) + 6.25 × height(cm) − 5 × age + 5
Women: BMR = 10 × weight(kg) + 6.25 × height(cm) − 5 × age − 161

2. Total daily energy (TDEE)

BMR multiplied by the activity factor you choose [3]:

3. Your daily calorie target

One kilogram of body weight is roughly 7,700 kcal [4]. We turn your chosen pace (0.25 to 1 kg per week) into a daily amount and subtract it from TDEE to lose, or add it to gain. It's an approximation and real loss slows over time [5], so Habhar recalculates your targets each time you log a new weight.

daily = pace(kg/week) × 7700 ÷ 7
lose: kcal = TDEE − daily · gain: kcal = TDEE + daily

For safety the target never goes below 1,500 kcal for men or 1,200 kcal for women.

4. Protein

Set in grams per kilogram of body weight by goal and preference, within the ranges recommended by the International Society of Sports Nutrition [6] and the Morton meta-analysis [7]:

Protein is capped at 40% of your calories.

5. Fat and carbs

Fat is a share of calories by eating style: balanced 27%, low-fat 20%, low-carb 40%, keto 70%. Balanced sits inside the healthy 20-35% range [8]. Carbs take the rest, with a minimum of 50 g (20 g on keto).

protein, carbs = 4 kcal/g · fat = 9 kcal/g

6. Water and steps

Water target is 35 ml per kg of body weight, in line with European Food Safety Authority reference values [9]. The default step goal is 8,000: research shows most of the health benefit comes between 6,000 and 10,000 steps a day [10]. Steps are read from Apple Health.

7. Body Mass Index (BMI)

BMI = weight(kg) ÷ height(m)²

WHO classification [11]: under 18.5 underweight, 18.5-24.9 normal, 25-29.9 overweight, 30 and above obese.

8. Food analysis

When you photograph or type a meal, AI identifies the items and estimates portions in grams, then values are calculated from trusted references: Saudi Food and Drug Authority data for traditional Saudi dishes [13] and USDA FoodData Central for general foods [12]. Packaged products come from their barcode, and label photos are reviewed by our team before they become available to everyone.

Estimating portions from a photo has limits: lighting, angle and hidden ingredients (oil, sauces) affect accuracy. You can adjust the grams of any item before saving.

9. Packaged products and barcodes

When you scan a barcode we look it up first in Habhar’s product database, then in the open Open Food Facts database. Open Food Facts data is made available under the Open Database License (ODbL), and its product images and content under CC BY-SA. Products added by users from their labels are reviewed before they are verified.

10. Restaurants and brand names

Restaurant meal values in “What to eat now” are estimates because portions vary by branch. Restaurant, product and brand names belong to their owners and are mentioned for reference only; Habhar is not affiliated with them.

Health notice

All numbers are estimates for healthy adults and don't replace a doctor or dietitian. If you have a health condition (diabetes, blood pressure, thyroid, pregnancy, medication, or an eating disorder), talk to a professional before changing your diet or activity.

References

  1. Mifflin MD, St Jeor ST, et al. A new predictive equation for resting energy expenditure in healthy individuals. Am J Clin Nutr. 1990;51(2):241-247.
  2. Frankenfield D, Roth-Yousey L, Compher C. Comparison of predictive equations for resting metabolic rate in healthy nonobese and obese adults: a systematic review. J Am Diet Assoc. 2005;105(5):775-789.
  3. FAO/WHO/UNU. Human energy requirements: report of a joint expert consultation. Rome, 2001.
  4. Wishnofsky M. Caloric equivalents of gained or lost weight. Am J Clin Nutr. 1958;6(5):542-546.
  5. Hall KD. What is the required energy deficit per unit weight loss? Int J Obes. 2008;32(3):573-576.
  6. Jäger R, et al. International Society of Sports Nutrition position stand: protein and exercise. J Int Soc Sports Nutr. 2017;14:20.
  7. Morton RW, et al. A systematic review, meta-analysis and meta-regression of the effect of protein supplementation on resistance training-induced gains in muscle mass and strength. Br J Sports Med. 2018;52(6):376-384.
  8. Institute of Medicine. Dietary Reference Intakes for Energy, Carbohydrate, Fiber, Fat, Fatty Acids, Cholesterol, Protein, and Amino Acids. National Academies Press, 2005.
  9. EFSA Panel on Dietetic Products, Nutrition and Allergies. Scientific opinion on dietary reference values for water. EFSA Journal. 2010;8(3):1459.
  10. Paluch AE, et al. Daily steps and all-cause mortality: a meta-analysis of 15 international cohorts. Lancet Public Health. 2022;7(3):e219-e228.
  11. World Health Organization. Body mass index (BMI) classification for adults.
  12. U.S. Department of Agriculture, Agricultural Research Service. FoodData Central.
  13. Saudi Food and Drug Authority (SFDA). Food composition data for traditional Saudi dishes.