{
  "id": "recipe-scaler",
  "version": "edf3f02b066c",
  "status": "published",
  "name": "Recipe Scaler",
  "question": "How do I scale my recipe?",
  "summary": "Scales every ingredient of a recipe from one number of servings to another, in exact fractions, with small cup amounts also in tablespoons and teaspoons.",
  "category": "food",
  "subcategory": "recipes",
  "url": "https://www.acalculator.org/food/recipe-scaler",
  "markdown": "https://www.acalculator.org/food/recipe-scaler.md",
  "kind": "function",
  "method": "Scale factor = servings you want ÷ servings the recipe makes; each new amount = amount × scale factor, in the same unit.",
  "assumptions": [
    "Every ingredient scales by the same factor. Baking times, pan sizes, and strong flavours such as salt and spices may need judgment when you scale a lot.",
    "Amounts keep their unit. A cup amount under 1/4 cup also shows in tablespoons (1 cup = 16 tbsp), and a tablespoon amount under 1 also shows in teaspoons (1 tbsp = 3 tsp), US customary.",
    "Amounts with a denominator up to 16 show as fractions; others show as a decimal with 2 places."
  ],
  "inputs": {
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "type": "object",
    "properties": {
      "from": {
        "title": "Recipe makes (servings)",
        "description": "How many servings the recipe makes as written.",
        "type": "number",
        "minimum": 0.1,
        "maximum": 10000
      },
      "to": {
        "title": "Servings you want",
        "description": "How many servings you want to make.",
        "type": "number",
        "minimum": 0.1,
        "maximum": 10000
      },
      "items": {
        "title": "Ingredients",
        "description": "One row per ingredient: the amount as written, its unit, and its name.",
        "type": "array",
        "items": {
          "type": "object",
          "properties": {
            "q": {
              "title": "Amount",
              "description": "The amount as the recipe writes it: 2, 0.5, 3/4 or 1 1/2.",
              "type": "string",
              "maxLength": 20
            },
            "u": {
              "title": "Unit",
              "description": "The unit of the amount, or whole for a count such as 2 eggs.",
              "type": "string",
              "enum": [
                "cup",
                "tbsp",
                "tsp",
                "floz",
                "oz",
                "lb",
                "g",
                "kg",
                "ml",
                "l",
                "whole"
              ]
            },
            "n": {
              "title": "Ingredient (optional)",
              "description": "The ingredient’s name, shown in the scaled list.",
              "type": "string",
              "maxLength": 60
            }
          }
        }
      }
    }
  },
  "outputs": {
    "factor": {
      "label": "Scale factor",
      "description": "Servings you want ÷ servings the recipe makes, as an exact fraction in lowest terms.",
      "format": "text"
    },
    "decimal": {
      "label": "Scale factor (decimal)",
      "description": "The scale factor as a decimal.",
      "format": "number"
    },
    "scaled": {
      "label": "Scaled ingredients",
      "description": "Each amount × the scale factor, with its unit and name.",
      "format": "text"
    }
  },
  "defaultAnswer": {
    "inputs": {
      "from": 4,
      "to": 6,
      "items": [
        {
          "amount": "2 1/4",
          "unit": "cup",
          "name": "flour"
        },
        {
          "amount": "1",
          "unit": "tsp",
          "name": "baking soda"
        },
        {
          "amount": "3/4",
          "unit": "cup",
          "name": "sugar"
        },
        {
          "amount": "1/2",
          "unit": "cup",
          "name": "butter"
        },
        {
          "amount": "2",
          "unit": "whole",
          "name": "eggs"
        }
      ]
    },
    "outputs": {
      "factor": "1 1/2",
      "decimal": 1.5,
      "scaled": "3 3/8 cups flour; 1 1/2 tsp baking soda; 1 1/8 cups sugar; 3/4 cup butter; 3 eggs"
    },
    "text": "Multiply each amount by 1 1/2 for 6 servings."
  },
  "examples": [
    {
      "given": {
        "from": 4,
        "to": 6,
        "items": [
          {
            "amount": "2 1/4",
            "unit": "cup",
            "name": "flour"
          },
          {
            "amount": "1",
            "unit": "tsp",
            "name": "baking soda"
          },
          {
            "amount": "3/4",
            "unit": "cup",
            "name": "sugar"
          },
          {
            "amount": "1/2",
            "unit": "cup",
            "name": "butter"
          },
          {
            "amount": "2",
            "unit": "whole",
            "name": "eggs"
          }
        ]
      },
      "expect": {
        "decimal": 1.5,
        "scaled": "3 3/8 cups flour; 1 1/2 tsp baking soda; 1 1/8 cups sugar; 3/4 cup butter; 3 eggs"
      },
      "source": "hand calculation in content.mdx: 9/4 × 3/2 = 27/8 = 3 3/8; NIST Handbook 44 (2026), Appendix C, General Tables of Units of Measurement (1 cup = 8 fl oz; 1 tablespoon = 1/2 fl oz; 1 teaspoon = 1/6 fl oz), https://www.nist.gov/document/2026-nist-handbook-44-appendix-c"
    },
    {
      "given": {
        "from": 12,
        "to": 3,
        "items": [
          {
            "amount": "1/2",
            "unit": "cup",
            "name": "milk"
          },
          {
            "amount": "1",
            "unit": "tbsp",
            "name": "oil"
          },
          {
            "amount": "250",
            "unit": "g",
            "name": "flour"
          }
        ]
      },
      "expect": {
        "decimal": 0.25,
        "scaled": "1/8 cup milk (2 tbsp); 1/4 tbsp oil (3/4 tsp); 62 1/2 g flour"
      },
      "source": "hand calculation in content.mdx: 1/2 × 1/4 = 1/8 cup = 2 tbsp (1 cup = 16 tbsp); 1/4 tbsp = 3/4 tsp; NIST Handbook 44 (2026), Appendix C, General Tables of Units of Measurement (1 cup = 8 fl oz; 1 tablespoon = 1/2 fl oz; 1 teaspoon = 1/6 fl oz), https://www.nist.gov/document/2026-nist-handbook-44-appendix-c"
    },
    {
      "given": {
        "from": 6,
        "to": 7,
        "items": [
          {
            "amount": "1",
            "unit": "cup",
            "name": "rice"
          },
          {
            "amount": "0.5",
            "unit": "l",
            "name": "stock"
          }
        ]
      },
      "expect": {
        "decimal": 1.1666666666666667,
        "scaled": "1 1/6 cups rice; 7/12 L stock"
      },
      "source": "hand calculation in content.mdx: 1 × 7/6 = 1 1/6; 1/2 × 7/6 = 7/12; USDA FoodData Central (household measures: cup, tablespoon, teaspoon portions of foods), https://fdc.nal.usda.gov/"
    },
    {
      "given": {
        "from": 3,
        "to": 10,
        "items": [
          {
            "amount": "1",
            "unit": "tsp",
            "name": "salt"
          }
        ]
      },
      "expect": {
        "scaled": "3 1/3 tsp salt"
      },
      "source": "hand calculation in content.mdx: 1 × 10/3 = 3 1/3; NIST Handbook 44 (2026), Appendix C, General Tables of Units of Measurement (1 cup = 8 fl oz; 1 tablespoon = 1/2 fl oz; 1 teaspoon = 1/6 fl oz), https://www.nist.gov/document/2026-nist-handbook-44-appendix-c"
    },
    {
      "given": {
        "from": 20,
        "to": 3,
        "items": [
          {
            "amount": "1",
            "unit": "cup",
            "name": "water"
          }
        ]
      },
      "expect": {
        "scaled": "about 0.15 cup water (2 2/5 tbsp)"
      },
      "source": "hand calculation in content.mdx: 1 × 3/20 = 0.15 cup; × 16 = 12/5 = 2 2/5 tbsp; NIST Handbook 44 (2026), Appendix C, General Tables of Units of Measurement (1 cup = 8 fl oz; 1 tablespoon = 1/2 fl oz; 1 teaspoon = 1/6 fl oz), https://www.nist.gov/document/2026-nist-handbook-44-appendix-c"
    }
  ],
  "sources": [
    "NIST Handbook 44 (2026), Appendix C, General Tables of Units of Measurement (US customary: 1 cup = 8 fluid ounces, 1 tablespoon = 1/2 fluid ounce, 1 teaspoon = 1/6 fluid ounce). https://www.nist.gov/document/2026-nist-handbook-44-appendix-c (retrieved 2026-10-01)",
    "USDA FoodData Central (foods listed with household measures in cups, tablespoons and teaspoons). https://fdc.nal.usda.gov/ (retrieved 2026-10-02)"
  ],
  "related": [
    "recipe-calorie",
    "food-calorie"
  ],
  "changelog": []
}
