How can a chemical formula be experimentally determined?
To determine a molecular formula of a compound you need the relative molecular mass and the percentage elemental composition of that compound substance.
These can be both determined by experimental procedures.
Molar mass can be deduced through general methods, e.g. the measurement of some colligative property of the substance (as the osmotic pressure), the density of the substance in the gas phase, or by analyzing the mass spectrometer data.
For the percentual composition of each component element, there can be different methods, depending by the kind of elements and on the different chemical reactions that can be exploited to quantitatively separate and analyze them.
For organic substances there exist a simple authomatized method that is based on the combustion of a given amount of substance in excess oxygen. From the amount of water and carbon dioxide produced, and the mass of initial burnt substance, the percentages of C, H, O are determined.
After that experiment, the empirical formula can be mathematically deduced as shown in this video
But the empirical formula is not yet the true formula. That is because any multiple of that formula has the same percentage of elements. For example, in the case of the video, the smaller formula with integer indexes (empirical or minimal formula), is:
Let's suppose that the molecular weight was experimentally determined as being 220 +/- 2. If we calculate the molecular weight of the empirical formula, we get:
eFW = 3C + 6H + 2O = 3•12.011 + 6•1,0079 + 2•15.9994 = 74.1
The true molecular weight is 220, and 220/74.1 = 2.97 ( ~ 3), that means that the minimal formula has to be triplicated to
Good explanation can be found here: http://pages.towson.edu/ladon/empiric.html