Daily Calorie Target
{{ formatNumber(target_kcal, 0) }} kcal
{{ activityLabel }} · {{ formulaLabel }}
{{ formatNumber(bmr, 0) }} BMR {{ formatNumber(tdee_base - bmr, 0) }} Activity +{{ tef_percent }}% TEF {{ bmi }} BMI · {{ bmiCategory }} {{ calorieAdjust>0 ? '+' : '' }}{{ calorieAdjust }}% Goal P {{ protein_g.toFixed(0) }} g F {{ fat_g.toFixed(0) }} g C {{ carb_g.toFixed(0) }} g
yrs
g/kg
%
%
{{ tef_percent }}%
{{ calorieAdjust>0?'+':'' }}{{ calorieAdjust }}%
Metric Value Copy
BMR {{ formatNumber(bmr, 1) }} kcal
TDEE (base) {{ formatNumber(tdee_base, 1) }} kcal
TEF {{ formatNumber(tef_kcal, 1) }} kcal ({{ tef_percent }}%)
TDEE + TEF {{ formatNumber(tdee_tef, 1) }} kcal
Goal adjustment {{ calorieAdjust>0?'+':'' }}{{ calorieAdjust }}%
Target calories {{ formatNumber(target_kcal, 1) }} kcal
BMI {{ bmi }} ({{ bmiCategory }})
Macronutrient Grams Calories Percent Copy
Protein {{ protein_g.toFixed(0) }} {{ (protein_g*4).toFixed(0) }} {{ protein_pct.toFixed(1) }}%
Fat {{ fat_g.toFixed(0) }} {{ (fat_g*9).toFixed(0) }} {{ fat_pct.toFixed(1) }}%
Carbohydrate {{ Math.max(0, carb_g).toFixed(0) }} {{ Math.max(0, carb_g*4).toFixed(0) }} {{ Math.max(0, carb_pct).toFixed(1) }}%

            

Introduction:

Basal Metabolic Rate (BMR) and Total Daily Energy Expenditure (TDEE) describe how much energy your body burns at rest and across a day. People also say “calorie needs” when they mean the same idea. You provide basic body data and activity habits, and the calculator translates those into daily energy targets along with Body Mass Index (BMI) and macronutrient goals you can apply to meals.

You enter age, sex, stature, and mass plus an activity factor, then choose a BMR equation and optional body‑fat input if you track it. The result shows base metabolism, movement calories, the thermic effect of food (TEF), and an adjusted target for fat loss or muscle gain. A simple macro plan splits calories into protein, fat, and carbohydrate.

For example, someone who is moderately active may aim for a small deficit to cut weight while keeping protein high to protect lean mass. Treat outputs as estimates that you validate against your scale, strength, and energy levels. This tool provides informational estimates and does not substitute professional advice.

Pick a macro preset to match your priorities, or switch to custom if you want protein per kilogram from bodyweight or lean mass. If you do not track body fat, the lean‑mass formulas safely fall back to a practical estimate. Steer clear of large calorie cuts for long stretches, and adjust in small steps as you observe trends.

Technical Details:

The calculator combines classic resting‑energy equations with an activity multiplier and optional TEF to produce a daily calorie target. Inputs accept common height and weight units and convert them internally. Computed outputs include BMR, base TDEE, TEF kilocalories, adjusted target calories, BMI with category, and macronutrient grams, kilocalories, and percentages. The pipeline is deterministic for the same inputs, clamps negative values to zero where appropriate, and presents charts via a purely client‑side UI layer.

Core Equations

m_kg= m_lb×0.45359237 h_cm= h_in×2.54
BMR= 10×m_kg+6.25×h_cm-5×age+5  (Mifflin–St Jeor, male) BMR= 10×m_kg+6.25×h_cm-5×age-161  (Mifflin–St Jeor, female) BMR= 88.362+13.397×m_kg+4.799×h_cm-5.677×age  (Revised Harris–Benedict, male) BMR= 447.593+9.247×m_kg+3.098×h_cm-4.330×age  (Revised Harris–Benedict, female) BMR= 370+21.6×LBM_kg  (Katch–McArdle) BMR= 500+22×LBM_kg  (Cunningham)
TDEE_base= BMR×AF TEF= TDEE_base×TEF%100 Target= (TDEE_base+TEF)×(1+Adj%100)
Protein_g= g_per kg×basis_kg Fat_kcal= Target×Fat%100 Carb_kcal= max(0,Target-(4×Protein_g+Fat_kcal))
BMI= m_kg (h_cm100)2

Symbols & Units

Symbols, meanings, units, and sources
Symbol Meaning Unit/Datatype Source
ageAgeyearsInput
mkgBody masskgDerived from input
hcmBody heightcmDerived from input
LBMkgLean body masskgDerived (optional)
AFActivity factorratioInput
TEF%Thermic effect of food%Input
Adj%Goal adjustment%Input
BMRBasal metabolic ratekcal/dayDerived
TDEEbaseActivity‑adjusted energykcal/dayDerived
TargetDaily calorie targetkcal/dayDerived
ProteingProtein targetg/dayDerived
FatgFat targetg/dayDerived
CarbgCarbohydrate targetg/dayDerived
BMIBody Mass Indexkg/m²Derived

Interpretation Bands (BMI)

BMI categories and bounds
Category Lower Upper Implication
Underweight18.4Consider increasing intake and strength work.
Normal18.524.9Maintain with small, steady adjustments.
Overweight25.029.9Use a modest deficit and prioritize protein.
Obesity30.0Pair a lower target with activity and support.

BMI bands are population cut‑points. They guide conversation, not diagnosis or individualized risk.

Units, Precision & Rounding

  • Height converts inches→centimetres; weight converts pounds→kilograms.
  • BMI displays to one decimal; macro grams to whole numbers; macro percent to one decimal.
  • Values formatted with a decimal point. Ties follow the environment’s fixed‑decimal rounding.
  • Internal math uses standard floating‑point; no logarithms are used.

Validation & Bounds

Input constraints and patterns
Field Type Min Max Step/Pattern Notes
Agenumber0Displayed hint suggests 14–99 typical.
Sexselectmale|femaleUsed by MSJ and Harris–Benedict.
Heightnumber0Units: cm or in.
Weightnumber0Units: kg or lb.
Activity factorselect1.21.9discreteSedentary to Extra Active options.
Formulaselectmsj|hb|katch|cunninghamLBM‑based formulas accept body‑fat input.
Body fat %number0700.1LBM used only when 0<x<70; else fallback is 80% of body mass.
TEF %range0201Neutral default is 0.
Goal adjustment %range−50501Negative cuts calories; positive adds calories.
Macro presetselectbalanced|highp|lowcarb|customPresets auto‑fill protein and fat.
Protein targetnumber00.1g per kg; basis is bodyweight or lean mass.
Fat % of caloriesnumber0801Carbohydrate fills the remainder.

I/O Formats & Encoding

Inputs, accepted families, outputs, and rounding
Input Accepted Families Output Encoding/Precision Rounding
Body data & choices Numbers; units cm|in, kg|lb; discrete factors BMR, TDEE, TEF, target, BMI decimal point fixed decimals per field
Macro options Preset or custom g/kg and fat % Protein, fat, carbohydrate (g, kcal, %) 0 or 1 decimal toFixed where shown
Export Clipboard, download CSV, JSON UTF‑8 text as displayed

Networking & Storage

  • All calculations run in your browser; no server requests send your inputs.
  • CSV/JSON exports and copy actions occur locally via the browser.

Performance & Complexity

  • Constant‑time arithmetic for each update.
  • Chart redraws are debounced by 40 ms while the charts panel is active.
  • Chart series hide slices below 0.01 kcal to reduce clutter.

Diagnostics & Determinism

  • No logging; computation is deterministic for identical inputs.
  • Invalid or missing values become zero where clamped; BMI shows a dash until valid.

Security Considerations

  • Inputs are numeric and clamped to safe ranges where relevant.
  • Avoid sharing copied outputs on untrusted devices; clipboard contents are accessible to other apps.

Worked Example

Inputs: age 30, male, 175 cm, 75 kg, Moderately Active (1.55), Mifflin–St Jeor, TEF 10%, goal −10%, Balanced macros.

BMR=1698.8 kcal TDEE_base=2633.1 kcal TEF=263.3 kcal Target=2606.7 kcal BMI=24.5 (Normal) Protein/Fat/Carb=135 g,86.9 g,321.2 g

Numbers round to the display precision; use trends over time to refine targets.

Assumptions & Limitations

  • Activity uses discrete factors, not wearable data.
  • LBM formulas use body fat only when 0–70%; otherwise 80% body‑mass fallback. Heads‑up
  • TEF applies as a single percentage to base TDEE, not per‑macro.
  • Carbohydrate calories clamp at zero to avoid negative values.
  • Fat calories cap at 80% by design. Heads‑up
  • Floating‑point rounding may accumulate minor drift.

Edge Cases & Error Sources

  • Zero or missing height/weight prevents BMI.
  • Age or mass entered as text resolves to zero.
  • Extreme goal adjustments can yield unsustainable targets. Heads‑up
  • Very low body fat values reduce LBM sharply, inflating protein per kg.
  • Rounding to whole grams can shift calorie totals by a few kcal.
  • Signed‑zero displays may appear as 0 in some fields.
  • Small chart slices below 0.01 kcal are hidden.
  • Switching units can change display rounding even when the underlying value is unchanged.

Scientific & Standards Notes

The named equations—Mifflin–St Jeor, Revised Harris–Benedict, Katch–McArdle, and Cunningham—are implemented as written. BMI categorization follows the cut‑points encoded in the app. Use these frameworks as guides alongside real‑world tracking.

Privacy & Compliance

Processing is client‑side only; no data is transmitted or stored server‑side. Health‑related outputs are educational and not medical advice.

Step‑by‑Step Guide:

Set your inputs, review the breakdown, then export what you need.

  1. Enter Age and select Sex.
  2. Enter Height and Weight, then pick units.
  3. Choose an Activity level that matches your week.
  4. Select a Formula for BMR, or try each for comparison.
  5. Optional: add Body fat %, set TEF, and tune Goal %.
  6. Pick a macro preset or set custom protein per kilogram and fat percent.
  7. Review calories and macros, then copy CSV or download JSON.
Avoid large deficits for long periods; small, sustainable changes improve adherence.

Example: A moderate trainee targeting −10% might land near 2,600 kcal with balanced macros, then nudge intake based on weekly averages.

FAQ:

Is my data stored?

No. Calculations, charts, and exports run in your browser. Nothing is sent to a server.

Clipboard and files are created locally on your device.
How accurate is the target?

Equations estimate energy needs using population averages. Start with the target, track for 2–3 weeks, then adjust based on real‑world change.

Which units are supported?

Height accepts centimetres or inches; weight accepts kilograms or pounds. The app converts them internally before calculation.

Can I use it offline?

Yes after the page loads. All computation is client‑side, and exports work without a network connection.

What does TEF mean?

Thermic Effect of Food accounts for digestion cost. It’s applied as a percentage of base TDEE and increases the calorie target proportionally.

How are macros picked?

Presets set protein grams per kilogram and fat percent of calories. Carbohydrate fills the remainder. Custom lets you set protein/basis and fat percent.

How do I export to CSV/JSON?

Use the copy buttons to place CSV or JSON on your clipboard, or the download buttons to save files for spreadsheets or logs.

Does the choice of formula matter?

Formulas differ slightly. Pick one, then calibrate by observing your weight and performance over time. Consistency beats chasing small equation gaps.

Troubleshooting:

  • Blank results: ensure height and weight are positive numbers.
  • Macros look odd: check fat percent and protein basis (bodyweight vs lean mass).
  • Carbs show zero: protein and fat may consume all calories at low targets.
  • BMI shows a dash: provide non‑zero height and weight.
  • Copy buttons do nothing: allow clipboard access in your browser.

Advanced Tips:

  • Tip Track a two‑week moving average before changing calories.
  • Tip Use lean‑mass protein when cutting to preserve muscle.
  • Tip Keep fat above minimal levels for satiety and fat‑soluble vitamins.
  • Tip Re‑estimate activity if your schedule changes for more than a week.
  • Tip Recalculate after body weight shifts by ~5% to keep macros aligned.

Glossary:

BMR
Baseline energy required at rest, expressed in kilocalories per day.
TDEE
Total daily energy including activity, thermic effect, and adjustments.
TEF
Energy cost of digesting and processing food, set as a percentage.
LBM
Lean body mass; body mass minus fat mass.
BMI
Body Mass Index; mass relative to height squared, for population screening.
Activity factor
Multiplier reflecting weekly training and daily movement.
Macro
Macronutrient; protein, fat, or carbohydrate contributing calories.