Package Control

The Sublime Text package directory, restarted.

CalorieMath

Daily calorie needs (Mifflin-St Jeor BMR and TDEE), calories from macros, protein RDA and a Markdown Nutrition Facts table, from the Sublime Text comm

Links

Versions

1.0.2 (ST4000+) ·
2026-12-03 04:53

More
  • (ST4000+) 1.0.1 ·
    2026-11-21 07:59
  • 1.0.0 ·
    2026-11-21 07:49

Calorie Math

Quick nutrition math inside Sublime Text, from the command palette.

Useful if you write meal plans, recipes, food blogs or nutrition notes in Sublime and want numbers without leaving the editor.

All commands work offline. Nothing is saved or sent anywhere.

Commands

Open the command palette (Ctrl+Shift+P, or Cmd+Shift+P on macOS) and type Calorie Math.

Calorie Math: Daily Calories (TDEE)

Estimates how many calories you burn per day.

  1. Type your stats in the input panel at the bottom, separated by spaces: weight_kg height_cm age sex, for example 70 170 30 female.

  2. Pick an activity level from the list:

    Level Multiplier
    sedentary 1.2
    light 1.375
    moderate 1.55
    very active 1.725
    extra active 1.9
  3. A dialog shows:

    BMR 1452 kcal/day
    TDEE 2250 kcal/day (moderate)
    gentle loss 1750 kcal/day
    protein RDA 56 g/day
    

Calorie Math: Calories From Macros

Turns grams of protein, carbs and fat into calories and a percentage split.

Type protein_g carbs_g fat_g, for example 30 50 15.

The status bar shows: Calorie Math: 455 kcal (protein 26%, carbs 44%, fat 30%).

Uses 4 kcal/g for protein and carbs, 9 kcal/g for fat.

Calorie Math: Insert Nutrition Facts Table

Inserts a blank Markdown Nutrition Facts table at each cursor, ready to fill in:

| Nutrition Facts | per serving | % DV |
|---|---:|---:|
| Calories |  |  |
| Total Fat |  g |  |
| Sodium |  mg |  |
| Total Carbohydrate |  g |  |
| Dietary Fiber |  g |  |
| Total Sugars |  g |  |
| Protein |  g |  |

Install

Package Control: Install Package → CalorieMath. Requires Sublime Text 4.

No settings and no default key bindings. To bind a key, add to your key bindings file, for example:

{ "keys": ["ctrl+alt+m"], "command": "calorie_math_macros" }

Command names: calorie_math_tdee, calorie_math_macros, calorie_math_insert_label.

Notes

Estimates for general wellness, not medical advice.

Same formulas as the web calculator, with sources: https://snowbelly.app/tools/calorie-calculator/

MIT License.

Results

Packages