Units of measurement
The definition, agreement and practical use of units of measurement have played a crucial role in human endeavour from early ages up to this day.  Disparate systems of measurement used to be very common.  Now there is a global standard, the International System (SI) of units, the modern form of the metric system.  The SI has been or is in the process of being adopted throughout the world. The United States of America is almost certainly the last to adopt the system but even there it is increasingly being used.
In trade, weights and measures are often a subject of governmental regulation, to ensure fairness and transparency.  The Bureau international des poids et mesures (BIPM) is tasked with ensuring worldwide uniformity of measurements and their traceability to the International System of Units (SI).  Metrology is the science for developing national and internationally accepted units of weights and measures.
In physics and metrology, units are standards for measurement of physical quantities that need clear definitions to be useful. Reproducibility of experimental results is central to the scientific method. A standard system of units facilitates this. Scientific systems of units are a refinement of the concept of weights and measures developed long ago for commercial purposes.
Science, medicine, and engineering often use larger and smaller units of measurement than those used in day to day life and talk about them more exactly.  The judicious selection of the units of measure can aid researchers in problem solving (see, for example dimensional analysis).

# History
A unit of measurement is a standardised quantity of a physical property, used as a factor to express occurring quantities of that property. Units of measurement were among the earliest tools invented by humans. Primitive societies needed rudimentary measures for many tasks: constructing dwellings of an appropriate size and shape, fashioning clothing, or bartering food or raw materials.
The earliest known uniform systems of weights and measures seem to have all been created sometime in the 4th and 3rd millennia BC among the ancient peoples of Mesopotamia, Egypt and the Indus Valley, and perhaps also Elam in Persia as well.
Many systems were based on the use of parts of the body and the natural surroundings as measuring instruments. Our present knowledge of early weights and measures comes from many sources.

# Systems of measurement
Prior to the global adoption of the metric system many different systems of measurement had been in use.  Many of these were related to some extent or other. Often they were based on the dimensions of the human body.  As a result, units of measure could vary not only from location to location, but from person to person.
A number of metric systems of units have evolved since the adoption of the original metric system in France in 1791. The current international standard metric system is the International system of units.  An important feature of modern systems is standardization.  Each unit has a universally recognized size.
Both the Imperial units and US customary units derive from earlier English units.  Imperial units were mostly used in the British Commonwealth and the former British Empire.  US customary units are still the main system of measurement in the United States despite Congress having legally authorized metric measures 28 July1866. However, some steps towards metrication have been made, particularly the redefinition of basic US units to exactly relate to SI units.
The above systems of units are based on arbitrary unit values, formalised as standards. Some unit values occur naturally in science. Systems of units based on these are called natural units.  Similar to natural units, atomic units (au) are a convenient system of units of measurement used in atomic physics.
Also a great number of strange and non-standard units may be encountered.  These may include: the ton of TNT, the Hiroshima atom bomb and the weight of an elephant.

# Base and derived units
Different systems of units are based on different choices of a set of fundamental units.
The most widely used system of units is the International System of Units, or SI.  There are seven SI base units. All other SI units can be derived from these base units.
For most quantities a unit is absolutely necessary to communicate values of that physical quantity. For example, conveying to someone a particular length without using some sort of unit is impossible, because a length cannot be described without a reference used to make sense of the value given.
But not all quantities require a unit of their own. Using physical laws, units of quantities can be expressed as combinations of units of other quantities. Thus only a small set of units is required. These units are taken as the base units. Other units are derived units. Derived units are a matter of convenience, as they can be expressed in terms of basic units. Which units are considered base units is a matter of choice.
The base units of SI are actually not the smallest set. Smaller sets have been defined. There are sets in which the electric and magnetic field have the same unit. This is based on physical laws that show that electric and magnetic field are actually different manifestations of the same phenomenon. In some fields of science such systems of units are highly favoured over the SI system.

# Calculations with units

## Units as dimensions
Any value of a physical quantity is expressed as a comparison to a unit of that quantity. For example, the value of a physical quantity Q is written as the product of a unit  and a numerical factor:
The multiplication sign is usually left out, just as it is left out between variables in scientific notation of formulas. In formulas the unit  can be treated as if it were a kind of physical dimension: see dimensional analysis for more on this treatment.
A distinction should be made between units and standards. A unit is fixed by its definition, and is independent of physical conditions such as temperature. By contrast, a standard is a physical realization of a unit, and realizes that unit only under certain physical conditions. For example, the metre is a unit, while a metal bar is a standard. One metre is the same length regardless of temperature, but a metal bar will be one metre long only at a certain temperature.

## Guidelines
- Treat units like variables. Only add like terms. When a unit is divided by itself, the division yields a unitless one. When two different units are multiplied, the result is a new unit, referred to by the combination of the units. For instance, in SI, the unit of speed is metres per second (m/s). See dimensional analysis. A unit can be multiplied by itself, creating a unit with an exponent (e.g. m2/s2).
- Some units have special names, however these should be treated like their equivalents. For example, one newton (N) is equivalent to one kgm/s2. This creates the possibility for units with multiple designations, for example: the unit for surface tension can be referred to as either N/m (newtons per metre) or kg/s2 (kilograms per second squared).

## Expressing a physical value in terms of another unit
Conversion of units involves comparison of different standard physical values, either of a single physical quantity or of a physical quantity and a combination of other physical quantities.
Starting with:
just replace the original unit _i with its meaning in terms of the desired unit _j, e.g. if _i = c_{ij} \times _j, then:
Now n_i and c_{ij} are both numerical values, so just calculate their product.
Or, which is just mathematically the same thing, multiply Q by unity, the product is still Q:
For example, you have an expression for a physical value Q involving the unit feet per second (_i) and you want it in terms of the unit miles per hour (_j):
- Find facts relating the original unit to the desired unit:
1 mile = 5280 feet and 1 hour = 3600 seconds
- Next use the above equations to construct a fraction that has a value of unity and that contains units such that, when it is multiplied with the original physical value, will cancel the original units:
1 = \frac{1\,\mathrm{mi}}{5280\,\mathrm{ft}}\quad \mathrm{and}\quad 1 = \frac{3600\,\mathrm{s}}{1\,\mathrm{h}}
- Last,multiply the original expression of the physical value by the fraction, called a conversion factor, to obtain the same physical value expressed in terms of a different unit. Note: since the conversion factors have a numerical value of unity, multiplying any physical value by them will not change that value.
 52.8\,\mathrm{ft/s} = 52.8\,\frac{\mathrm{ft}}{\mathrm{s}} \frac{1\,\mathrm{mi}}{5280\,\mathrm{ft}} \frac{3600\,\mathrm{s}}{1\,\mathrm{h}} = \frac {52.8 \times 3600}{5280}\,\mathrm{mi/h} = 36\,\mathrm{mi/h}
Or as an example using the metric system, you have a value of fuel economy in the unit litres per 100 kilometres and you want it in terms of the unit microlitres per metre:

# Real-world implications
One example of the importance of agreed units is the failure of the NASA Mars Climate Orbiter, which was accidentally destroyed on a mission to the planet Mars in September 1999 instead of entering orbit, due to miscommunications about the value of forces: different computer programs used different units of measurement (newton versus pound force). Enormous amounts of effort, time, and money were wasted.
On April 15 1999 Korean Air cargo flight 6316 from Shanghai to Seoul was lost due to the crew confusing tower instructions (in metres) and altimeter readings (in feet).  Three crew and five people on the ground were killed.  Thirty seven were injured.