First you need to find the content of radioactive carbon in the sample. Then you need to find the usual content of radioactive carbon in any such sample. Scientists have already found the half-life of radioactive carbon. They can use it to find the years that were needed to diminish the carbon content of the sample from the original amount to the present amount.
The years calculated is the age of the sample. You can calculate the age of the remains as well as the fossils using this method. It has made age identification much easier and much more authentic.