The formula to calculate the grams for a given amount of kilojoules and energy per gram is:
\[ g = \frac{Kj}{E} \]
Where:
Let's say the kilojoules (Kj) is 500 and the energy per gram (E) is 20 Kj/g. Using the formula:
\[ g = \frac{500}{20} = 25 \]
So, the mass of the substance is 25 grams.