Work through the task
Translate a calorie amount and a chosen percentage allocation into grams.
- Enter the calorie amount and percentages for protein, carbohydrate and fat.
- The percentages must total 100. The conversion applies the supported energy-per-gram factors; it does not choose an allocation for you.
- Review the result before copying or downloading. Editing an input invalidates the previous result; keep an original if the transformation matters.
Example to check
For a hypothetical 2,000 calories at 30% protein, 40% carbohydrate and 30% fat, those portions are 150 g protein and 200 g carbohydrate.
Limits and output behavior
Use finite values within the bounds shown by the controls. This calculator uses floating-point arithmetic and rounded display values; an exported decimal is not a promise of exact accounting precision. This page performs allocation arithmetic and supplies no individual dietary recommendation.
Troubleshooting
Check that all three percentages are finite and total 100. Enter a calorie amount within the control’s bounds; a missing allocation is not silently inferred.
Questions
Does this page choose a protein, carbohydrate or fat allocation?
No. You supply the percentages. The tool applies the stated calorie-per-gram arithmetic to that hypothetical allocation.
Input and privacy
Processing runs in this browser. Inputs are not saved automatically. An explicitly chosen local draft, where offered, is plaintext storage on this device. Downloaded files, clipboard contents and browser extensions have separate retention behavior.