Beginning the moment a rock solidifies, its unstable potassium starts changing into argon. As this process continues, the accumulating argon gas becomes trapped inside the rock where it can be measured. We know from lab experiments the rate at which potassium-40 changes into argon-40. Knowing this rate, we can take a rock, measure the percentages of the two isotopes, and calculate how old the rock is.