Sugar Check

Baking

Cake Ingredient Cost

Cost = Σ (grams ÷ 1000 × price per kg) plus eggs × price each. Per slice = total ÷ servings.

Reviewed September 2026

Enter your details

Results

Ingredient cost$3.6
Per slice$0.3

A pantry floor cost, not a bakery quote

This calculator adds four ingredients you already priced and divides by slices. Cost = (flour g ÷ 1000 × flour $/kg) + (sugar g ÷ 1000 × sugar $/kg) + (butter g ÷ 1000 × butter $/kg) + (eggs × price per egg). Per slice = total ÷ servings. The number is a floor. Frosting, fruit, vanilla, electricity, the cake stand, and your time are omitted on purpose so a parent can see what the batter costs before someone compares it with a bakery invoice.

NIST’s mass table is why the formula divides grams by 1000. One kilogram is 1000 grams. Price per kilogram times kilograms of each staple is ordinary unit matching. If your receipt is per pound, convert first: dollars per pound ÷ 0.4536 ≈ dollars per kilogram, or multiply pounds by 2.2046 to get kilograms and then divide spend by that mass.

[1]

How to use the cake cost calculator

Weigh flour, sugar, and butter in grams, or convert from the recipe and then weigh the next time. Enter the number of eggs that go into the batter, not the number in the carton. Enter the unit prices you actually paid. The defaults (240 g flour, 200 g sugar, 227 g butter, 3 eggs, $1.20/kg flour, $1.50/kg sugar, $8/kg butter, $0.40/egg, 12 slices) are a one-layer yellow cake sketch, not a market quote.

For eggs, divide the carton price by the count. A $4.80 dozen is $0.40 each. For flour and sugar, use the bag price divided by bag kilograms. A 2.27 kg (5 lb) bag of sugar that cost $3.40 is $1.50/kg. Butter is often sold by the pound; a $3.63 pound is about $8/kg.

[1][2]

Worked example using the widget defaults

Flour: 240/1000 × 1.20 = $0.288. Sugar: 200/1000 × 1.50 = $0.30. Butter: 227/1000 × 8.00 = $1.816. Eggs: 3 × 0.40 = $1.20. Sum = $3.604, which the widget prints as $3.60. Twelve slices = $0.30 per slice. If you add the already-rounded line items ($0.29 + $0.30 + $1.82 + $1.20) you get $3.61. Trust the summed total, then divide.

Butter and eggs dominate. Flour and sugar barely move the total at these staple prices. If you only change flour from $1.20 to $2.00/kg, the cake rises by about $0.19. If butter jumps from $8 to $12/kg, the same 227 g adds $0.91. That is why a cheap-cake search that ignores butter is looking at the wrong line.

Default batter arithmetic (prices are placeholders you should overwrite)

IngredientAmountUnit priceLine cost
Flour240 g$1.20/kg$0.29
Sugar200 g$1.50/kg$0.30
Butter227 g$8.00/kg$1.82
Eggs3$0.40 each$1.20
Total / 12 slices$3.60 · $0.30/slice

[1]

[1]

Your receipt beats a national average, but averages exist

The Bureau of Labor Statistics publishes monthly average retail prices for a basket of foods, including white all-purpose flour per pound. In the July 2026 U.S. city-average table, flour was $0.543 per pound. That is $0.543 ÷ 0.4536 ≈ $1.20 per kilogram, which is why the flour default sits at 1.2. Eggs, butter, and sugar move month to month and by city. Use BLS to sanity-check a wild default, then type the number from the bag in your pantry.

Store brands, warehouse clubs, and a sale butter will beat the city average. A European-style high-fat butter will lose. The calculator does not know which one you bought until you say so.

[3]

Grams first, cups second

USDA FoodData Central stores nutrients per 100 g and, when the data type includes them, household measures with gram weights. A cup of flour and a cup of sugar do not weigh the same. If you only have volume, convert with a density you trust, then paste grams into this form. The cost math never sees “cups.” It sees grams and kilograms.

A large egg in survey data is often near 50 g edible weight, but you are not paying by that gram figure here. You are paying by the egg. Extra-large and jumbo cartons cost more per egg and put more mass in the batter. If the recipe is written for large eggs, keep the count and the carton price aligned with large eggs.

FoodData Central’s documentation reminds users that household weights belong to a data type. Foundation Foods often list 100 g values without a cup weight. SR Legacy and FNDDS are where many cup-to-gram lines live. If two databases disagree by 10 g on a cup of flour, pick one, weigh once, and reuse that gram number in this cost form.

[2]

Servings, waste, and frosting that is not in the total

Per slice falls when you cut more pieces from the same batter. That does not make the cake cheaper. It makes each plate smaller. A 9-inch round cut into 16 thin wedges shows $0.23 on the default total and still used $3.60 of food. Birthday kids notice the wedge size, not the spreadsheet.

Buttercream for a two-layer cake can cost more than this entire batter. Fruit filling follows the fruit price, which BLS also tracks in other rows. If you need a party number that includes icing, run this tool for the crumb, then add a second pad line by hand. Do not call the $3.60 a catering bid.

Same $3.61 default batter at different slice counts

SlicesCost per sliceWhat changed
8$0.45Thicker party wedges
12 (default)$0.30Typical layer-cake count
16$0.23Thinner wedges, same food cost
24 cupcakes from one batch$0.15Only if the batter actually fills 24 cups

Raw batter is not a tasting cup

Flour is a raw agricultural ingredient. FDA has warned that raw dough and batter can carry bacteria, including E. coli in flour and Salmonella in eggs. Do not let kids eat the bowl scrapings from this batter. Bake the cake. FoodSafety.gov: cook foods that contain eggs thoroughly; egg dishes belong at 160 °F. A cake is done when the structure sets and a thermometer or tested bake time says so, not when the batter “tastes sweet enough.”

Leftover frosted cake on a warm buffet follows the 2-hour / 1-hour leftover clock if it holds perishable filling or dairy frosting. A plain butter cake left out overnight is a quality problem and, with perishable frosting, a safety problem.

[4][5][6]

What the dollar figure cannot do

Sales tax, warehouse membership, and the fraction of a vanilla bottle are ignored. A scale error of 20 g of butter is $0.16 at $8/kg, which is larger than a 20 g flour error at $1.20/kg. Weigh the expensive lines carefully.

The result is not a fair comparison with a bakery cake that includes labor, rent, liability insurance, and a buttercream rose. It is also not a nutrition label. Sugar grams here are a cost input. They are not an added-sugar Daily Value.

If a field is zero, that line drops out. A fatless sponge with no butter still needs an honest egg price. An egg-free oil cake needs a different tool, because oil is not one of the four terms.

Double the recipe by doubling every gram and the egg count, then keep servings honest. Two 9-inch layers from twice the batter at 24 thin slices still cost about $7.21 at the default prices, or $0.30 a slice. Baking one batch and freezing the second layer does not change ingredient cost. It only moves when you eat the food. Frozen leftover cake is a quality choice. Dairy frosting still belongs on the leftover clock once it is thawed and served.

If you bought butter for $4.50 a pound, unit price is 4.50 / 0.4536 ≈ $9.92/kg. Paste that, not the $8 default. The 227 g stick in many US boxes is half a pound. Two sticks in a richer cake is 454 g and about $4.50 at that receipt, which already exceeds the entire default batter. That is the floor doing its job: it shows where the money went before anyone prices a custom order.

A boxed mix is a different receipt. Enter the mix price as if it were flour only if you set the other fields to the extra eggs and oil the box demands. Do not also type the mix’s internal flour grams unless you are costing a scratch recipe. Mixed accounting double-counts.

[1][2][3][6]

How it works

Pantry prices are yours. Frosting, fruit, and electricity are omitted so the number stays an ingredient floor, not a bakery quote.

Frequently asked questions

  • Wholesale butter?

    Enter the unit price you actually paid. Store brands change the result more than rounding grams.

Related calculators

References

  1. NIST. SI Units - Mass
  2. USDA ARS. FoodData Central
  3. U.S. Bureau of Labor Statistics. Average Retail Food and Energy Prices, U.S. City Average
  4. FDA. What You Need to Know About Egg Safety
  5. FoodSafety.gov. 4 Steps to Food Safety
  6. USDA FSIS. Leftovers and Food Safety
  7. FDA. Enjoying Homemade Ice Cream without the Risk of Salmonella Infection
  8. USDA ARS. FoodData Central data documentation

Kitchen tools are estimates for home cooking. Nutrition tools are screening aids, not a diagnosis. They are not a substitute for a pediatrician or registered dietitian. Food-safety temperatures follow USDA FSIS. Do not reuse leftover meat brine.