The science
Each unstable atom decays at random with constant probability per unit time, so the parent count obeys dP/dt = -lambda P and P = P0 e^(-lambda t). The half-life is T = ln 2 / lambda. Daughter atoms accumulate as D = P0 - P.
D/P = e^(lambda t) - 1 => t = ln(1 + D/P) / lambda
K-40 branches: only a fraction b = 0.1072 of decays give Ar-40
D/P = b (e^(lambda t) - 1) => t = ln(1 + D/(b P)) / lambda
error: sigma_t = sigma_R / (lambda (b + R))
Simplifications: the rock is assumed closed (no gain or loss of parent or daughter), no daughter atoms at the start, and U-238 is treated as one step to Pb-206 although the chain has many short-lived members. Real labs use isochrons and concordia diagrams to test these assumptions. Carbon-14 dates only organic material younger than about 50,000 years. Fossils are usually dated indirectly, from volcanic ash layers above and below them. Half-lives are standard values rounded to four digits.