Quantum mechanics is one of two cornerstones of modern physics (the other is general relativity), and has been precisely confirmed in thousands of very exacting experiments.
However, usually it is not possible to apply this formula directly, because, for instance, in many cases we do not know the original amount of the radioactive isotope when the rock was solidified.
Also, such a calculation does not provide us with any statistical error margin to double-check the result.
Fortunately, scientists have developed several methods that not only circumvent the difficulty of not knowing the original amounts, but also provide a very reliable means of statistical validity checking.
A related article on the age of the earth and geologic ages presented the current best known values for these dates: Ages.
The figures shown in that article are based on radiometric dating.
Radiometric dating is rooted in the rates of radioactive decay of various isotopes, which rates have been measured carefully in numerous laboratories beginning in the early 20th century.
Radioactive decay is in turn a very basic physical phenomenon, well understood as a consequence of quantum mechanics.
The following is a brief technical description of how scientists determine dates with radiometric schemes.
This section may be omitted if readers do not wish to follow the math (although the math used here is nothing beyond what is typically taught in a good high-school math analysis class).
In mathematical terms, radioactive decay is governed by a simple exponential formula, taught in many high school math classes: P is the amount after time t, and L is the decay constant for the radioactive isotope.
This decay constant L can be expressed in terms of the half life T (the time it takes for one-half of the material to decay) as L = log(2) / T, where log(2) = 0.693147... In other words, if we know P, or even merely their ratio, we can solve the above equation for the time t.