DEV Community

Lucian (LKB)
Lucian (LKB)

Posted on • Originally published at lkforge.com

A cup is not a cup: 9 baking staples, one volume, a 2.66x weight spread

A recipe says "1 cup of flour." My kitchen scale and yours will disagree about what that weighs — because a cup measures volume, and ingredients don't share a density.

I was building a cooking-unit converter and had to bake in real grams-per-cup densities. The moment they were sitting in one table, the spread jumped out.

The data

Grams per US cup — the King Arthur Ingredient Weight Chart the converter ships (water is defined by volume, 1 cup = 236.588 mL ≈ 236.588 g):

const gramsPerCup = {
  'Water':             236.588,
  'Butter':            227,
  'Milk':              227,
  'Brown sugar':       213,   // packed
  'Granulated sugar':  198,
  'Rice (dry)':        198,
  'All-purpose flour': 120,
  'Powdered sugar':    113,
  'Oats':              89,
};
Enter fullscreen mode Exit fullscreen mode

The findings — all just arithmetic

const vals = Object.values(gramsPerCup);

const spread = Math.max(...vals) / Math.min(...vals);
console.log(spread.toFixed(2));                 // 2.66  (water 237 g vs oats 89 g)

console.log((198 / 120 - 1) * 100);             // 65  — sugar vs flour
console.log(((198 / 113 - 1) * 100).toFixed(0)); // 75  — granulated vs powdered sugar
Enter fullscreen mode Exit fullscreen mode
  • 2.66× between the heaviest cup (water, ~237 g) and the lightest (oats, 89 g).
  • A cup of granulated sugar is ~65% heavier than a cup of flour — identical volume.
  • Granulated vs powdered sugar: ~75% apart, and both are just labelled "sugar."

So "1 cup" can mean anywhere from 89 g to 237 g depending on what's in it. And that's before human error: scoop flour straight from the bag and you pack it — a "cup" can hit 150 g+, a 25% overshoot before you've done anything wrong.

Why this matters for code, not just baking

Any app that converts recipe units has to carry per-ingredient density or it's silently wrong. Volume→weight isn't one constant; it's a lookup table. (16 tbsp = 1 cup, so grams-per-tablespoon is just grams-per-cup ÷ 16 — no separate data needed.)

Full ranked table + chart: A Cup Is Not a Cup →

Every gram figure is the King Arthur chart the converter ships, and each claim above is reproducible with the snippet.

Top comments (0)