Although the time at which any individual atom will decay cannot be forecast, the time in which any given percentage of a sample will decay can be calculated to varying degrees of accuracy.
The time that it takes for half of a sample to decay is known as the half life of the isotope.
Other factors and basic assumptions must also be considered.
Of course, Kelvin formed his estimates of the age of the Sun without the knowledge of fusion as the true energy source of the Sun.
Prior to 1905 the best and most accepted age of the Earth was that proposed by Lord Kelvin based on the amount of time necessary for the Earth to cool to its present temperature from a completely liquid state.