Carb-Protein-Fat Gram Calculator
Enter your calories and macro percentages to get carb, protein, and fat grams.
Result
How it is calculated
Each percentage is first divided by the sum of the three percentages, so the shares always add up to 100%. Then carbs (g) = calories × carb share ÷ 4, protein (g) = calories × protein share ÷ 4 and fat (g) = calories × fat share ÷ 9, using 4 kcal per gram for carbohydrate and protein and 9 kcal per gram for fat. Grams are rounded to whole numbers. If you enter 50/30/30 (sum 110) the tool rescales it to 45/27/27 instead of warning you. Calories must be above zero, no percentage can be negative, and at least one must be above zero, otherwise no result appears. Alcohol, fibre and other calorie sources are not modelled.
Worked example
Target 2,000 kcal a day with a 40/30/30 split (sum 100, so no rescaling). Carbs: 2,000 × 0.40 = 800 kcal ÷ 4 = 200 g. Protein: 2,000 × 0.30 = 600 kcal ÷ 4 = 150 g. Fat: 600 kcal ÷ 9 = 66.7, shown as 67 g. The ratio line reads 40/30/30.
Common mistakes
- Dividing fat calories by 4 instead of 9; a gram of fat holds more than twice the energy of a gram of carbohydrate, so fat grams look far too high.
- Entering percentages that do not total 100 and expecting them to be used as typed; the tool rescales them, so 50/30/30 becomes 45/27/27.
- Mixing formats, such as 40 for carbs but 0.3 for protein and fat; the shares are relative to each other, so carbs then take almost all the calories.
- Using maintenance calories when the plan is for a deficit or surplus; the grams follow whatever calorie number you enter.
- Treating the rounded gram values as exact; 67 g of fat is 66.7 g, so tracked totals can differ by a few calories.
Sources
- Food energy - methods of analysis and conversion factors, Chapter 3: Calculation of the energy content of foods - energy conversion factors — FAO Food and Nutrition Paper 77, 2003
About this calculator
Converting a calorie target and macronutrient percentages into grams relies on the fixed energy density of each macronutrient: carbohydrates and protein provide about 4 calories per gram, while fat provides about 9 calories per gram. So for a given daily calorie target, grams of each macro are calculated as (calories × macro percentage) ÷ 4 for carbs and protein, or ÷ 9 for fat.
Dietitians, personal trainers, and people following structured eating plans — like a 40/30/30 or ketogenic macro split — use this conversion to translate a percentage-based diet plan into an actionable daily target they can track with a food scale or nutrition app. It's a standard step in meal planning because food labels and tracking apps report grams, not percentages, so the percentages set by a coach or diet plan need to be converted before they're usable day to day.
Was this helpful?
You can pick up to 3 reactions.
Popular calculators
Loan Calculator
Monthly payment, total interest and full amortization schedule.
Percentage Calculator
Percent change, percent of, and ratio calculations.
Discount Calculator
Calculate final price, savings, and discount amount.
BMI Calculator
Body mass index from height and weight (metric or imperial).
Age Calculator
Compute your exact age in years, months and days from a birth date.
Compound Interest Calculator
Calculate the final amount and interest earned with compounding.
All Calculators
- Loan Calculator
- Profit Calculator
- Discount Calculator
- BMI Calculator
- Percentage Calculator
- Ideal Weight Calculator
- Age Calculator
- Pregnancy Due Date Calculator
- Compound Interest Calculator
- BMR Calculator (Basal Metabolic Rate)
- Tip Calculator
- Fuel Cost Calculator
- Date Difference Calculator
- Sleep Cycle Calculator
- Daily Water Intake Calculator
- Simple Interest Calculator
- Heart Rate Zones Calculator
- Running Pace Calculator
- Pet Age Calculator
- Calories Burned Calculator
- Macro Calculator
- TDEE Calculator (Total Daily Energy Expenditure)
- Waist-to-Hip Ratio Calculator
- Honor Roll Calculator
- One Rep Max (1RM) Calculator
- Ovulation Calculator
- Electricity Cost Calculator
- Unit Price Calculator
- Savings Goal Calculator
- Break-Even Point Calculator
- Paint Calculator
- Course Grade Average Calculator
- Business Days Calculator
- Time Duration Calculator
- Fuel Economy Calculator
- Temperature Converter
- Tile Calculator
- Aspect Ratio Calculator
- Roman Numeral Converter
- Goal Weight Timeline Calculator
- Salary Converter (Hourly to Annual)
- Credit Card Validator (Luhn)
- Body Surface Area (BSA) Calculator
- Feels-Like Temperature Calculator
- Ohm’s Law Calculator
- PPI (Pixel Density) Calculator
- Molar Mass Calculator
- Zodiac Sign Calculator (Western + Chinese)
- IBAN Validator
- Shoe Size Converter
- Country Info & Dialing Code Lookup
- Time Zone Difference (World Clock)
- CAGR (Compound Annual Growth Rate) Calculator
- Rule of 72 Calculator
- Blood Alcohol Content (BAC) Calculator
- Lean Body Mass (LBM) Calculator
- Pythagorean Theorem Calculator
- Speed Converter
- Download Time Calculator
- Date Calculator (Add/Subtract)
No calculators found
Comments (1)
A useful cross-check is to turn the protein grams into grams per kilogram of body weight, since many plans set protein that way. With the default 2,000 kcal and a 25% share, the tool gives 125 g, which for a 70 kg person is about 1.8 g per kg. Percentages of calories can hide very different gram targets as the calorie total changes. Which split are you following, and does your plan quote protein by body weight?