ForHosting KIT · Developer Utilities

Recipe calorie calculator

This recipe calorie calculator turns a practical ingredient list into two numbers that are easy to use: the calories in the complete recipe and the calories in each serving.

● BetaFree · in your browser
Use it from WebAPIEmailTelegramApp soon

Enter every ingredient's quantity, state how many calories one matching unit contains, and provide the number of servings the finished recipe makes. The calculator multiplies each quantity by its per-unit calories, adds the results, and divides the total by the serving count. It also returns an ingredient breakdown so you can inspect the arithmetic instead of trusting an unexplained estimate.

Prepare compatible ingredient values

Start with the nutrition information for each ingredient and make sure its unit matches the quantity you plan to enter. If a label says that one tablespoon contains 95 calories, a quantity of two means two tablespoons and contributes 190 calories. If your recipe uses grams but the source lists calories per 100 grams, either enter the quantity as the number of 100-gram units or first convert the source figure to calories per gram. The calculator deliberately does not guess units, portion sizes, edible yield, or ingredient density. Those assumptions differ too much between foods and kitchens. Give every row a clear name, a quantity of zero or more, and a nonnegative calories-per-unit value. Zero can represent a listed ingredient that contributes no energy or is currently omitted, while negative values are rejected because they cannot describe food energy. Keeping the source and entered unit aligned is the most important step for obtaining a meaningful recipe total. Review packaging, a trusted nutrition database, or your own formulation sheet before calculating when precision matters.

Understand the calculation and result

For each row, the calculator multiplies quantity by calories per unit. It then adds every ingredient contribution to produce total calories for the whole recipe. Calories per serving are that total divided by the servings value. For example, an ingredient used in a quantity of 1.5 with 80 calories per unit contributes 120 calories. The returned breakdown preserves the normalized name, quantity, per-unit value, and calculated calories for every ingredient, making transcription mistakes easier to spot. Results are rounded to six decimal places for stable, reproducible output while the total is accumulated before final rounding. The serving count may be a whole number or a positive decimal, which supports batch yields such as 2.5 portions, but it can never be zero or negative because division would be undefined or physically meaningless. The output reports the ingredient count and serving count alongside both calorie totals, so an automated workflow can verify that it processed the intended recipe rather than relying on display order or hidden assumptions.

Use the estimate responsibly

Treat the result as an arithmetic estimate whose quality depends on the values supplied. Nutrition labels use rounding rules, natural ingredients vary, and cooking can change water content without necessarily changing the energy in the batch. Oils left in a pan, marinades discarded, trimming, evaporation, and uneven serving sizes can all make consumed calories differ from the calculated figure. For meal planning, use the finished yield you actually portion: if the recipe is expected to make six servings but you divide it into five containers, enter five. When consistency matters, weigh the completed dish and define a serving by weight, then calculate how many such servings the batch contains. The API performs the same deterministic calculation as the browser version, uses no network lookup, and does not silently replace missing nutrition data. That makes it suitable for recipe spreadsheets, menu-development tools, meal-prep systems, and repeatable tests. It is not medical advice and should not replace guidance from a qualified professional for clinical nutrition, allergies, or treatment decisions.

Plan meal-prep portions

Calculate the batch total and divide it across the exact number of containers you prepare.

Compare recipe variations

Change an ingredient quantity or calorie value and see how the whole recipe and each serving change.

Add calorie estimates to a recipe system

Use deterministic output and an auditable ingredient breakdown in menus, spreadsheets, or cooking applications.

How much does an API calculation cost?

Each API calculation costs $0.002. The browser calculator runs locally for free.

What does calories per unit mean?

It is the calories in one unit that matches your quantity, such as one gram, one tablespoon, one cup, or one package.

Can the serving count be a decimal?

Yes. Any finite positive number is accepted, which supports recipes yielding partial or weight-based servings.

Why are zero or negative servings rejected?

Calories per serving require division by a physically meaningful serving count, so the count must be greater than zero.

Does this tool look up nutrition facts?

No. It performs deterministic arithmetic on the quantities and calorie values you provide and makes no network requests.

Everything on this page is available programmatically. This section is for teams who want to wire it into their own systems; everyone else can just use the tool above.

POSThttps://api.kit.forhosting.com/cook/calorie-count-recipe

Prefer to automate it? One authenticated POST creates the task; the result comes back by webhook or a signed link. The same capability also runs here on the web, by email and from Telegram — and soon from our app too.

curl -X POST https://api.kit.forhosting.com/cook/calorie-count-recipe \
  -H "Authorization: Bearer $KIT_KEY" \
  -H "Content-Type: application/json" \
  -d '{"ingredients":[{"name":"Rolled oats","quantity":2,"calories_per_unit":150},{"name":"Banana","quantity":1.5,"calories_per_unit":105},{"name":"Peanut butter","quantity":2,"calories_per_unit":95}],"servings":5}'
{
  "ingredients": [
    {
      "name": "Rolled oats",
      "quantity": 2,
      "calories_per_unit": 150
    },
    {
      "name": "Banana",
      "quantity": 1.5,
      "calories_per_unit": 105
    },
    {
      "name": "Peanut butter",
      "quantity": 2,
      "calories_per_unit": 95
    }
  ],
  "servings": 5
}
{
  "task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
  "type": "cook.calorie_count_recipe",
  "status": "queued",
  "_links": {
    "result": "/tasks/tsk_…/result"
  }
}

The API is asynchronous: the call returns a task_id immediately and the result arrives by webhook. Polling is capped at 1 req/s per task.

Per request$0.002

Published price — no tokens, no invented credits. A failed task is never charged.

HTTPCodeMeaning
401unauthorizedMissing or invalid API key.
402insufficient_balanceYour balance doesn't cover the task price.
404unknown_typeThat task type doesn't exist.
429rate_limitedToo many requests. Use the webhook instead of polling.

Read the full KIT documentation →