Skip to content
Varlig Guide
Varlig home

Cooking, sound, screens and mechanics

Some everyday questions need more than a unit conversion. Turning a cup of flour into grams depends on the flour, a note name needs a tuning standard, and a print size depends on the image’s pixel density. This page covers the conversions Varlig has built in for these cases: ingredient weights and volumes, kitchen measures and gas marks, musical pitch and tempo, screen and print resolution, engine torque and wheel speed, and the time you save by speeding up a video or podcast.

For ordinary unit conversions, see Units and conversions first.

Ingredient weight and volume

Recipes from different countries measure the same ingredient in cups, spoons, grams or millilitres. Varlig knows the typical weight of around ninety ingredients, so it can convert between weight and volume. Write the amount, the ingredient’s name, then in and the unit you want:

calc
1 cup flour in g gives 125 g
1 cup sugar in g gives 200 g
1 cup icing sugar in g gives 120 g
250 ml milk in g gives 256.5 g
100 g butter in tbsp to 0 dp gives 7 tbsp
2 tbsp olive oil in g gives 27 g
150 g honey in ml to 0 dp gives 105 mL
500 g sugar in cups gives 2.5 cups
7 g instant yeast in tsp gives 2.25 tsp
density of milk gives 1.026 g/cm³

Baking staples follow the spooned-cup weights in the USDA and King Arthur charts, so a cup of plain, bread or strong white flour is 125 g, icing sugar 120 g and rolled oats 89 g, and a 7 g sachet of yeast is the 2¼ teaspoons printed on the packet. Other ingredients come from their density, which gives a longer answer: up to nine significant figures, as precise as the density behind it, and six decimal places for cups. Round those to something you can measure:

calc
250 g butter in cups gives 1.101322 cups
250 g butter in cups to 2 dp gives 1.1 cups
1 cup milk in g gives 242.739531 g
1000 g strong white flour in cups gives 8 cups

Things to keep in mind:

  • cup, tbsp and tsp are US measures: a cup is about 237 mL. For a 250 mL cup, as used in Australian and some British recipes, write metric cup, as in 1 metric cup flour in g.
  • Similar ingredients have different weights. A cup of cake flour is 114 g, spelt 99 g and rye 106 g against the 125 g of plain flour, so pick the closest match.
  • British names work: plain flour, strong or strong white flour, wholemeal flour, self raising flour, icing sugar, caster sugar, porridge oats and dried or fast action yeast all find the right ingredient.
  • An ingredient Varlig doesn’t know shows an error rather than a guess, and names it: 1 cup rice in g says rice has no density to convert between volume and mass, so write white rice or brown rice.
  • Ingredient names can be written in any letter case, but unit symbols are case-sensitive.
  • If you define a name that matches an ingredient, such as flour = 500 g, your name takes over and 1 cup flour stops working. Choose names like flour weight instead.
  • Cup and pint answers count in the plural, so you’ll see 2.5 cups and 1 cup.
  • A cup weight is an average. How firmly you pack the cup changes what it really weighs, so treat the answers as a good guide rather than a lab measurement.

Ingredients Varlig knows

Group Ingredients
Flours and starches all purpose flour, bread flour, cake flour, chickpea flour, cornflour, cornmeal, cornstarch, flour, potato flour, rice flour, rye flour, self rising flour, semolina, spelt flour, wheat flour, whole wheat flour
Sugars, syrups, spreads brown sugar, chocolate chips, corn syrup, honey, light brown sugar, maple syrup, molasses, nutella, powdered sugar, sugar
Fats and oils almond oil, butter, canola oil, coconut oil, corn oil, grapeseed oil, lard, margarine, olive oil, palm oil, peanut oil, vegetable oil
Dairy and eggs buttermilk, condensed milk, cream cheese, egg white, egg yolk, evaporated milk, heavy cream, milk, ricotta, sour cream, soy milk, whole milk, yogurt (or yoghurt)
Grains and pulses amaranth, brown rice, buckwheat, chickpeas, kidney beans, lentils, oats, quinoa, white rice
Nuts and fruit almond butter, almonds, blueberries, ground almonds, peanut butter, peanuts, pecans, pine nuts, pistachios
Juices, wine and water apple juice, lemon juice, lime juice, orange juice, red wine, water, white wine
Baking and store cupboard applesauce, baking powder, baking soda, cocoa powder, mustard, salt, table salt, tomato paste, tomato sauce, vanilla extract, yeast

British and shop names find the same ingredients, so you can copy a recipe as it’s written:

Written in the recipe Counts as
plain flour all purpose flour
strong flour, strong white flour bread flour
wholemeal flour, wholewheat flour, strong wholemeal flour whole wheat flour
self raising flour self rising flour
caster, castor, granulated, superfine, white sugar sugar
icing sugar, confectioners sugar powdered sugar
packed brown sugar brown sugar
rolled oats, porridge oats oats
instant, active dry, dried, dry, fast action (dried) yeast yeast
salted butter, unsalted butter butter
double cream, whipping cream heavy cream

Names are case-insensitive, and a hyphen can join their words, so all-purpose flour and self-raising flour both work.

Kitchen measures and oven settings

American recipes measure butter in sticks, British ones use dessertspoons, pints and gas marks. Varlig converts all of them:

calc
1 stick of butter in g gives 113 g
2 dessertspoons in ml gives 20 mL
1 UK pint in ml gives 568.26125 mL
10 UK fl oz in ml gives 284.130625 mL
gas mark 6 gives 200 °C
gas mark 6 in °F gives 400 °F
350 °F in °C to 0 dp gives 177 °C

A stick of butter is 113 g and a dessertspoon is 10 mL. pint on its own is the smaller US pint and fl oz the US fluid ounce, so write UK pint or UK fl oz for a British recipe; see UK and US measures. Gas marks follow the UK oven table, from gas mark ¼ (110 °C) to gas mark 9 (240 °C), and in °F gives the table’s Fahrenheit setting.

Musical pitch and frequency

Varlig converts between note names, frequencies and MIDI note numbers, using standard tuning where A4 is 440 Hz. Middle C is C4.

calc
A4 to Hz gives 440 Hz
C4 in Hz to 2 dp gives 261.63 Hz
E2 in Hz to 2 dp gives 82.41 Hz
C♯4 in Hz to 2 dp gives 277.18 Hz
F#4 in Hz to 2 dp gives 369.99 Hz
Bb3 in Hz to 2 dp gives 233.08 Hz
E♭4 in Hz to 2 dp gives 311.13 Hz

Going the other way, a frequency gives the nearest note, so a slightly sharp A still reads as A4. MIDI note numbers convert in both directions:

calc
440 Hz to pitch gives A4
450 Hz to pitch gives A4
A4 to midi gives 69
440 Hz to midi gives 69
60 as pitch gives C4

A note name is a letter, an optional sharp or flat, and an octave number. Write a sharp as ♯ or # and a flat as b or ♭. A # between the letter and the octave is the sharp, as in F#4 and C#5; anywhere else it still starts a comment. Notes run from A0 (MIDI 21) to G9 (MIDI 127). A name you’ve defined wins over a note name, so if your note already gives A4 a value of its own, that value is what you get.

Tempo and beats

Beats per minute are a frequency, so a tempo converts and multiplies like one. The familiar delay-time sum works as written: a minute over the tempo is the length of one beat, in seconds if you start from 60 and in milliseconds from 60000.

calc
120 bpm in Hz gives 2 Hz
60 / 120 bpm gives 0.5 s
60000 / 120 bpm gives 500 ms
140 bpm * 3 min gives 420 beats
1 / 50 Hz in ms gives 20 ms

Screen resolution and pixels

To find a display’s pixel density, give its diagonal size and resolution. The answer has many decimals, so round it:

calc
ppi of 27 inches at 2560 x 1440 gives 108.7855392633 PPI
round(ppi of 27 inches at 2560 x 1440) gives 109 PPI
(ppi of 6.1 inches at 2532 x 1170) to 0 dp gives 457 PPI

To convert between pixels and physical sizes, add at and a density in ppi or dpi (the two mean the same here). This is handy for checking how large a photo will print:

calc
3000 px in inches at 300 dpi gives 10 inches
6 inches in px at 300 dpi gives 1,800 px
3200 px in in at 240 ppi gives 13.3333333333 inches
420 mm in px at 300 dpi gives 4,961 px
2.54 cm in px at 96 ppi gives 96 px

A length converted to pixels comes out as a whole number of them, because half a pixel doesn’t exist. Pixel counts show with thousands separators and a space before px.

You can also do the print sum without at, by dividing. Pixels over a length give the density, pixels over a density give the size, a length over pixels gives the size of one pixel, and pixels times pixels count the pixels in the frame:

calc
6000 px / 40 in gives 150 PPI
6000 px / 300 dpi gives 20 inches
36 mm / 6000 px in µm gives 6 µm
6000 px * 4000 px gives 24,000,000 px
6000 px * 4000 px in MP gives 24 MP

Without a density, px, pt, em and rem use the CSS reference values: 96 pixels to the inch, 72 points to the inch and 16 pixels to the em. That suits web and app design work:

calc
12 pt in px gives 16 px
24 px in pt gives 18 pt
2 em in px gives 32 px
1.5 rem in px gives 24 px
1 px in mm to 2 dp gives 0.26 mm

Torque, power and wheel speed

An engine’s power is its torque multiplied by how fast it turns. Write the torque at a rotation speed to get the power in watts, and put the phrase in brackets before converting it to kW or hp:

calc
100 Nm at 3000 rpm gives 31,415.926535898 W
(250 Nm at 2000 rpm) in kW to 1 dp gives 52.4 kW
(300 Nm at 4000 rpm) in hp to 0 dp gives 169 hp
150 bhp in kW gives 111.855 kW
50 N·m in lb·ft to 1 dp gives 36.9 lbf·ft

hp and bhp are both 745.7 W, and torque converts between newton metres and pound-feet.

tyre_speed(width, aspect, rim, rotation) gives the road speed for a tyre size and wheel rotation speed. Take the numbers from the tyre’s sidewall: a 205/55 R16 tyre is 205 mm wide, has a 55% aspect ratio and fits a 16-inch rim.

calc
tyre_speed(205, 55, 16, 1000 rpm) in km/h to 0 dp gives 119 km/h
tyre_speed(205, 55, 16, 1000 rpm) in mph to 0 dp gives 74 mph

Rotation speeds convert between rpm, rps, rad/s and Hz, since they all count the same turns. Multiply a rotation speed by the distance covered in one turn and you get road speed, which is how a bike’s cadence and wheel size become km/h:

calc
1 rps in rpm gives 60 rpm
60 rpm in rad/s to 2 dp gives 6.28 rad/s
60 rpm in Hz gives 1 Hz
2.136 m * 90 rpm in km/h gives 11.5344 km/h

Mach is the speed of sound at sea level, 340.29 m/s. Write it before or after its number:

calc
Mach 1 in km/h gives 1,225.044 km/h
900 km/h in Mach to 2 dp gives 0.73 Mach

Time saved and speed factors

When you play a video, podcast or audiobook faster, it takes less time. Write the duration at a speed factor such as 1.5x to see how long it takes, or start with time saved to see the difference. After time saved, the factor can also be written as 1.5 or 150%:

calc
90 min at 1.5x gives 60 min
2 hours at 2x gives 1 hour
time saved 90 min at 1.5x gives 30 min
time saved 2 hours at 1.5 gives 40 min
time saved 2 hours at 150% gives 40 min

Without time saved, a percentage after at means a share of the amount, so 90 min at 150% is 135 min. Write the speed with an x to avoid surprises.

Some answers come out as a fraction of an hour. Put the phrase in brackets and convert it to read it more easily:

calc
2 hours at 1.5x gives 1.3333333333 hours
(2 hours at 1.5x) in hours and minutes gives 1 hour 20 min

Putting it together

Here’s a note for an American pancake recipe that serves 8, converted from cups and spoons to grams and millilitres and scaled up to make 12:

calc
# Pancakes: a US recipe for 8, scaled to make 12
scale = 12 / 8 gives 1.5
1.5 cups flour in g * scale to 0 dp gives 281 g
3.5 tsp baking powder in g * scale to 0 dp gives 25 g
1 tbsp sugar in g * scale to 0 dp gives 19 g
1.25 cups milk in mL * scale to 0 dp gives 444 mL
3 tbsp butter in g * scale to 0 dp gives 64 g

Each line converts the original amount first and then scales it, which is the order Varlig needs: 1.5 cups flour * scale in g doesn’t work, because the ingredient conversion has to come straight after the ingredient. Rounding to whole grams gives amounts you can weigh on a kitchen scale. To make 16 pancakes instead, change scale to 16 / 8.