.bmr-calculator-container {
max-width: 700px;
margin: 20px auto;
padding: 25px;
background: #f9fbfd;
border: 1px solid #e1e4e8;
border-radius: 8px;
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}
.bmr-calculator-title {
text-align: center;
color: #2c3e50;
margin-bottom: 25px;
font-size: 24px;
font-weight: 700;
}
.bmr-form-group {
margin-bottom: 15px;
}
.bmr-label {
display: block;
margin-bottom: 5px;
font-weight: 600;
color: #4a5568;
}
.bmr-input-row {
display: flex;
gap: 15px;
align-items: center;
}
.bmr-input, .bmr-select {
width: 100%;
padding: 10px;
border: 1px solid #cbd5e0;
border-radius: 5px;
font-size: 16px;
background: #fff;
}
.bmr-radio-group {
display: flex;
gap: 20px;
margin-bottom: 10px;
}
.bmr-radio-label {
display: flex;
align-items: center;
cursor: pointer;
font-weight: normal;
}
.bmr-radio-label input {
margin-right: 8px;
}
.bmr-btn {
width: 100%;
padding: 12px;
background-color: #38b2ac;
color: white;
border: none;
border-radius: 6px;
font-size: 18px;
font-weight: 600;
cursor: pointer;
transition: background-color 0.2s;
margin-top: 10px;
}
.bmr-btn:hover {
background-color: #319795;
}
.bmr-result-box {
margin-top: 25px;
padding: 20px;
background-color: #ffffff;
border: 1px solid #e2e8f0;
border-radius: 8px;
display: none;
text-align: center;
}
.bmr-result-title {
font-size: 16px;
color: #718096;
margin-bottom: 5px;
text-transform: uppercase;
letter-spacing: 0.5px;
}
.bmr-result-value {
font-size: 32px;
font-weight: 800;
color: #2d3748;
margin-bottom: 15px;
}
.bmr-highlight-rest {
color: #e53e3e;
}
.bmr-highlight-motion {
color: #38b2ac;
}
.bmr-info-grid {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 15px;
margin-top: 20px;
text-align: center;
}
.bmr-info-card {
background: #f7fafc;
padding: 15px;
border-radius: 6px;
}
.toggle-units {
margin-bottom: 20px;
text-align: center;
background: #edf2f7;
display: inline-block;
padding: 5px;
border-radius: 20px;
width: 100%;
}
.imperial-inputs {
display: none;
}
.metric-inputs {
display: block;
}
/* Article Styling */
.bmr-article {
max-width: 800px;
margin: 40px auto;
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
color: #333;
line-height: 1.6;
}
.bmr-article h2 {
color: #2c3e50;
border-bottom: 2px solid #38b2ac;
padding-bottom: 10px;
margin-top: 30px;
}
.bmr-article h3 {
color: #2d3748;
margin-top: 25px;
}
.bmr-article p {
margin-bottom: 15px;
}
.bmr-article ul {
margin-bottom: 15px;
padding-left: 20px;
}
.bmr-article li {
margin-bottom: 8px;
}
.bmr-table {
width: 100%;
border-collapse: collapse;
margin: 20px 0;
}
.bmr-table th, .bmr-table td {
border: 1px solid #e2e8f0;
padding: 12px;
text-align: left;
}
.bmr-table th {
background-color: #f7fafc;
font-weight: 600;
}
@media (max-width: 600px) {
.bmr-info-grid {
grid-template-columns: 1fr;
}
}
function toggleBmrUnits() {
var unitType = document.querySelector('input[name="unitSystem"]:checked').value;
var metricDiv = document.getElementById('metricInputs');
var imperialDiv = document.getElementById('imperialInputs');
if (unitType === 'imperial') {
metricDiv.style.display = 'none';
imperialDiv.style.display = 'block';
} else {
metricDiv.style.display = 'block';
imperialDiv.style.display = 'none';
}
}
function calculateMetabolism() {
// 1. Get Inputs
var gender = document.querySelector('input[name="gender"]:checked').value;
var age = parseFloat(document.getElementById('ageInput').value);
var unitType = document.querySelector('input[name="unitSystem"]:checked').value;
var activityMultiplier = parseFloat(document.getElementById('activityLevel').value);
// 2. Validate Age
if (isNaN(age) || age < 1) {
alert("Please enter a valid age.");
return;
}
var weightKg = 0;
var heightCm = 0;
// 3. Normalize to Metric for Calculation (Mifflin-St Jeor)
if (unitType === 'imperial') {
var ft = parseFloat(document.getElementById('heightFt').value);
var inch = parseFloat(document.getElementById('heightIn').value);
var lbs = parseFloat(document.getElementById('weightLbs').value);
if (isNaN(ft) || isNaN(inch) || isNaN(lbs)) {
alert("Please fill in all Height and Weight fields.");
return;
}
// Convert Height: (ft*12 + in) * 2.54
heightCm = ((ft * 12) + inch) * 2.54;
// Convert Weight: lbs / 2.20462
weightKg = lbs / 2.20462;
} else {
heightCm = parseFloat(document.getElementById('heightCm').value);
weightKg = parseFloat(document.getElementById('weightKg').value);
if (isNaN(heightCm) || isNaN(weightKg)) {
alert("Please fill in all Height and Weight fields.");
return;
}
}
// 4. Calculate BMR (Mifflin-St Jeor Equation)
// Men: (10 × weight in kg) + (6.25 × height in cm) – (5 × age in years) + 5
// Women: (10 × weight in kg) + (6.25 × height in cm) – (5 × age in years) – 161
var bmr = 0;
if (gender === 'male') {
bmr = (10 * weightKg) + (6.25 * heightCm) – (5 * age) + 5;
} else {
bmr = (10 * weightKg) + (6.25 * heightCm) – (5 * age) – 161;
}
// 5. Calculate TDEE (BMR * Activity)
var tdee = bmr * activityMultiplier;
// 6. Display Results
document.getElementById('bmrValueDisplay').innerText = Math.round(bmr).toLocaleString();
document.getElementById('tdeeValueDisplay').innerText = Math.round(tdee).toLocaleString();
document.getElementById('bmrResult').style.display = 'block';
}
Understanding Your Energy: Rest vs. Motion
Managing weight and energy levels effectively requires understanding two critical numbers: your Basal Metabolic Rate (BMR) and your Total Daily Energy Expenditure (TDEE). This calculator helps you determine how many calories your body burns while at rest versus how many it burns based on your daily motion and activity levels.
What is BMR (Basal Metabolic Rate)?
BMR represents the number of calories your body needs to accomplish its most basic (basal) life-sustaining functions. Even when you are completely at rest—sleeping or lying in bed all day—your body burns energy to maintain:
- Breathing
- Blood circulation
- Nutrient processing
- Cell production
For most people, BMR accounts for about 60% to 75% of total daily calorie expenditure. It is influenced by factors such as age, gender, height, and weight. Muscle mass also plays a role; muscle tissue burns more calories at rest than fat tissue.
What is TDEE (Total Daily Energy Expenditure)?
While BMR calculates energy at rest, TDEE accounts for your body in motion. It is the total number of calories you burn in a 24-hour period, factoring in:
- Basal Metabolic Rate: Your baseline energy needs.
- Physical Activity Level (PAL): Calories burned through exercise and daily movement (walking, working, chores).
- Thermic Effect of Food: Energy used to digest and metabolize what you eat.
Knowing your TDEE is crucial for goal setting. If you consume fewer calories than your TDEE, you will likely lose weight. If you consume more, you will gain weight.
How the Calculation Works
This calculator utilizes the Mifflin-St Jeor Equation, which is widely considered by the medical community to be the most accurate formula for estimating BMR in healthy individuals.
| Gender |
Formula |
| Male |
(10 × weight in kg) + (6.25 × height in cm) – (5 × age in years) + 5 |
| Female |
(10 × weight in kg) + (6.25 × height in cm) – (5 × age in years) – 161 |
Activity Levels Explained
To convert BMR to TDEE, we apply a multiplier based on how much you move. Being honest about your activity level is key to getting an accurate result.
- Sedentary (1.2): Desk job, little to no intentional exercise.
- Lightly Active (1.375): Light exercise or sports 1-3 days a week.
- Moderately Active (1.55): Moderate exercise or sports 3-5 days a week.
- Very Active (1.725): Hard exercise or sports 6-7 days a week.
- Extra Active (1.9): Very hard exercise, physical job, or training twice a day.
Example Calculation
Consider a 35-year-old male who is 180 cm tall and weighs 85 kg. He works an office job but goes to the gym 4 days a week (Moderately Active).
- Calculate BMR: (10 × 85) + (6.25 × 180) – (5 × 35) + 5 = 1,805 Calories/day.
- Calculate TDEE: 1,805 (BMR) × 1.55 (Activity Multiplier) = 2,798 Calories/day.
In this scenario, the individual needs roughly 1,805 calories just to exist, but requires approximately 2,798 calories to maintain his current weight given his activity level.
Frequently Asked Questions
Does age affect my metabolic rate?
Yes. As you age, your metabolic rate generally slows down. This is often due to a loss of muscle mass and changes in hormonal activity. This is why the formula subtracts calories as age increases.
Why do men and women have different formulas?
Biologically, men tend to have a higher proportion of lean muscle mass and a lower body fat percentage compared to women of the same weight. Muscle burns more calories than fat, leading to a slightly higher BMR for men.
How can I increase my BMR?
The most effective way to increase your BMR is to build muscle mass through strength training. Since muscle requires more energy to maintain than fat, increasing your muscle mass will raise the amount of calories you burn while at rest.