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, 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 density of more than 80 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 to 0 dp gives 140 g
1 cup sugar in g gives 200 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 cup
density of milk gives 1.026 g/cm³

Answers show up to nine significant figures, as precise as the densities behind them, and cups show up to six decimal places. Round the longer ones to something you can measure:

calc
1 cup flour in g gives 140.296824 g
200 g flour in cups gives 1.425549 cup
200 g flour in cups to 2 dp gives 1.43 cup

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 densities. flour, all purpose flour and self rising flour each give a different weight for the same cup, so pick the closest match.
  • Some British names aren’t recognised. Use flour or all purpose flour for plain flour, powdered sugar for icing sugar and sugar for caster sugar.
  • 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.
  • A density is an average. How firmly you pack a cup changes the real weight, so treat the answers as a good guide rather than a lab measurement.

Ingredients Varlig knows

Group Ingredients
Flours and starches all purpose flour, chickpea flour, cornflour, cornmeal, cornstarch, flour, potato flour, rice flour, rye flour, self rising flour, semolina, wheat flour, whole wheat flour
Sugars, syrups, spreads brown sugar, 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, 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

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
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 and a flat as b or . Don’t use # for a sharp, because # starts a comment. Notes run from A0 (MIDI 21) to G9 (MIDI 127).

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 1800px
2.54 cm in px at 96 ppi gives 96px

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 16px
24 px in pt gives 18 pt
2 em in px gives 32px
1.5 rem in px gives 24px
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 and rad/s:

calc
1 rps in rpm gives 60 rpm
60 rpm in rad/s to 2 dp gives 6.28 rad/s

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 316 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.