Skip to main content

tdee-calculator

A lightweight, dependency-free Python utility for calculating Total Daily Energy Expenditure (TDEE), Basal Metabolic Rate (BMR), calorie targets, and macronutrient splits.

Built by the team behind Free TDEE Calculator, the free web-based toolkit for daily calorie and macro planning.

Installation

pip install tdee-calculator

Usage

from tdee_calculator import calculate_tdee_profile

result = calculate_tdee_profile(
    weight_kg=75,
    height_cm=180,
    age=28,
    gender="male",
    activity_level="moderate",  # sedentary | light | moderate | active | very_active
)

print(result)
# {'bmr': 1740, 'tdee': 2697,
#  'targets': {'cut': 2158, 'maintain': 2697, 'bulk': 2967},
#  'macros': {'calories': 2697, 'protein_g': 150, 'carbs_g': 356, 'fat_g': 75}}

Individual functions

from tdee_calculator import calculate_bmr, calculate_tdee, calculate_targets, calculate_macros

# Mifflin-St Jeor (default), Harris-Benedict, Katch-McArdle
calculate_bmr(80, 182, 30, gender="male", body_fat_pct=15, formula="katch")

Formulas

  • Mifflin-St Jeor (default): the most accurate widely validated BMR equation for healthy adults.
  • Harris-Benedict (revised 1984 version) also supported.
  • Katch-McArdle: BMR from lean body mass, ideal for lifters who know their body fat percentage.

For a fully interactive version of these formulas with visual macro breakdowns and step-by-step guidance, try the Free TDEE Calculator web app, including the detailed macro calculator.

Activity levels

Level Multiplier Meaning
sedentary 1.2 Little or no exercise, desk job
light 1.375 Light exercise 1-3 days/week
moderate 1.55 Moderate exercise 3-5 days/week
active 1.725 Hard exercise 6-7 days/week
very_active 1.9 Very hard daily exercise or physical job

License

MIT

Metadata

Release files for tdee-calculator 1.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for tdee-calculator 1.0.0
File Size Uploaded
tdee_calculator-1.0.0.tar.gz 3.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for tdee-calculator 1.0.0
File Interpreter ABI Platform
tdee_calculator-1.0.0-py3-none-any.whl Python 3 none any Details

Total release size: 7.4 kB

Release files / tdee_calculator-1.0.0.tar.gz

Download URL tdee_calculator-1.0.0.tar.gz
Size 3.6 kB
Tags Source
SHA-256 checksum
How to use checksums
ae8d274aaec91aebf662d41c9d920b78f4e8afae56e01a8757c0f6ab30c8a830
BLAKE2b-256 checksum
How to use checksums
2c19f8c4cbb88bf48bc8e3ff016bdbdc122e00822d18aa4dc6088eb2dc4699ef
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.10

Release files / tdee_calculator-1.0.0-py3-none-any.whl

Download URL tdee_calculator-1.0.0-py3-none-any.whl
Size 3.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a07a239d84841b18773d9009274af4bcdc8a9226cd19b9cc2e373fac496127b2
BLAKE2b-256 checksum
How to use checksums
8d937296f3a3e23f26291de61c13c17e3c89ea32646b0522600ecff6178bfa38
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.10

Release history Release notifications | RSS feed

This release

1.0.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page