Metric vs imperial lengths, MB vs MiB, and °C/°F conversions

Published: 2026-09-05

How length and mass convert between metric and imperial, why MB and MiB differ by powers of 1000 vs 1024, and the °C/°F/K formulas—without mixing storage prefixes or CSS units.

Unit mix-ups are common in specs, tickets, and support chats: “Is that 5 feet or 5 meters?”, “Does this cloud disk quote mean gigabytes or gibibytes?”, “Is 72 the room temperature in °F or a fever in °C?” The math is fixed; the hard part is naming the right scale and prefix.

This guide covers the conversions developers and product folks hit most often—length, mass, temperature, and data size—plus the classic MB vs MiB trap. For live results in the browser (no upload), use the Unit Converter.

Four categories, one workflow

Category Typical “from → to” Intermediate / base
Length m ↔ ft, km ↔ mi Meter
Mass kg ↔ lb, g ↔ oz Kilogram
Temperature °C ↔ °F ↔ K Celsius (affine, not a simple ratio)
Data size MB ↔ MiB, GB ↔ GiB Byte (decimal ×1000ⁿ vs binary ×1024ⁿ)

LocalTools’ Unit Converter uses standard factors for length and mass, Celsius as the temperature pivot, and 1000 vs 1024 for decimal vs binary data prefixes. Values stay on your device—see Why “local only” matters for developer tools.

This is physical and storage units, not CSS px/rem/vh. For layout units and fluid type, use the CSS Unit Converter and CSS clamp() and fluid type.

Length: metric vs imperial

Metric length is decimal powers of the meter. Imperial units used in software (inch, foot, yard, statute mile) are defined in terms of the meter today, so conversion factors are exact constants—not approximate folklore.

Useful anchors:

From To Factor (approx / exact)
1 inch meters exactly 0.0254 m
1 foot meters exactly 0.3048 m (12 × 0.0254)
1 yard meters exactly 0.9144 m
1 mile meters exactly 1609.344 m
1 nautical mile meters exactly 1852 m (international)

Example: 6 ft → meters

  • 6 × 0.3048 = 1.8288 m

Example: 5 km → miles

  • 5000 ÷ 1609.3443.107 mi

Pitfalls

  • Nautical vs statute mile. Aviation and marine docs use nmi (1852 m); road distance uses statute mi (1609.344 m). Do not swap them.
  • Rounding for UI. Keep full precision while converting; round only when you display (e.g. “1.83 m” for a product card).
  • Tiny lengths. Camera sensors and chip docs often use µm or nm; convert to meters first if you chain factors by hand.

Mass: kilograms, pounds, and “tons”

Mass (often labeled “weight” in UIs) pivots on the kilogram. Avoirdupois units common in US/UK copy:

Unit Kilograms (exact definition used widely)
1 ounce (oz) 0.028349523125 kg
1 pound (lb) 0.45359237 kg
1 stone (st) 6.35029318 kg (14 lb)
1 US short ton 907.18474 kg (2000 lb)
1 UK long ton 1016.0469088 kg (2240 lb)
1 metric ton (t) 1000 kg

Example: 150 lb → kg → 150 × 0.4535923768.04 kg.

Pitfall: “Ton” without a qualifier is ambiguous (short, long, or metric). Prefer t, US ton, or UK ton in tickets and APIs.

Temperature: °C, °F, and Kelvin

Temperature is not a linear scale through zero the way meters and feet are. Absolute zero and freezing points sit at different numbers, so you use affine formulas (or convert via Celsius).

°F = (°C × 9/5) + 32
°C = (°F − 32) × 5/9
K  = °C + 273.15
°C = K − 273.15

Example: 25 °C → °F → (25 × 9/5) + 32 = 77 °F

Example: 98.6 °F → °C → (98.6 − 32) × 5/9 = 37 °C

Pitfalls

  • Do not multiply by 9/5 alone when going °C → °F; you must add 32.
  • Kelvin is absolute. Never write “degrees Kelvin” in scientific copy—unit symbol is K. Relative differences are the same size as °C (Δ1 K = Δ1 °C).
  • Negative values are normal for °C and °F outdoors; Kelvin must stay ≥ 0 for physical temperatures.

Data size: MB vs MiB (and friends)

Disk vendors, cloud billing, and operating systems disagree on prefixes. Two systems coexist:

Prefix style Multiplier Examples Common in
SI decimal 1000ⁿ KB, MB, GB, TB, PB Marketing drive sizes, many network rates
IEC binary 1024ⁿ KiB, MiB, GiB, TiB, PiB RAM, many OS “file size” UIs, precise specs

Definitions used by the Unit Converter (base = byte):

1 KB  = 1000 B          1 KiB = 1024 B
1 MB  = 1000² B         1 MiB = 1024² B
1 GB  = 1000³ B         1 GiB = 1024³ B
…
1 bit = 1/8 byte

Example: How many MiB is 1 decimal MB?

  • 1_000_000 ÷ 1_048_5760.9537 MiB

So a “500 GB” drive (decimal) is about 500 × (1000³ / 1024³)465.7 GiB—the classic “why is my new disk smaller?” gap.

Pitfalls

  • Label honesty. If a doc says “MB” but means 1024², say MiB (or state “MB = 1024²” explicitly). Ambiguous “MB” causes billing and capacity bugs.
  • Bits vs bytes. Network throughput is often bits per second (Mbps); file sizes are usually bytes. Off-by-eight errors are common.
  • Not radix conversion. Turning 0xFF into decimal is integer base conversion—see Converting integers between binary, octal, decimal, and custom bases—not the same as MB ↔ MiB.

A practical workflow

  1. Name the category (length, mass, temperature, or data). Mixing categories is the usual source of nonsense results.
  2. Pick exact unit ids (ft vs nmi, MB vs MiB, US ton vs t).
  3. Convert in the Unit Converter; copy the highlighted pair or any row from the full table.
  4. Round only for display; keep the assumption (“decimal GB”) in the ticket if someone will re-check later.

For percent deltas on quantities you already converted (e.g. “capacity grew 12%”), use the Percentage Calculator—see Percent change, ratios, and tip/tax math without spreadsheets.

Related tools and reading

All learn articles