Method Deck / cooking

Cups to grams for common ingredients

Converts a volume in US cups to a weight in grams for a small set of common cooking ingredients using cited density values.

Published for review. The Founder is checking every card himself; anything he strikes comes down the same hour.

Try it

Inputs

Outputs

Steps

  1. Look up the grams-per-cup density for the chosen ingredient from the cited table.
  2. grams = cups * grams_per_cup.
  3. Round the result to the nearest whole gram.

Constants

Sources

Worked example and test vectors

NameInputsAnswer
worked example{"ingredient":"all_purpose_flour","cups":2}240 g
test vector: water{"ingredient":"water","cups":1.5}355 g

Published card