["label"=>"Standard training","carb"=>8.0,"pro"=>1.8,"fat"=>1.2], "light" => ["label"=>"Light day","carb"=>6.0,"pro"=>1.6,"fat"=>1.0], "heavy" => ["label"=>"Heavy training","carb"=>10.0,"pro"=>2.0,"fat"=>1.5], "match" => ["label"=>"Match day","carb"=>8.5,"pro"=>1.8,"fat"=>1.2], ]; // Food database: per serving macros and kcal (approx) $FOODS = [ ["White rice (cooked) – 1 cup", "cup", 45, 4, 0.4, 206], ["Pasta (cooked) – 1 cup", "cup", 43, 8, 1.3, 221], ["Rice pasta (cooked) – 1 cup", "cup", 44, 5, 1, 200], ["Bagel – 1 regular", "each", 50, 9, 1.5, 250], ["Bread – 1 slice", "slice", 14, 3, 1, 80], ["Corn tortillas – 2 small", "pair", 22, 4, 1, 100], ["Flour tortilla – 1 large", "each", 36, 6, 6, 220], ["Oatmeal (cooked) – 1 cup", "cup", 27, 6, 3, 154], ["Honey – 1 tbsp", "tbsp", 17, 0, 0, 64], ["Pancakes – 2 medium", "serving", 28, 6, 5, 175], ["Maple syrup – 2 tbsp", "tbsp", 26, 0, 0, 104], ["Orange juice – 8 oz", "8oz", 26, 2, 0, 112], ["Banana – 1 medium", "each", 27, 1, 0.3, 105], ["Apple – 1 medium", "each", 25, 0, 0.3, 95], ["Strawberries – 1 cup", "cup", 13, 1, 0.5, 53], ["Broccoli (cooked) – 1 cup", "cup", 11, 4, 0.6, 55], ["Greek yogurt – 3/4 cup", "serving", 10, 15, 4, 150], ["Egg – 1 large", "each", 0.4,6, 5, 70], ["Chicken breast – 4 oz", "4oz", 0, 35,4, 187], ["Beef (lean) – 4 oz", "4oz", 0, 26,15, 250], ["Salmon – 4 oz", "4oz", 0, 25,14, 233], ["Milk – 8 oz", "8oz", 12, 8, 5, 103], ["Chocolate milk – 8 oz", "8oz", 28, 8, 5, 180], ["Granola bar – 1 bar", "each", 29, 4, 7, 190], ["String cheese – 1 stick", "each", 1, 7, 6, 80], ["Banana bread – 1 slice", "slice", 33, 3, 6, 196], ["Biscuit – 1", "each", 20, 3, 8, 160], ["Olive oil – 1 tbsp", "tbsp", 0, 0, 14, 119], ["Peanut butter – 2 tbsp", "serving", 7, 7, 16, 190], ["Avocado – 1/2 medium", "half", 6, 2, 11, 120], ["Tomato – 1 medium", "each", 5, 1, 0.2, 22], ["Lettuce – 2 cups", "serving", 2, 1, 0, 10], ]; $MEALS = ["Breakfast","Snack 1","Lunch","Snack 2","Dinner","Snack 3"]; $ROWS_PER_MEAL = 10; // ----------------------- Helpers ----------------------- function sel($arr, $key, $default) { return isset($arr[$key]) ? $arr[$key] : $default; } function toFloat($x) { return is_numeric($x) ? floatval($x) : 0.0; } function lbsToKg($lb) { return $lb / 2.2; } function targetsFor($lb, $preset) { $kg = lbsToKg($lb); $carbG = $kg * $preset["carb"]; $proG = $kg * $preset["pro"]; $fatG = $kg * $preset["fat"]; $kcal = $carbG*4 + $proG*4 + $fatG*9; return ["kg"=>$kg, "carbG"=>$carbG, "proG"=>$proG, "fatG"=>$fatG, "kcal"=>$kcal]; } // ----------------------- Read input ----------------------- $day = sel($_POST, "day", "standard"); $w = intval(sel($_POST, "weight", 150)); $preset = $PRESETS[$day]; $t = targetsFor($w, $preset); // Build plan from POST $plan = []; // array of [meal, itemName, servings, carb, pro, fat, kcal] $totCarb=0; $totPro=0; $totFat=0; $totKcal=0; for ($mi=0; $mi Youth Athlete Nutrition Planner (Server-rendered)

Youth Athlete Nutrition Planner

Server-rendered. No JavaScript required. Choose a day type and weight, then build meals from dropdowns. Submit to calculate targets, totals, and remaining.

Carb / Protein / Fat in g/kg
kg = lb / 2.2
Targets for selection
kg
Carb (g)
Protein (g)
Fat (g)
Total kcal

Meal Builder

For each meal, pick up to 10 foods and enter servings. Leave unused rows blank.
Food (per serving)ServingsCarb (g)Protein (g)Fat (g)Calories

Daily Plan Totals

$row) { [$meal,$name,$sv,$c,$p,$f,$k] = $row; echo ""; if ($i===0) { // Rowspan for first column if multiple items $span = count($byMeal[$m]); echo ""; } echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; } } if (empty($plan)) { echo ""; } ?>
MealItemsServingsCarb (g)Protein (g)Fat (g)Calories
".htmlspecialchars($meal)."".htmlspecialchars($name)."".number_format($sv,2)."".number_format($c,0)."".number_format($p,0)."".number_format($f,0)."".number_format($k,0)."
No items yet. Build a plan above and click Calculate.
Plan totals
Target
Remaining to target
Totals are based on the foods and servings you selected above. Adjust and resubmit to refine.

Reference: Per-serving Nutrition

FoodUnitCarb (g)Protein (g)Fat (g)Calories