The age of volcanic rocks and ash can be determined by measuring the proportions of argon (in the form of argon-40) and radioactive potassium within them.
The level of nitrogen gradually reduces as the bone decays.
Absolute dating is not possible with this method because the rate at which the nitrogen content declines depends on the surrounding temperature, moisture, soil chemicals and bacteria.
Only one sample is required for this method as both the argon-39 and argon-40 can be extracted from the same sample.
In special cases, bones can be compared by measuring chemicals within them.
Where the rocks are not strongly folded or tilted it is possible to work out the order in which the layers were formed.
The oldest rocks and fossils are at the bottom and the youngest are on top.
This relatively new technique was developed in order to achieve more accurate dates than those obtained from the potassium-argon method.
The older method required two samples for dating and could produce imprecise dates if the argon was not fully extracted.
The technique can, however, provide the relative ages of bones from the same site.
Most fossils are found in sedimentary rocks deposited in layers.
Knowing when a dinosaur or other animal lived is important because it helps us place them on the evolutionary family tree.