Think that you have 15g of Calcium carbonate reacted with 25cm-3 of 2.0moldm-2 of dilute sulphuric acid.
Below is the balanced equation
CaCO3 + H2SO4 --> CaSO4 + CO2 + H2O
[H2SO4] = 2.0 moldm-2 = 2.0 molL-1 = 2.0 M
Volume H2SO4 = 25cm-3 = 0.025 L
number of moles H2SO4
= [H2SO4] x volume
= 2.0M x 0.025L = 0.05 moles
number of moles CaCO3
= mass / molar mass
= 15g / 100gmol-1
= 0.15 moles
According to the above balanced equation, 0.05 moles H2SO4 should react with 0.05moles CaCO3 yielding 0.05 moles of each of the products. This is if all the reactants are pure as you would expect.
Therefore, if the above conditions are met with, there should be a mass of CaCO3 left unreacted
0.15 moles - 0.05 moles = 0.1 moles
0.1 moles x 100g/moles = 10g
If it is less than 10 g of CaCO3 left unreacted, the sample is not pure.
Hope that helps. You can always change the quantity to suit you. This is a standard way to calculate the purity and is seen in some chemistry text books.