The formula is:
E=(mi-mf)c2
mi=initial mass, mf=final mass
I only found problems where those masses are expressed in unified atomic mass unit, this should be applied only for one atom, but when I have, for example, 100kg of uranium 239 and by beta decay it decays to 239Np, let's say 50kg was made, how to calculate the energy released?