Calculate Macros for Weight Loss Women

Calculate Macros for Weight Loss for Women | Your Macro Calculator body { font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; background-color: #f8f9fa; color: #333; line-height: 1.6; margin: 0; padding: 0; } .container { max-width: 960px; margin: 20px auto; padding: 20px; background-color: #fff; box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05); border-radius: 8px; } header { background-color: #004a99; color: #fff; padding: 20px 0; text-align: center; margin-bottom: 20px; border-radius: 8px 8px 0 0; } header h1 { margin: 0; font-size: 2.2em; } .calculator-section { padding: 30px 20px; border-bottom: 1px solid #eee; } .calculator-section:last-child { border-bottom: none; } h2, h3 { color: #004a99; margin-bottom: 15px; } .input-group { margin-bottom: 20px; display: flex; flex-direction: column; align-items: flex-start; } .input-group label { font-weight: bold; margin-bottom: 8px; display: block; color: #555; } .input-group input[type="number"], .input-group select { width: 100%; padding: 12px 15px; border: 1px solid #ccc; border-radius: 5px; box-sizing: border-box; font-size: 1em; transition: border-color 0.3s ease; } .input-group input[type="number"]:focus, .input-group select:focus { border-color: #004a99; outline: none; } .input-group .helper-text { font-size: 0.85em; color: #777; margin-top: 5px; } .error-message { color: #dc3545; font-size: 0.85em; margin-top: 5px; display: none; /* Hidden by default */ } .error-message.visible { display: block; } button { background-color: #004a99; color: white; padding: 12px 25px; border: none; border-radius: 5px; font-size: 1em; cursor: pointer; transition: background-color 0.3s ease, transform 0.2s ease; margin-right: 10px; margin-top: 10px; } button:hover { background-color: #003366; transform: translateY(-1px); } button#resetBtn { background-color: #6c757d; } button#resetBtn:hover { background-color: #5a6268; } button#copyBtn { background-color: #28a745; } button#copyBtn:hover { background-color: #218838; } #results { margin-top: 30px; padding: 25px; background-color: #e9ecef; border-radius: 8px; text-align: center; } #results h3 { margin-top: 0; color: #004a99; } .main-result { font-size: 2.5em; font-weight: bold; color: #28a745; margin: 15px 0; padding: 15px; background-color: #ffffff; border: 2px solid #28a745; border-radius: 8px; display: inline-block; } .intermediate-values { margin-top: 20px; display: flex; justify-content: space-around; flex-wrap: wrap; gap: 15px; } .intermediate-values div { background-color: #fff; padding: 15px 20px; border-radius: 5px; border: 1px solid #dee2e6; text-align: center; flex: 1; min-width: 150px; } .intermediate-values span { display: block; font-weight: bold; font-size: 1.4em; color: #004a99; } .intermediate-values small { font-size: 0.9em; color: #555; } .formula-explanation { margin-top: 25px; font-size: 0.95em; color: #555; border-top: 1px solid #eee; padding-top: 15px; } table { width: 100%; border-collapse: collapse; margin-top: 30px; margin-bottom: 30px; } th, td { padding: 12px 15px; border: 1px solid #dee2e6; text-align: left; } thead { background-color: #004a99; color: white; } tbody tr:nth-child(even) { background-color: #f2f2f2; } caption { font-size: 1.1em; font-weight: bold; color: #333; margin-bottom: 10px; caption-side: top; text-align: left; } canvas { margin-top: 20px; width: 100%; max-width: 600px; height: auto; display: block; margin-left: auto; margin-right: auto; } .article-content { margin-top: 40px; padding: 30px 20px; background-color: #fff; border-radius: 8px; box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05); } .article-content h2 { font-size: 1.8em; margin-top: 30px; border-bottom: 2px solid #004a99; padding-bottom: 5px; } .article-content h3 { font-size: 1.4em; margin-top: 25px; color: #0056b3; } .article-content p, .article-content ul, .article-content ol { margin-bottom: 15px; } .article-content ul, .article-content ol { padding-left: 25px; } .article-content li { margin-bottom: 8px; } .faq-item { margin-bottom: 15px; } .faq-question { font-weight: bold; color: #004a99; cursor: pointer; margin-bottom: 5px; } .faq-answer { display: none; padding-left: 15px; border-left: 2px solid #004a99; margin-top: 5px; } .faq-answer.visible { display: block; } .internal-links-list { list-style: none; padding: 0; } .internal-links-list li { margin-bottom: 10px; } .internal-links-list a { color: #004a99; text-decoration: none; font-weight: bold; } .internal-links-list a:hover { text-decoration: underline; } .internal-links-list p { font-size: 0.9em; color: #555; margin-top: 3px; } @media (min-width: 600px) { .input-group { flex-direction: row; align-items: center; } .input-group label { margin-bottom: 0; width: 200px; /* Fixed width for labels */ flex-shrink: 0; } .input-group input[type="number"], .input-group select { width: calc(100% – 200px); /* Adjust width to fit */ } .intermediate-values { flex-wrap: nowrap; } }

Calculate Macros for Weight Loss for Women

Weight Loss Macro Calculator for Women

Enter your details below to calculate your personalized macronutrient targets for effective weight loss.

Sedentary (little to no exercise) Lightly active (light exercise/sports 1-3 days/week) Moderately active (moderate exercise/sports 3-5 days/week) Very active (hard exercise/sports 6-7 days a week) Extra active (very hard exercise & physical job)
Recommended: 0.25-1 kg per week.

Your Weight Loss Macros

— kcal
Calculated using the Mifflin-St Jeor equation for BMR, adjusted for activity level to find TDEE, and then creating a deficit for weight loss. Macros are then distributed based on common weight loss ratios.
g Protein
g Carbohydrates
g Fat
kcal Basal Metabolic Rate
kcal Total Daily Energy Expenditure
kcal Calorie Deficit

Macro Distribution

Visual representation of your daily macro targets (grams).

Macro Breakdown (Grams per Day)
Macronutrient Grams Calories
Protein
Carbohydrates
Fat
Total

What are Macros for Weight Loss for Women?

Macros, short for macronutrients, refer to the three main components of our diet that provide energy: protein, carbohydrates, and fats. For women aiming for weight loss, understanding and calculating these macros is crucial for creating a sustainable and effective dietary plan. It's not just about cutting calories; it's about consuming the right *balance* of nutrients to support bodily functions, muscle maintenance, and satiety while encouraging fat loss.

Who should use it? This calculator is specifically designed for women seeking to lose weight. Factors like hormonal differences and body composition can influence metabolic rates and nutrient needs compared to men, making a women-specific approach beneficial. It's ideal for those who want a structured approach to their diet beyond just tracking total calories, aiming for optimal health and body composition changes.

Common Misconceptions: A frequent misconception is that all fats are bad and should be drastically cut. In reality, healthy fats are essential for hormone production and satiety. Another myth is that carbohydrates are inherently fattening; complex carbohydrates provide vital energy and fiber. Lastly, some believe that to lose weight, one must eliminate entire food groups, which is unsustainable and can lead to nutrient deficiencies.

Weight Loss Macros Formula and Mathematical Explanation

Calculating macros for weight loss involves a multi-step process, starting with estimating your daily energy needs and then creating a deficit. We use established formulas to ensure accuracy.

Step 1: Basal Metabolic Rate (BMR)

We use the Mifflin-St Jeor equation, which is considered one of the most accurate formulas for estimating resting calorie needs:

For women: BMR = (10 × weight in kg) + (6.25 × height in cm) – (5 × age in years) – 161

Step 2: Total Daily Energy Expenditure (TDEE)

Your TDEE accounts for your BMR plus the calories burned through physical activity and the thermic effect of food. We multiply your BMR by an activity factor:

TDEE = BMR × Activity Factor

  • Sedentary: 1.2
  • Lightly active: 1.375
  • Moderately active: 1.55
  • Very active: 1.725
  • Extra active: 1.9

Step 3: Calorie Deficit for Weight Loss

To lose weight, you need to consume fewer calories than your TDEE. A deficit of 500-1000 calories per day typically leads to 0.5-1 kg (1-2 lbs) of weight loss per week. We calculate the target intake based on your desired weekly loss rate:

Target Calorie Intake = TDEE – (Desired Weekly Loss Rate × 7 × 1100)

(Note: 1 kg of fat is approximately 7700 calories, so a 0.5 kg loss requires a deficit of ~3850 calories/week, or ~550 kcal/day. We use 1100 kcal/kg as a common approximation for safety and sustainability).

Step 4: Macronutrient Distribution

Once target calories are set, we distribute them among protein, carbohydrates, and fats. A common starting point for weight loss for women is:

  • Protein: 30-40% of total calories. Essential for muscle preservation and satiety.
  • Fat: 25-35% of total calories. Crucial for hormones and nutrient absorption.
  • Carbohydrates: The remaining percentage (30-45%). Provides energy.

These percentages are converted into grams, knowing that:

  • 1 gram of protein = 4 calories
  • 1 gram of carbohydrate = 4 calories
  • 1 gram of fat = 9 calories

Variables Table

Variables Used in Macro Calculation
Variable Meaning Unit Typical Range
Weight Current body weight kg 20 – 300+
Height Body height cm 100 – 220
Age Number of years lived years 1 – 120
Activity Factor Multiplier based on lifestyle and exercise frequency Unitless 1.2 – 1.9
Goal Weight Target body weight for loss kg 10 – 300+
Weekly Loss Rate Desired rate of weight reduction per week kg/week 0.25 – 1.0
BMR Basal Metabolic Rate (calories burned at rest) kcal/day 1000 – 2500+
TDEE Total Daily Energy Expenditure kcal/day 1500 – 3500+
Target Calorie Intake Daily calorie goal for weight loss kcal/day 1200 – 2500+ (adjust based on safety)
Protein % Percentage of calories from protein % 30 – 40
Fat % Percentage of calories from fat % 25 – 35
Carbohydrate % Percentage of calories from carbohydrates % 30 – 45

Practical Examples (Real-World Use Cases)

Let's illustrate with two common scenarios for women aiming for weight loss:

Example 1: Sarah, Moderately Active Professional

Sarah is 35 years old, weighs 70 kg, is 165 cm tall, and is moderately active (exercises 3-5 times a week). She wants to lose 5 kg and aims for a sustainable loss of 0.5 kg per week.

  • Inputs: Weight: 70 kg, Height: 165 cm, Age: 35, Activity: Moderately active (1.55), Goal Weight: 65 kg, Weekly Loss: 0.5 kg.
  • Calculations:
    • BMR = (10 * 70) + (6.25 * 165) – (5 * 35) – 161 = 700 + 1031.25 – 175 – 161 = 1395.25 kcal
    • TDEE = 1395.25 * 1.55 = 2162.64 kcal
    • Deficit = 0.5 * 7 * 1100 = 3850 kcal/week. Daily Deficit = 3850 / 7 = 550 kcal.
    • Target Calories = 2162.64 – 550 = 1612.64 kcal (rounded to 1613 kcal)
  • Macro Distribution (e.g., 35% P, 30% F, 35% C):
    • Protein: (1613 * 0.35) / 4 = 141 g
    • Fat: (1613 * 0.30) / 9 = 54 g
    • Carbs: (1613 * 0.35) / 4 = 141 g
  • Interpretation: Sarah should aim for approximately 1613 calories per day, with about 141g protein, 141g carbs, and 54g fat to achieve her weight loss goal. This provides enough protein to maintain muscle and enough carbs for energy during workouts.

Example 2: Emily, Lightly Active Student

Emily is 22 years old, weighs 85 kg, is 170 cm tall, and is lightly active (studies and walks occasionally). She wants to lose 10 kg and prefers a slower, steadier rate of 0.25 kg per week.

  • Inputs: Weight: 85 kg, Height: 170 cm, Age: 22, Activity: Lightly active (1.375), Goal Weight: 75 kg, Weekly Loss: 0.25 kg.
  • Calculations:
    • BMR = (10 * 85) + (6.25 * 170) – (5 * 22) – 161 = 850 + 1062.5 – 110 – 161 = 1641.5 kcal
    • TDEE = 1641.5 * 1.375 = 2256.56 kcal
    • Deficit = 0.25 * 7 * 1100 = 1925 kcal/week. Daily Deficit = 1925 / 7 = 275 kcal.
    • Target Calories = 2256.56 – 275 = 1981.56 kcal (rounded to 1982 kcal)
  • Macro Distribution (e.g., 40% P, 30% F, 30% C):
    • Protein: (1982 * 0.40) / 4 = 198 g
    • Fat: (1982 * 0.30) / 9 = 66 g
    • Carbs: (1982 * 0.30) / 4 = 149 g
  • Interpretation: Emily should aim for around 1982 calories daily, prioritizing higher protein (198g) to support muscle mass during a slower weight loss phase, with 149g of carbohydrates and 66g of fat. The smaller deficit ensures a more gradual and potentially less stressful weight loss journey.

How to Use This Weight Loss Macros Calculator

Our calculator is designed for simplicity and accuracy. Follow these steps:

  1. Enter Current Weight: Input your current weight in kilograms.
  2. Enter Height: Input your height in centimeters.
  3. Enter Age: Provide your age in years.
  4. Select Activity Level: Choose the option that best describes your daily physical activity and exercise routine. Be honest to get the most accurate TDEE.
  5. Enter Goal Weight: Specify your target weight in kilograms. While not directly used in the immediate calorie calculation, it helps contextualize the weight loss goal.
  6. Set Desired Weekly Loss Rate: Choose how quickly you aim to lose weight. 0.5 kg per week is generally recommended for sustainability.
  7. Click 'Calculate Macros': The calculator will instantly display your target daily calorie intake, your recommended breakdown of protein, carbohydrates, and fats in grams, and key intermediate values like BMR, TDEE, and your calorie deficit.

How to Read Results: The main highlighted number is your target daily calorie intake for weight loss. The Protein, Carbohydrates, and Fat values are your daily gram targets. The intermediate values (BMR, TDEE, Deficit) provide insight into your metabolism and the size of the calorie reduction.

Decision-Making Guidance: Use these macro targets as a guideline. Focus on whole, unprocessed foods to meet these goals. If you find yourself consistently hungry, you might need to slightly adjust your fat or carb intake. If energy levels are low, ensure you're consuming enough complex carbohydrates. Listen to your body and adjust as needed, consulting a professional if you have underlying health conditions.

Key Factors That Affect Weight Loss Macro Results

While the calculator provides a solid starting point, several factors can influence the effectiveness of your calculated macros:

  1. Body Composition: Muscle tissue burns more calories at rest than fat tissue. Women with higher muscle mass may have a higher BMR and TDEE, potentially requiring more calories than predicted for the same weight. Our calculator doesn't directly measure body fat percentage, which could refine calculations.
  2. Hormonal Fluctuations: Menstrual cycles can impact metabolism, appetite, and water retention. During certain phases, calorie needs might slightly vary, and weight fluctuations can occur unrelated to fat loss.
  3. Metabolic Adaptations: Over prolonged periods of calorie restriction, the body can adapt by slowing down metabolism to conserve energy. This may necessitate periodic reassessment of macro targets or calorie intake. adjusting calorie intake can be necessary.
  4. Type and Quality of Food: While the calculator focuses on grams, the *source* of your macros matters. Prioritizing lean proteins, complex carbohydrates, and healthy fats leads to better satiety, nutrient intake, and overall health than consuming the same macros from highly processed foods.
  5. Sleep Quality and Stress Levels: Poor sleep and high stress can negatively impact hormones like cortisol and ghrelin, increasing appetite and potentially hindering fat loss, even if macro targets are met.
  6. Hydration: Adequate water intake is crucial for metabolism, satiety, and overall bodily function. Dehydration can sometimes be mistaken for hunger.
  7. Medications and Health Conditions: Certain medications (e.g., those affecting thyroid function or hormonal balance) and health conditions (like PCOS or thyroid disorders) can significantly alter metabolic rate and nutrient processing, requiring personalized adjustments beyond standard formulas.

Frequently Asked Questions (FAQ)

Can men use this calculator?
This calculator is specifically designed for women, using the '-161' adjustment in the Mifflin-St Jeor equation specific to female physiology. Men use '-5' in the formula. For men, a separate calculator or adjustment is needed.
What if I'm vegan or vegetarian?
The calculator provides gram targets for protein, carbs, and fats regardless of your dietary pattern. You'll need to ensure you meet these targets using plant-based sources. This may require careful meal planning to get adequate protein. Consider resources on vegan protein sources.
How accurate is the Mifflin-St Jeor equation?
It's considered one of the most accurate predictive equations for BMR, but it's still an estimate. Individual metabolic rates can vary due to genetics, body composition, and other factors. Regular monitoring and adjustments are key.
Is a 0.5 kg weekly loss rate safe?
For most women, a loss rate of 0.25 kg to 1 kg per week is considered safe and sustainable. 0.5 kg (approx. 1 lb) per week represents a moderate deficit that supports fat loss while minimizing muscle loss and metabolic slowdown. Always consult a doctor if you have concerns.
What happens if I go over my macro targets sometimes?
Occasional deviations are normal and don't derail progress. Consistency over time is what matters most. If it happens frequently, analyze your food choices and habits to identify patterns. Focus on getting back on track with your next meal. Understanding calorie cycling strategies might be helpful.
Should I track my food intake meticulously?
Initially, meticulous tracking can be very beneficial to understand portion sizes and the macro content of foods. As you become more familiar with your targets and common foods, you may be able to estimate more accurately. However, periodic tracking can help maintain accuracy and accountability.
What's the difference between weight loss and fat loss?
Weight loss refers to a decrease in total body mass, which can include water, muscle, and fat. Fat loss specifically refers to reducing adipose tissue. A well-structured macro plan focused on adequate protein and resistance training helps maximize fat loss while preserving muscle mass.
Do I need to adjust macros if I'm trying to gain muscle while losing fat?
This is often called body recomposition. It typically requires a very small calorie deficit or maintenance calories, with a strong emphasis on high protein intake and consistent resistance training. The macro targets might shift towards higher protein and potentially moderate carbs/fats. This calculator leans towards fat loss, so adjustments would be needed. Consult a nutritionist for body recomposition.

Related Tools and Internal Resources

© 2023 Your Macro Calculator. All rights reserved.
var canvas = document.getElementById('macroChart'); var ctx = canvas.getContext('2d'); var macroChartInstance = null; function showError(inputId, message) { var errorElement = document.getElementById(inputId + 'Error'); if (errorElement) { errorElement.innerText = message; errorElement.classList.add('visible'); } } function clearError(inputId) { var errorElement = document.getElementById(inputId + 'Error'); if (errorElement) { errorElement.innerText = "; errorElement.classList.remove('visible'); } } function validateInput(id, min, max, name) { var input = document.getElementById(id); var value = parseFloat(input.value); clearError(id); if (isNaN(value) || input.value.trim() === ") { showError(id, name + ' is required.'); return false; } if (value max) { showError(id, name + ' cannot be more than ' + max + '.'); return false; } return true; } function calculateMacros() { var weightInput = document.getElementById('weight'); var heightInput = document.getElementById('height'); var ageInput = document.getElementById('age'); var activityLevelInput = document.getElementById('activityLevel'); var goalWeightInput = document.getElementById('goalWeight'); var weeklyLossRateInput = document.getElementById('weeklyLossRate'); var weight = parseFloat(weightInput.value); var height = parseFloat(heightInput.value); var age = parseFloat(ageInput.value); var activityFactor = parseFloat(activityLevelInput.value); var goalWeight = parseFloat(goalWeightInput.value); var weeklyLossRate = parseFloat(weeklyLossRateInput.value); var isValid = true; if (!validateInput('weight', 20, 300, 'Weight')) isValid = false; if (!validateInput('height', 100, 220, 'Height')) isValid = false; if (!validateInput('age', 1, 120, 'Age')) isValid = false; if (!validateInput('goalWeight', 10, 300, 'Goal Weight')) isValid = false; if (!validateInput('weeklyLossRate', 0.1, 1.5, 'Weekly Loss Rate')) isValid = false; if (!isValid) { return; } // BMR Calculation (Mifflin-St Jeor for women) var bmr = (10 * weight) + (6.25 * height) – (5 * age) – 161; bmr = Math.max(bmr, 1000); // Ensure BMR is a reasonable minimum // TDEE Calculation var tdee = bmr * activityFactor; tdee = Math.max(tdee, 1200); // Ensure TDEE is a reasonable minimum // Calorie Deficit Calculation var weeklyDeficitCalories = weeklyLossRate * 7700; // Approx 7700 kcal per kg of fat var dailyDeficit = weeklyDeficitCalories / 7; var targetCalories = tdee – dailyDeficit; // Ensure target calories are not too low for health and sustainability var minSafeCalories = 1200; if (targetCalories 0 ? (protein / totalGrams) * 100 : 0; var carbPercent = totalGrams > 0 ? (carbs / totalGrams) * 100 : 0; var fatPercent = totalGrams > 0 ? (fat / totalGrams) * 100 : 0; macroChartInstance = new Chart(ctx, { type: 'bar', data: { labels: ['Protein', 'Carbohydrates', 'Fat'], datasets: [{ label: 'Grams per Day', data: [protein, carbs, fat], backgroundColor: [ 'rgba(255, 99, 132, 0.6)', // Protein – Reddish 'rgba(54, 162, 235, 0.6)', // Carbohydrates – Blueish 'rgba(255, 206, 86, 0.6)' // Fat – Yellowish ], borderColor: [ 'rgba(255, 99, 132, 1)', 'rgba(54, 162, 235, 1)', 'rgba(255, 206, 86, 1)' ], borderWidth: 1 }] }, options: { responsive: true, maintainAspectRatio: false, scales: { y: { beginAtZero: true, title: { display: true, text: 'Grams' } } }, plugins: { legend: { display: true, position: 'top', }, title: { display: true, text: 'Daily Macronutrient Distribution (Grams)' } } } }); } function resetForm() { document.getElementById('weight').value = '70'; document.getElementById('height').value = '165'; document.getElementById('age').value = '30'; document.getElementById('activityLevel').value = '1.55'; // Moderately active document.getElementById('goalWeight').value = '60'; document.getElementById('weeklyLossRate').value = '0.5'; // Clear errors var errorElements = document.querySelectorAll('.error-message'); for (var i = 0; i < errorElements.length; i++) { errorElements[i].innerText = ''; errorElements[i].classList.remove('visible'); } calculateMacros(); // Recalculate with default values } function copyResults() { var targetCalories = document.getElementById('targetCalories').innerText; var proteinGrams = document.getElementById('proteinGrams').innerText; var carbsGrams = document.getElementById('carbsGrams').innerText; var fatGrams = document.getElementById('fatGrams').innerText; var bmr = document.getElementById('bmr').innerText; var tdee = document.getElementById('tdee').innerText; var deficit = document.getElementById('deficit').innerText; var weight = document.getElementById('weight').value; var height = document.getElementById('height').value; var age = document.getElementById('age').value; var activityLevelText = document.getElementById('activityLevel').options[document.getElementById('activityLevel').selectedIndex].text; var goalWeight = document.getElementById('goalWeight').value; var weeklyLossRate = document.getElementById('weeklyLossRate').value; var resultText = "— Your Weight Loss Macro Results —\n\n"; resultText += "Target Daily Calories: " + targetCalories + "\n"; resultText += "Protein: " + proteinGrams + "g\n"; resultText += "Carbohydrates: " + carbsGrams + "g\n"; resultText += "Fat: " + fatGrams + "g\n\n"; resultText += "— Key Assumptions & Details —\n"; resultText += "Current Weight: " + weight + " kg\n"; resultText += "Height: " + height + " cm\n"; resultText += "Age: " + age + " years\n"; resultText += "Activity Level: " + activityLevelText + "\n"; resultText += "Goal Weight: " + goalWeight + " kg\n"; resultText += "Desired Weekly Loss Rate: " + weeklyLossRate + " kg/week\n\n"; resultText += "— Intermediate Calculations —\n"; resultText += "Basal Metabolic Rate (BMR): " + bmr + " kcal\n"; resultText += "Total Daily Energy Expenditure (TDEE): " + tdee + " kcal\n"; resultText += "Daily Calorie Deficit: " + deficit + " kcal\n\n"; resultText += "Calculated using the Mifflin-St Jeor equation and standard macro ratios for weight loss."; try { navigator.clipboard.writeText(resultText).then(function() { alert('Results copied to clipboard!'); }, function(err) { console.error('Failed to copy results: ', err); alert('Failed to copy results. Please copy manually.'); }); } catch (e) { console.error('Clipboard API not available: ', e); alert('Clipboard API not available. Please copy manually.'); } } // Initialize chart and calculations on load document.addEventListener('DOMContentLoaded', function() { resetForm(); // Set default values and calculate // Toggle FAQ answers var faqQuestions = document.querySelectorAll('.faq-question'); for (var i = 0; i < faqQuestions.length; i++) { faqQuestions[i].addEventListener('click', function() { var answer = this.nextElementSibling; answer.classList.toggle('visible'); }); } });

Leave a Comment