Hello!

Denote the mass of the older sample as `m_1` and of the modern as `m_2` . The older sample contains `x_1` grams of Carbon-14 and the modern `x_2` . Also denote the half-life as T and the age of the older sample as E years. And denote the number of counts per second as `n_1` and `n_2.`

After the time T half of Carbon-14 atoms remains, after 2T 1/4 remains and after time t `1/2^(t/T)` remains (this is true for t less than T also).

Therefore E years ago there was `x_1*2^(E/T)` atoms in older sample, and because materials are the same,

`(x_1*2^(E/T))/x_2=m_1/m_2.`

Now use the number of counts per second. Denote one second in years as s. Then

`x_1(1-2^(-s/T))=n_1, x_2(1-2^(-s/T))=n_2.`

Thus `x_1/x_2=n_1/n_2` and from the first equation

`2^(E/T)=m_1/m_2 * n_2/n_1` , or

`E=T*log_2(m_1/m_2*n_2/n_1).`

In numbers it is approximately **12200** years.