Parts per million (ppm) is a unit of concentration which tells you the number of "parts" of a chemical per one million equivalent parts of solution. Since a liter (L) of a dilute solution in water weighs almost exactly one kilogram (kg), and there are one million milligrams (mg) in a kg, ppm is equal to mg/L. Parts per billion (ppb) are similar, except a ppb is one part chemical in one billion parts of solution, equal to micrograms (ug) per liter. If you know the mass of chemical in a volume of solution, you can calculate concentration in ppm or ppb.
Multiply the mass of chemical which is in the solution, with the mass in units of grams (g), by 1000. This calculation will change the units of mass from g to mg in preparation for calculating ppm. For example, if you have a solution containing 0.008 g lead, you would multiply by 1000 to obtain 8 mg lead.
Divide the result of your previous calculation by the total volume of the solution, in units of liters. Report this value as the concentration of the solution in units of ppm. In the case of the example, if your solution volume was 2.0 L you would divide 8 mg by 2.0 to get 4 mg/L or 4 ppm.
Multiply the result you obtained for ppm concentration by 1000. This will change the units from ppm to ppb. For the example, you would multiply 4 ppm by 1000 and report the concentration as 4000 ppb.