Skip to content
Tutorials Center
My learning

Topics

Lesson 34 of 39 · Estimation, Units and Money

Units and Conversions

Convert between metric units of length, mass, capacity and time, handle square and cubic units, and move between metric and US customary with exact factors.

A measurement is a number and a unit. "5" means nothing, but "5 meters" does. Different units measure the same thing at different scales: you measure a pencil in centimeters, a road in kilometers. Converting between units means rewriting a measurement in another unit without changing its size.

Most of the world uses the metric system (SI), where units are linked by powers of 10, which makes conversions easy. The US also uses US customary units like inches and pounds.

Metric prefixes

Metric units share a pattern: a prefix in front of a base unit multiplies it by a power of 10.

Prefix Symbol Factor Example
kilo k 10³ = 1,000 1 km = 1,000 m
hecto h 10² = 100 (rare)
deci d 10⁻¹ (rare)
centi c 10⁻² = 0.01 1 cm = 0.01 m
milli m 10⁻³ = 0.001 1 mm = 0.001 m
micro µ 10⁻⁶ 1 µm = 0.000001 m

So the common length conversions are:

Text
1 km = 1,000 m      1 m = 100 cm      1 cm = 10 mm      1 m = 1,000 mm

Mass: 1 kg = 1,000 g, 1 g = 1,000 mg, and 1 tonne = 1,000 kg. Capacity: 1 L = 1,000 mL. Time: 1 h = 60 min = 3,600 s (not metric, base 60).

The conversion method

To go to a smaller unit, multiply. To go to a bigger unit, divide. There are more small units in the same quantity.

  • 3.2 km to meters: meters are smaller, so multiply: 3.2 × 1,000 = 3,200 m.
  • 450 cm to meters: meters are bigger, so divide: 450 ÷ 100 = 4.5 m.
  • 0.75 L to mL: 0.75 × 1,000 = 750 mL.

For other units use a conversion factor, a fraction equal to 1 such as 1000 m / 1 km. Multiply by it so the unwanted unit cancels.

Python A metric converter

Press Run (or Ctrl + Enter) to see the result here.

Program input · what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

The dictionary stores how many base units (meters or grams) each unit is worth, and convert divides one factor by the other. Tiny floating-point errors may show up with decimals such as 0.01.

Area and volume: square the factor

Length conversions are not enough for area and volume. Since 1 m = 100 cm:

Text
1 m² = (100 cm)² = 100 × 100 cm² = 10,000 cm²
1 m³ = (100 cm)³ = 1,000,000 cm³

So a floor of 2.5 m² is 2.5 × 10,000 = 25,000 cm². A common error is using 100 instead of 10,000.

A neat link between volume and capacity: 1 L = 1,000 cm³, so 1 mL = 1 cm³. A tank of 0.5 m³ therefore holds 500 L: since 1 m³ = 1,000 L.

Squaring applies to the whole unit conversion. To convert km² to m², multiply by 1,000² = 1,000,000, not by 1,000.

Time and speed

Convert hours and minutes by multiplying or dividing by 60. 2.5 hours = 2.5 × 60 = 150 minutes. Be careful with decimal hours: 1.3 h is not 1 h 30 min, but 1 h + 0.3 × 60 = 1 h 18 min.

Metric and US customary

Exact definitions (agreed internationally):

Quantity Exact value
1 inch 2.54 cm
1 foot 0.3048 m
1 mile 1.609344 km
1 pound 0.45359237 kg

Other familiar conversions are rounded: 1 kg ≈ 2.2 lb, 1 gallon (US) ≈ 3.785 L.

Example. A 6-foot door in centimeters: 6 × 30.48 = 182.88 cm. A 5 km race in miles: 5 ÷ 1.609344 ≈ 3.11 miles.

Temperature is different, because the scales have different zero points: °F = °C × 9/5 + 32. So 100 °C = 212 °F, and 0 °C = 32 °F.

Python Metric and customary conversions

Press Run (or Ctrl + Enter) to see the result here.

Program input · what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

Fractions keep the exact definitions. The temperature list shows that -40 is the same in both scales. The last line squares the factor 100 for area.

Handy checks

  • Is the answer sensible? A person is not 1.7 km tall.
  • Did you convert to the same unit before comparing or adding?
  • For area and volume, did you square or cube the factor?

Check your understanding

Quick check · 4 questions

of 4 answered You scored / 4 · perfect!

  1. 1. How many millimeters are in 3.4 meters?

    1 m = 1,000 mm, so 3.4 × 1,000 = 3,400 mm.
  2. 2. Convert 4 m² to cm².

    1 m² = 10,000 cm², so 4 m² = 40,000 cm².
  3. 3. A bottle holds 1.5 L. How many mL is that?

    1 L = 1,000 mL, so 1.5 × 1,000 = 1,500 mL.
  4. 4. A 10 km run is about how many miles? (1 mile = 1.609 km)

    10 ÷ 1.609 ≈ 6.2 miles. Miles are the bigger unit, so the number gets smaller.

Summary

  • Metric units differ by powers of 10; know kilo, centi, milli and micro.
  • Multiply to go to a smaller unit, divide to go to a bigger one.
  • For area square the length factor; for volume cube it. 1 mL = 1 cm³ and 1 L = 1,000 cm³.
  • Key exact values: 1 in = 2.54 cm, 1 mile = 1.609344 km, 1 lb = 0.45359237 kg.
  • Always check that an answer has a sensible size.

Next: Money and Best Buys