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.
| ingredient | kind | g / cup | g / tbsp | g / tsp | g / mL |
|---|---|---|---|---|---|
| water | reference | 236.588 | 14.79 | 4.929 | 1.000 |
| milk | liquid | 244 | 15.25 | 5.083 | 1.031 |
| all purpose flour | flour | 120 | 7.50 | 2.500 | 0.507 |
| bread flour | flour | 127 | 7.94 | 2.646 | 0.537 |
| cake flour | flour | 114 | 7.12 | 2.375 | 0.482 |
| whole wheat flour | flour | 120 | 7.50 | 2.500 | 0.507 |
| granulated sugar | sugar | 200 | 12.50 | 4.167 | 0.845 |
| brown sugar | sugar | 220 | 13.75 | 4.583 | 0.930 |
| powdered sugar | sugar | 120 | 7.50 | 2.500 | 0.507 |
| butter | fat | 227 | 14.19 | 4.729 | 0.959 |
| vegetable oil | fat | 218 | 13.62 | 4.542 | 0.921 |
| honey | syrup | 340 | 21.25 | 7.083 | 1.437 |
| maple syrup | syrup | 322 | 20.12 | 6.708 | 1.361 |
| cocoa powder | dry | 85 | 5.31 | 1.771 | 0.359 |
| rolled oats | dry | 90 | 5.62 | 1.875 | 0.380 |
| white rice | dry | 185 | 11.56 | 3.854 | 0.782 |
| table salt | dry | 273 | 17.06 | 5.688 | 1.154 |
| baking powder | dry | 221 | 13.81 | 4.604 | 0.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 source | relative magnitude | why |
|---|---|---|
| cup definition (mL) | 1.0e-6 | rounding 236.5882365 to 236.588 |
| ounce definition (g) | 0 | 28.349523125 g is exact by definition |
| tbsp and tsp subdivision | 0 | defined as cup/16 and cup/48, not measured |
| float64 arithmetic | ~1e-16 | double-precision relative epsilon |
| which flour the table means | 0.114 | cake 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:
| flour | g / cup | 3 cups (g) | hydration |
|---|---|---|---|
| cake flour | 114 | 342.0 | 69.2% |
| all purpose flour | 120 | 360.0 | 65.7% |
| whole wheat flour | 120 | 360.0 | 65.7% |
| bread flour | 127 | 381.0 | 62.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:
| ingredient | cups | ×1.5 cups | exact g | rounded cups | rounded g | error |
|---|---|---|---|---|---|---|
| all purpose flour | 3 | 4.5 | 540.0 | 4.5 | 540.0 | +0.0% |
| granulated sugar | 1 | 1.5 | 300.0 | 1.5 | 300.0 | +0.0% |
| butter | 0.5 | 0.75 | 170.2 | 0.75 | 170.2 | +0.0% |
| milk | 1.25 | 1.875 | 457.5 | 2 | 488.0 | +6.7% |
| cocoa powder | 0.75 | 1.125 | 95.6 | 1 | 85.0 | -11.1% |
| baking powder | 0.03125 | 0.046875 | 10.4 | 0 | 0.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:
- 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.
- 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.
- 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.