Radio carbon dating is based on the fact that C-14 changes to N-14 due to beta decay. A live organism has the same percentage of C-14 as that in the atmosphere due to an exchange of carbon when it consumes food and expels CO2. After the organism dies, the accumulated C-14 reduces as it decays and there is no replacement.
By measuring the percentage of C-14 and comparing it to the percentage in the atmosphere it is possible to find the approximate age of an organism.
The amount of C-14 becomes half in 5730 years which is the half life of C-14.
Let the age of the fragment be N years. The amount of C-14 left is equal to (1/2)^(N/5730). As the fragment has 21% of the C-14 as that in the atmosphere.
21/100 = (1/2)^(N/5730)
=> N/5730 = log(0.21)/ log(0.5)
=> N = 5730* log(0.21) / log(0.5)
=> N = 5730*2.2515
=> N = 12901
The fragment is 12901 years old.