Convert cooking measurements
Move a recipe between cups and grams without guessing: 2 US cups of flour are turned into grams at 0.53 g per millilitre, because a cup of flour does not weigh the same as a cup of honey. Free in your browser.
- Free
- Runs in your browser
- No sign-up
- Your data stays on your device
Run — free
Worked example
- Amount
- 2
- From unit
- Cup
- To unit
- G
- Ingredient
- Flour
- Converted
- 250.78353069
- Density g per ml
- 0.53
Cooking conversions become difficult when a recipe crosses both measurement systems and measurement types. A cup describes volume, while grams and ounces describe mass, so the ingredient matters. This converter handles milliliters, grams, US cups, avoirdupois ounces, tablespoons, and teaspoons with a fixed density category for water, milk, oil, flour, sugar, butter, or honey. The result is deterministic and suitable for quick recipe adjustments, kitchen planning, and repeatable automated calculations.
Choose the quantity, units, and ingredient category
Start by entering a non-negative amount, then select the unit printed in the recipe and the unit you want to use. The available units are milliliters, grams, US cups, avoirdupois ounces, tablespoons, and teaspoons. Finally, choose the ingredient category that most closely matches what you are measuring.
Water, milk, oil, flour, sugar, butter, and honey are provided because their densities cover many common kitchen situations. Density matters whenever the calculation crosses from a volume unit to a mass unit, or from mass back to volume. For example, one cup of flour does not weigh the same as one cup of honey.
For a volume-to-volume calculation such as tablespoons to milliliters, or a mass-to-mass calculation such as ounces to grams, the selected category does not alter the arithmetic, but it remains in the result so the assumptions are explicit. This makes a saved conversion easier to review later and prevents a hidden density choice from being mistaken for an exact property of every possible ingredient.
Understand the standards and density assumptions
The converter uses the US customary cooking volume chain. A US cup is 236.5882365 milliliters, a tablespoon is 14.78676478125 milliliters, and a teaspoon is 4.92892159375 milliliters. An ounce means the international avoirdupois mass ounce, equal to 28.349523125 grams; it does not mean a fluid ounce.
Cross-dimension conversions first normalize volume to milliliters or mass to grams, apply the chosen density in grams per milliliter, and then scale into the target unit. The density table is deliberately fixed, so identical input always produces identical output. These categories are practical averages rather than laboratory measurements.
Flour density changes with variety, sifting, humidity, and how firmly a cup is filled. Brown sugar can be packed, oils vary slightly by composition and temperature, and butter formulations differ. Use the result as a consistent recipe conversion, not as a substitute for a scale when a formula depends on precise baker's percentages or regulated nutritional measurements.
The returned density records the exact assumption used.
Use the result safely in recipes and automation
Read the converted value together with its source unit, target unit, ingredient, and density. Keeping those fields together is especially helpful when a recipe is scaled, stored in a database, or passed to another system. Round only at the point where your kitchen tool requires it: a scale may support whole grams, while measuring spoons often work in halves or quarters.
Rounding every intermediate conversion can compound error when a recipe is multiplied for a large batch. If an ingredient is not represented well by a category, choose the nearest physical match only when approximate cooking accuracy is acceptable. For precision baking, obtain a tested gram weight from the recipe author or measure the ingredient directly.
Unsupported unit names are rejected instead of guessed. That behavior protects automated workflows from silently treating an abbreviation as the wrong dimension, particularly around the ambiguous word ounce, which this capability always treats as mass.
What you can do with it
Adapt an overseas recipe
Turn cups and spoons into milliliters or grams while preserving an explicit ingredient-density assumption.
Scale bakery prep
Convert flour, sugar, butter, or honey measures before multiplying a recipe for a larger batch.
Normalize recipe data
Create consistent metric or imperial quantities for a recipe application without relying on network lookups.
FAQ
Does oz mean a fluid ounce?
No. In this capability, oz is an avoirdupois mass ounce. Use cup, tbsp, tsp, or ml for volume.
Why is an ingredient required?
A density is necessary to convert between volume and mass, and returning the category makes the assumption visible even for same-dimension conversions.
Are cups US cups?
Yes. The cup, tablespoon, and teaspoon constants use the US customary cooking system.
Are density conversions exact?
No. They use fixed practical category averages. Real density varies with ingredient type, packing, temperature, and moisture.
Which ingredients can I choose?
Water, milk, oil, flour, sugar, butter and honey. Pick the closest one to what you are measuring. When you convert volume to volume or weight to weight, the choice does not change the number, but it stays in the result.
Related tools
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/calc3/unit-conversion-cooking-metric-imperial \
-H "Authorization: Bearer $KIT_KEY" \
-H "Content-Type: application/json" \
-d '{"amount":2,"from_unit":"cup","to_unit":"g","ingredient":"flour"}'const res = await fetch("https://api.kit.forhosting.com/calc3/unit-conversion-cooking-metric-imperial", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.KIT_KEY}`,
"Content-Type": "application/json"
},
body: JSON.stringify({
"amount": 2,
"from_unit": "cup",
"to_unit": "g",
"ingredient": "flour"
})
});
const { task_id } = await res.json();import os, requests
res = requests.post(
"https://api.kit.forhosting.com/calc3/unit-conversion-cooking-metric-imperial",
headers={"Authorization": f"Bearer {os.environ['KIT_KEY']}"},
json={
"amount": 2,
"from_unit": "cup",
"to_unit": "g",
"ingredient": "flour"
},
)
task_id = res.json()["task_id"]<?php
$res = file_get_contents("https://api.kit.forhosting.com/calc3/unit-conversion-cooking-metric-imperial", false, stream_context_create([
"http" => [
"method" => "POST",
"header" => "Authorization: Bearer " . getenv("KIT_KEY") . "\r\nContent-Type: application/json",
"content" => '{"amount":2,"from_unit":"cup","to_unit":"g","ingredient":"flour"}',
],
]));
$task = json_decode($res, true);body := bytes.NewBufferString(`{"amount":2,"from_unit":"cup","to_unit":"g","ingredient":"flour"}`)
req, _ := http.NewRequest("POST", "https://api.kit.forhosting.com/calc3/unit-conversion-cooking-metric-imperial", body)
req.Header.Set("Authorization", "Bearer "+os.Getenv("KIT_KEY"))
req.Header.Set("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)Example request
{
"amount": 2,
"from_unit": "cup",
"to_unit": "g",
"ingredient": "flour"
}Example response
{
"task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
"type": "calc3.unit_conversion_cooking_metric_imperial",
"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. |
Technical notes
Use the result safely in recipes and automation
The API price is $0.002 per request, while the same deterministic logic can support interactive use.
Technical questions
What happens with an unsupported unit?
The request returns an invalid_input error that identifies the unsupported unit pair instead of guessing.