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.
Run — free
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.
What you can do with it
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.
FAQ
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.
For developers — API access
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.
API endpoint
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.
Call it from your stack
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}'const res = await fetch("https://api.kit.forhosting.com/cook/calorie-count-recipe", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.KIT_KEY}`,
"Content-Type": "application/json"
},
body: JSON.stringify({
"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
})
});
const { task_id } = await res.json();import os, requests
res = requests.post(
"https://api.kit.forhosting.com/cook/calorie-count-recipe",
headers={"Authorization": f"Bearer {os.environ['KIT_KEY']}"},
json={
"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 = res.json()["task_id"]<?php
$res = file_get_contents("https://api.kit.forhosting.com/cook/calorie-count-recipe", false, stream_context_create([
"http" => [
"method" => "POST",
"header" => "Authorization: Bearer " . getenv("KIT_KEY") . "\r\nContent-Type: application/json",
"content" => '{"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 = json_decode($res, true);body := bytes.NewBufferString(`{"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}`)
req, _ := http.NewRequest("POST", "https://api.kit.forhosting.com/cook/calorie-count-recipe", body)
req.Header.Set("Authorization", "Bearer "+os.Getenv("KIT_KEY"))
req.Header.Set("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)Example request
{
"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
}Example response
{
"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.
Pricing
Published price — no tokens, no invented credits. A failed task is never charged.
Errors
| HTTP | Code | Meaning |
|---|---|---|
401 | unauthorized | Missing or invalid API key. |
402 | insufficient_balance | Your balance doesn't cover the task price. |
404 | unknown_type | That task type doesn't exist. |
429 | rate_limited | Too many requests. Use the webhook instead of polling. |