Method Deck / units

Area conversion

Converts an area between metric and US customary units using exact square-meter equivalents.

Published for review. The Founder is checking every card himself; anything he strikes comes down the same hour.

Try it

Inputs

Outputs

Steps

  1. Look up the exact square-meter equivalent of from_unit and of to_unit.
  2. Convert the input to square meters: sqm = value * m2_per(from_unit).
  3. Convert square meters to the target unit: result = sqm / m2_per(to_unit).
  4. Round result to 6 significant figures.

Constants

Sources

Worked example and test vectors

NameInputsAnswer
worked example{"value":1,"from_unit":"acre","to_unit":"m2"}4,046.86 m2
test vector: square kilometers to hectares{"value":1,"from_unit":"km2","to_unit":"ha"}100.000 ha
test vector: square miles to acres{"value":1,"from_unit":"mi2","to_unit":"acre"}640.000 acre

Published card