When measuring the length of a pencil, centimeters are used rather than millimeters because a pencil is more than a centimeter long. Millimeters are used when measuring lengths that are less than a centimeter, such as a pencil's width.
When measuring the length of a pencil using centimeters, it is likely that the result won't be a whole number. For example, a pencil can be 18 centimeters and 9 millimeters long. For instances such as this, instead of using both units to express the length of the pencil, the excess length in millimeters can simply be converted to centimeters and added to the value in centimeters. This means 9 millimeters can be converted to .9 centimeters, and adding it to 18 centimeters results in a total length of 18.9 centimeters.
Choosing the appropriate unit of measure is important because using the wrong unit can result in a number that is either too large or too small, which makes it difficult to estimate a quantity's magnitude.