Chemists performing spectrophotometry routinely calculate the concentration of chemical solutions from light absorbance readings. The calculation they use is based on one of the simplest equations in science, known as the Beer-Lambert Law, or sometimes simply Beer's Law. Beer's Law says that the light absorbance, A, of a solution is equal to the product of a constant, e, the width of the sample, b, and the sample concentration, c. Mathematically, this is written as A = ebc. The concentration in this equation is in units of moles chemical per litre of solution, otherwise known as molarity.
Write down the absorbance reading (A) of the solution for which you are calculating molarity. The absorbance of a solution is defined as the base 10 logarithm of the inverse of its transmittance. The transmittance of a sample is the ratio of the amount of light that exits a sample over the amount that enters it. So if a sample absorbs 80% of the light that enters it, its transmittance would be 0.20 and its absorbance would be log (1/0.20) = 0.699.
Divide the absorbance value by the path length (b) of the sample cell holding the solution. This value will be in centimetres and will be the effective distance which the light travels through the sample. A common path length is one centimetre, meaning that the sample is held in a square container with an internal width of one centimetre. For a one centimetre (cm) path length, you would divide 0.699 by 1cm to obtain 0.699cm^-1.
Divide the value you just obtained by the molar absorptivity (e) of the particular chemical in your solution. The molar absorptivity is a constant for a given chemical in a specific solvent and will have units of litres per mole centimetre. Labs derive this constant through experimentation, by measuring the absorbance of varying concentrations of the chemical in solution. Essentially, the molar absorptivity tells you how much light a solution of the chemical will absorb per unit concentration (mole) and unit path length (cm). The result of this final calculation is the concentration of the solution (c), in units of molarity. If your value of e was 20 litres/mole cm, you would divide 0.699 by 20 to obtain a concentration of 0.035 moles per litre.
The Beer-Lambert law only works over a particular range of concentration for any given chemical. At very high concentrations, it will not apply.