The error budget of a cups-to-grams conversion

The arithmetic is exact to about one part in ten million. The table lookup is worth ten percent. Which of those you spend your attention on. 9 August 2026.

People who build unit converters tend to worry about the unit conversion. It is the part with formulas in it, so it feels like the part that can be wrong. In a recipe converter it is the part that is essentially incapable of being wrong, and the error that actually reaches the cook comes from somewhere else entirely. This note puts numbers on both halves and then shows what the larger half does to a real recipe.

The half that is exact

The US customary cup is exactly 236.5882365 mL, and that is a definition rather than a measurement. It follows in one line from four other definitions, none of which has an uncertainty attached:

international inch  = 2.54 cm            (exact, by international agreement 1959)
US gallon           = 231 in³            (exact, statutory)
US gallon           = 128 US fluid ounces (exact)
US cup              = 8 US fluid ounces   (exact)

cup = 231 * 2.54³ / 128 * 8 = 236.5882365 mL exactly

The avoirdupois ounce is likewise exactly 28.349523125 g, by definition of the international pound as 0.45359237 kg. Tablespoons and teaspoons in this system are not independently measured either — they are defined as the cup divided by 16 and by 48, so 1 tbsp = 14.7867 mL and 1 tsp = 4.9289 mL follow from the cup and nothing else.

A converter that stores the cup as 236.588 mL rather than the exact value is carrying a relative error of 1.0e-6. On a 3-cup quantity of flour that is a discrepancy of roughly 359.9 micrograms. Double-precision floating point contributes about 1e-16 per operation. Neither is detectable by any kitchen scale, or by any laboratory balance a kitchen is likely to contain.

The half that is not

Now the other input. To turn a volume into a mass you need a density, and for everything except water the “density” in a recipe table is not a physical constant. It is a claim about how much of a divided solid ends up in a cup when somebody fills one, which depends on how they fill it. Spooning flour into the cup and levelling it off gives one number; dipping the cup into the bag and sweeping gives a materially larger one. There is no fact of the matter to look up, only a convention to declare.

Here is the table used below, with the per-tablespoon and per-teaspoon masses derived from it and the bulk density in g/mL derived from the cup volume. Water is physics; every other row is a convention.

ingredientkindg / cupg / tbsp g / tspg / mL
waterreference236.58814.794.9291.000
milkliquid24415.255.0831.031
all purpose flourflour1207.502.5000.507
bread flourflour1277.942.6460.537
cake flourflour1147.122.3750.482
whole wheat flourflour1207.502.5000.507
granulated sugarsugar20012.504.1670.845
brown sugarsugar22013.754.5830.930
powdered sugarsugar1207.502.5000.507
butterfat22714.194.7290.959
vegetable oilfat21813.624.5420.921
honeysyrup34021.257.0831.437
maple syrupsyrup32220.126.7081.361
cocoa powderdry855.311.7710.359
rolled oatsdry905.621.8750.380
white ricedry18511.563.8540.782
table saltdry27317.065.6881.154
baking powderdry22113.814.6040.934

The four flours are the interesting rows, because a recipe that says 1 cup flour does not usually say which. Across cake flour at 114 g and bread flour at 127 g the same volume differs by 11.4%.

The budget, side by side

error sourcerelative magnitudewhy
cup definition (mL)1.0e-6rounding 236.5882365 to 236.588
ounce definition (g)028.349523125 g is exact by definition
tbsp and tsp subdivision0defined as cup/16 and cup/48, not measured
float64 arithmetic~1e-16double-precision relative epsilon
which flour the table means0.114cake 114 to bread 127 g/cup at the same volume

The last row is about 114,078 times larger than the largest of the others. Everything above it is noise. If you are building this kind of tool, that ratio is the whole design brief: the arithmetic deserves a unit test and then no further attention, and the table deserves an editorial policy, a stated convention, and a visible caveat.

What the 11% actually does: bread hydration

Bakers describe a dough by hydration — water mass as a percentage of flour mass. It is the single number that determines whether a dough is stiff, slack or soup, and bakers care about it at single-percentage-point resolution. It is also a ratio of two masses, so a recipe written in cups does not specify it.

Take a recipe reading 1 cup water, 3 cups flour. Water is 236.588 g per cup and that figure is physics. The flour is whichever row you chose:

flourg / cup3 cups (g)hydration
cake flour114342.069.2%
all purpose flour120360.065.7%
whole wheat flour120360.065.7%
bread flour127381.062.1%

The same written recipe yields hydrations spanning 7.1 percentage points, from 62.1% to 69.2%. In bread terms that is the distance between two different doughs — one you can shape by hand and one you cannot — and the recipe author communicated none of it, because the volume notation has nowhere to put it. Note the direction, too: the densest flour in the table — the one a bread recipe is most likely to mean — is the one that silently produces the driest dough from the same written quantities.

This is the real argument for gram-first recipes, and it is worth being precise about what the argument is. It is not that grams are more accurate than cups; a cup is exactly defined and a good scale is only marginally better than a good measuring cup at reproducing a volume. It is that mass specifies the thing the outcome depends on and volume does not. No amount of precision in the conversion recovers information the source notation never carried.

Second-order: what scaling adds

Converters also scale. Scaling in mass is closed — multiply and stop. Scaling in volume is not, because the cook has to land on a fraction they can measure. Here is a six-line recipe at 1.5×, resolved both as exact scaled mass and as the mass you get after rounding each scaled volume to the nearest quarter cup:

ingredientcups×1.5 cupsexact g rounded cupsrounded gerror
all purpose flour34.5540.04.5540.0+0.0%
granulated sugar11.5300.01.5300.0+0.0%
butter0.50.75170.20.75170.2+0.0%
milk1.251.875457.52488.0+6.7%
cocoa powder0.751.12595.6185.0-11.1%
baking powder0.031250.04687510.400.0-100.0%

Total exact 1574 g against 1583 g rounded, +0.6% on the batch — but the batch total is the wrong thing to look at. The per-line errors are what matter, and they are not distributed evenly: the large volumes round to almost nothing while the small ones absorb the whole error, because a quarter-cup step is a fixed absolute quantity and the lines are not the same size. Anything measured in teaspoons — baking powder at 4.604 g per teaspoon, salt at 5.688 g — cannot survive quarter-cup rounding at all, which is why scaled recipes keep leavening and salt in spoons rather than promoting them.

Three rules fall out of this, in the order they are worth implementing:

  1. Scale in mass, present in whatever the user asked for. Converting to mass, multiplying, and converting back keeps the rounding at the presentation layer where it is visible, instead of compounding it through the calculation.
  2. Round per line, against the measuring instrument. Quarter cups for volumes above a cup, tablespoons below that, and never round a teaspoon quantity to a cup fraction.
  3. Name the convention. A table that says flour: 120 g/cup without saying spooned and levelled has published a number and withheld the part that makes it reproducible.

The general shape

An error budget is worth writing down before optimising anything, because the intuition about which term dominates is usually wrong, and it is usually wrong in the same direction: the term you can compute attracts the attention, and the term you have to decide gets defaulted. Here the computable term is smaller than the decided term by five orders of magnitude. Adding a digit to the cup constant is free and does nothing. Choosing and disclosing a packing convention is a judgement call, cannot be automated, and is the entire accuracy of the product.

This is the reasoning I apply to the flour rows of the recipe converter I work on at ingredientcalculator.com, which is why those rows carry a stated convention rather than only a value.