There are 10^6, or one million, nanograms in a milligram. A milligram represents 1/10^3 grams, or 1/1000th of a gram, while a nanogram represents 1/10^9 grams, or 1/1,000,000,000th of a gram.
The prefixes milli and nano, among others, are used in science to represent powers of ten scale when associated with units of mass, volume or energy. Milli and nano reflect scalar values of 10^-3 and 10^-9, or 1/10^3 and 1/10^9, respectively. Conversely, 10^3 milligrams equals one gram, and 10^9 nanograms equals one gram.
To understand why there are one million nanograms in a milligram, one can perform the unit conversion calculation: 1 milligram * (1 gram / 10^3 milligrams) * (10^9 nanograms / 1 gram) = 10^9 / 10^3 nanograms, or 10^6 nanograms.
Knowing that a nanogram is 10^-9 grams and a milligram is 10^-3 grams, an alternative way of deriving the number of nanograms is to setup an equation: (10^-9 grams) * x = 10^-3 grams, where x is the number of nanograms. Therefore, x = (10^-3) / (10^-9) = 10^6 nanograms.