The easiest way to learn is to draw it out in dimensional analysis every time until you grasp it intuitively. That way, you see exactly how the units line up (insert sophomoric sniggering here) each time.
For example:
Code:
2.54 cm 10 mm 25.4 mm
--------- x ------- = --------
inch cm inch