Free calculator for bakers, food brands, candle and soap makers on Shopify
Recipe cost calculator for food, cakes, candles and soap
Enter what you pay for each pack and how much the recipe uses, in grams, ounces, pounds or milliliters. The calculator converts the units and gives you the batch cost, the cost per item or serving, and a price from your target margin.
Free, no sign-up. Nothing you type leaves your browser.
Updated
- Ingredients, 7 lines
- $9.01
- Labor, 1 h × $18.00
- $18.00
- Batch cost
- $27.01
- ÷ 24 cookies + $0.15 bag
- $1.28
- Price at 60% margin
- $3.20
To calculate the cost of a recipe, divide each ingredient’s pack price by the pack size, multiply by the amount the recipe uses and add up the lines. Then add labor for the batch, divide by the number of items the batch makes and add packaging per item. A batch of 24 chocolate chip cookies with $9.01 of ingredients and one hour of work at $18.00 costs $1.28 a cookie with its bag; at a 60% margin it sells for $3.20.
Recipe cost calculator
Start from an example or type your own ingredients. The prices are examples (US, November 2026): replace them with what you pay.
Chocolate chip cookies, batch of 24 · example prices
Ingredients and packaging
Batch, labor and margin
How do you calculate the cost of a recipe? A step-by-step example
You cost a recipe in five steps: price each pack, convert it to the recipe’s unit, cost each line, add labor for the batch, then divide by the yield and add packaging. Here they are with the calculator’s default example, 24 chocolate chip cookies.
- Write down each pack as you buy it. A 5 lb bag of flour for $3.99, a dozen eggs for $3.49, a 2 fl oz bottle of vanilla for $9.99.
- Put the pack and the recipe in the same unit. 5 lb = 5 × 453.59237 g = 2,267.96 g, and 2 fl oz = 2 × 29.5735 ml = 59.15 ml.
- Cost each line: pack price ÷ pack size × amount used. Flour: $3.99 ÷ 2,267.96 g × 280 g = $0.49.
- Add up the lines, then labor for the whole batch: $9.01 + 1 h × $18.00 = $27.01.
- Divide by the yield and add packaging per item: $27.01 ÷ 24 + $0.15 bag = $1.28 per cookie.
| Ingredient | Bought as | Used | Calculation | Line cost |
|---|---|---|---|---|
| All-purpose flour | 5 lb, $3.99 | 280 g | $3.99 ÷ 2,267.96 g × 280 g | $0.49 |
| Butter | 1 lb, $4.49 | 226 g | $4.49 ÷ 453.59 g × 226 g | $2.24 |
| Granulated sugar | 4 lb, $3.99 | 150 g | $3.99 ÷ 1,814.37 g × 150 g | $0.33 |
| Brown sugar | 2 lb, $2.99 | 165 g | $2.99 ÷ 907.18 g × 165 g | $0.54 |
| Eggs | 12 pcs, $3.49 | 2 pcs | $3.49 ÷ 12 pcs × 2 pcs | $0.58 |
| Chocolate chips | 12 oz, $3.99 | 12 oz | $3.99 ÷ 12 oz × 12 oz | $3.99 |
| Vanilla extract | 2 fl oz, $9.99 | 5 ml | $9.99 ÷ 59.15 ml × 5 ml | $0.84 |
| Ingredients for 24 cookies | $9.01 | |||
batch cost = $9.01 ingredients + 1 h × $18.00 labor = $27.01
cost per cookie = $27.01 ÷ 24 + $0.15 bag = $1.13 + $0.15 = $1.28
price = $1.28 ÷ (1 − 0.60) = $3.20 · profit = $3.20 − $1.28 = $1.92
Leave labor out and the same cookie seems to cost $0.53 ($9.01 ÷ 24 + $0.15), so a $3.20 price looks like a margin of 83%. Your hour of work is what brings it to 60%.
How do you calculate food cost percentage?
Food cost percentage is the ingredient cost of one item divided by its selling price, times 100. For the cookie above, $9.01 ÷ 24 = $0.375 of ingredients per cookie, and $0.375 ÷ $3.20 = 11.7%.
food cost % = ingredient cost per item ÷ selling price × 100
Restaurant guides commonly cite 28–35% as a typical food cost for a menu (ChowNow). That benchmark comes from restaurants, where kitchen labor and rent are paid out of the rest of the menu price. A shop that bakes, packs and ships its own products has labor and packaging in every item, so a food cost target alone can price below cost: at 30%, the cookie would sell for $0.375 ÷ 0.30 = $1.25, less than the $1.28 it costs with an hour of work and a bag.
Use food cost % as a quick check that ingredient prices haven’t crept up, and price from the full cost per item. For markup, margin and fees side by side, use the margin calculator.
Unit conversions for recipe costing: grams, ounces, pounds and fluid ounces
A recipe line can only be costed when the pack and the recipe use the same unit, so convert both to grams for weight or to milliliters for volume before you divide. The calculator uses these exact factors.
| Unit | Kind | Equals | The other way |
|---|---|---|---|
| 1 ounce (oz) | Weight | 28.349523125 g | 1 g = 0.035274 oz |
| 1 pound (lb) | Weight | 16 oz = 453.59237 g | 1 kg = 2.204623 lb |
| 1 kilogram (kg) | Weight | 1,000 g | 1 kg = 35.273962 oz |
| 1 US fluid ounce (fl oz) | Volume | 29.5735295625 ml | 1 ml = 0.033814 fl oz |
| 1 US gallon (gal) | Volume | 128 fl oz = 3,785.411784 ml | 1 l = 0.264172 gal |
| 1 liter (l) | Volume | 1,000 ml | 1 l = 33.814023 fl oz |
| 1 piece (pcs) | Count | 1 egg, wick, jar or box | a dozen = 12 pcs |
A price per pound, per gram
Butter at $4.49 per lb is $4.49 ÷ 453.59237 g = $0.0099 per gram, or $9.90 per kg. The cookie recipe uses 226 g of it: 226 × $0.0099 = $2.24.
Ounces and fluid ounces differ
An ounce (oz) is a weight and a fluid ounce (fl oz) is a volume: 1 fl oz of water weighs about 1.04 oz (29.57 g), and oils and honey weigh other amounts. The calculator converts weight to weight and volume to volume, and flags a line whose units don’t match.
Cups and spoons: weigh them once
A cup is a volume, so its weight depends on the ingredient: King Arthur Baking’s ingredient weight chart lists 1 cup of all-purpose flour at 120 g, granulated sugar at 198 g and packed brown sugar at 213 g. Weigh your own cup, or use a chart, and enter grams.
How much should you charge for a cake?
Charge for a cake’s full cost, meaning its ingredients, your baking and decorating time and the box, plus your margin. The Cake example, an 8-inch vanilla layer cake with buttercream, costs $45.02 and sells for $90.04 at a 50% margin.
| Ingredients: flour, sugar, 20 oz butter, 4 eggs, milk, powdered sugar, vanilla | $12.62 |
|---|---|
| Labor, 1.5 h × $20.00 | $30.00 |
| Cake box and board | $2.40 |
| Cost per cake | $45.02 |
| Price at 50% margin: $45.02 ÷ (1 − 0.50) | $90.04 |
| Per serving, 12 servings | cost $3.75 · price $7.50 |
- Labor is most of the cost: $30.00 of $45.02, or 67%. Price your time at the rate you would pay a baker.
- Sizes scale roughly by pan area. A 10-inch cake of the same height has (10 ÷ 8)² = 1.5625 times the area of an 8-inch one, so about $12.62 × 1.5625 = $19.72 of ingredients. A 6-inch cake has (6 ÷ 8)² = 0.5625 times: about $7.10. The sides need a little less extra frosting than the area suggests, so weigh the batter and frosting once per size.
- Sizes on Shopify are variants. In Costory, option modifiers scale one recipe per size and write each variant’s cost (Starter, $12.99 a month). More in recipe costing for food and beverage brands.
How to price candles and soap from their cost
A candle costs its wax, fragrance oil, wick, jar and label plus your pouring time, divided by the candles in the batch. In the Candle example, 12 soy candles in 8 oz jars cost $7.28 each with a gift box, and a 60% margin prices them at $18.20.
| Line | Used | Bought as | Cost |
|---|---|---|---|
| Soy wax | 78 oz | 10 lb, $27.99 | $13.65 |
| Fragrance oil | 6.24 oz | 16 oz, $24.99 | $9.75 |
| Cotton wicks | 12 pcs | 100 pcs, $12.99 | $1.56 |
| Jars with lids | 12 pcs | 12 pcs, $23.99 | $23.99 |
| Labels | 12 pcs | 100 pcs, $14.99 | $1.80 |
| Materials for 12 candles | $50.75 | ||
| Labor, 1.5 h × $20.00 | $30.00 | ||
| Per candle: $80.75 ÷ 12 + $0.55 gift box | $7.28 | ||
| Price at 60% margin: $7.28 ÷ (1 − 0.60) | $18.20 | ||
Wax and fragrance by weight
Each candle holds 6.5 oz of wax, 78 oz for the batch of 12, and the fragrance oil is 8% of the wax weight: 78 oz × 0.08 = 6.24 oz. Both are weighed, so both lines use oz.
The jar is the biggest line
Jars are $23.99 of the $50.75 in materials, or 47%. The same 10% saving is worth $0.20 a candle on jars and $0.11 on wax.
Selling wholesale too?
If you also sell to shops at half the retail price, $9.10 a candle leaves a margin of ($9.10 − $7.28) ÷ $9.10 = 20%. Check that number before you agree to a wholesale order.
Open the candle example in the calculator
Soap works the same way. The Soap example costs a loaf of 10 cold process bars: $17.64 of oils, lye, water and essential oil plus an hour of work at $20.00 comes to $37.64, or $4.16 a bar with its wrap, and $10.40 at a 60% margin. The amounts are for costing only: check your own recipe with a lye calculator. Open the soap example or read about costing for beauty and cosmetics brands.
From one recipe to every product in your Shopify store
Costory is a Shopify app that runs this calculation inside your Shopify admin: it costs each product from its recipe, writes the result to each variant’s Cost per item, and recalculates when an ingredient price changes. A calculator gives you one number on one day; the app keeps every number current.
What the app adds to this calculator
- Ingredients bought in packs (a 25 kg sack, a box of 100 wicks) with a waste % per ingredient. Free plan.
- Recipe yield, labor lines with hourly rates, and overhead rules: a percentage, a fixed amount per item, or monthly expenses ÷ planned quantity. Free plan.
- Semi-finished goods with their own recipe, such as a dough, a ganache or a fragrance blend, and option modifiers for sizes. Starter, $12.99 a month.
- Price rules such as
ending(margin(cost, 60%), 0.99), with proposals that show the margin before and after. One rule applied by hand on Free; proposals and automatic mode from Starter. - Ingredient stock deducted by Shopify orders, with purchases and write-offs, on Growth ($39 a month); lots with expiry dates on Pro ($99 a month).
Good to know before you install
- Costory works in metric units and pieces (g, kg, ml, l and pcs, plus lengths and areas): enter pounds and ounces as grams, with the table above.
- It costs the products in a Shopify catalog, not restaurant menus, and it does not make nutrition or allergen labels.
- It installs from the Shopify App Store and is billed by Shopify in USD: free for up to 10 products, with a 14-day trial on paid plans.
Compare plans, see how Costory keeps Shopify COGS on real costs and how margin-based pricing works. Costing a product you buy and resell? Try the product cost calculator.
Questions about recipe and food costs
How do I calculate the cost per serving?
Divide the cost of the whole recipe, labor and packaging included, by the number of servings it makes. An 8-inch layer cake that costs $45.02 with labor and a box, cut into 12 servings, costs $45.02 ÷ 12 = $3.75 a serving. In the calculator, enter the servings as the batch yield and move the box into the ingredient lines, because packaging per item is added once per serving.
What is the difference between markup and margin when pricing a recipe?
Margin is profit as a share of the selling price; markup is profit as a share of the cost. The cookie example costs $1.28 and sells for $3.20, so its $1.92 profit is a 60% margin ($1.92 ÷ $3.20) and a 150% markup ($1.92 ÷ $1.28). A 60% margin means multiplying the cost by 2.5: multiplying by 1.6 would give $2.05, only a 38% margin.
How do I include waste or trimming in a recipe cost?
Cost what you buy, not what ends up in the product: divide the amount the recipe needs by 1 minus the waste. If a recipe needs 300 g of hulled strawberries and hulling loses 10%, you buy 300 ÷ 0.90 = 333 g, which at $5.99 per lb costs $4.40 instead of $3.96. In the calculator, enter the amount before trimming; Costory keeps a waste % on each ingredient and applies it the same way.
How do I cost a homemade component such as frosting or dough?
Cost it as its own recipe, divide by the weight it makes, and use that price per gram as an ingredient. A batch of buttercream that costs $8.00 and weighs 1,000 g costs $0.008 per gram, so 350 g on a cake adds 350 × $0.008 = $2.80. In Costory these are semi-finished goods with their own recipe, on the Starter, Growth and Pro plans.
What is a good food cost percentage?
Restaurant guides commonly cite 28–35% of the menu price. A product you bake, pack and ship yourself usually runs lower, because labor and packaging take a bigger share of its price: the cookie example is at 11.7% with a 60% margin. Watch the percentage over time: if it rises while the recipe and the price stay the same, an ingredient got more expensive.
How often should I update my recipe costs?
Whenever an ingredient you buy changes price. In Costory’s brownie box example, dark chocolate going from $14 to $16 per kg raises the cost from $6.12 to $6.52, and the price rule ending(margin(cost, 55%), 0.99) moves the price from $13.99 to $14.99. Costory recalculates costs when you change an ingredient price; applying new prices automatically needs the Starter plan or above.
Can Costory calculate recipe costs inside Shopify?
Yes. Costory is a Shopify app that costs every product from its recipe, with packs, waste, labor and overhead, writes the result to each variant’s Cost per item and recalculates when an ingredient price changes. It is free for up to 10 products; paid plans start at $12.99 a month with a 14-day trial, billed by Shopify.
Related
Product cost calculator
Cost per unit from materials, waste, packaging, labor and overhead, plus a price that keeps your margin after payment fees.
Open the calculator →Food and beverage
Recipe costs, margin-based prices and ingredient stock for bakeries, chocolatiers, coffee roasters and other food brands.
Learn more →Beauty and cosmetics
Formula costing for skincare, soap and candle brands: grams at per-kg prices, jars and labels, batches, sizes, expiry dates and margin-based prices.
Learn more →Cost every recipe in your Shopify store, and keep it current.
Free for up to 10 products. Paid plans start with a 14-day trial.
Install free on Shopify