Multiply leading ingredient amounts by the ratio between desired and original servings.
The frame below runs the same code as this page, in the reader's own browser. Nothing is sent to us, and nothing is sent to you.
Pick a dark background and the text and panels follow it, so the frame stays readable on a dark page.
Desired servings ÷ original servings forms one factor applied to a leading integer, decimal, fraction, or mixed fraction on each line. Results are rounded to at most three decimals, while units and ingredient wording remain untouched.
Ingredients: ["200g flour","1 1/2 cups milk","3 eggs"] From: 4 To: 8
400g flour 3 cups milk 6 eggs
Family dinners double from four to eight servings, cakes halve ingredient weights, and catering batches use non-integer serving ratios.