A formula gives information about the type and the number of each atom present in a compound.
The formula for sodium sulfate is Na2SO4. It tells you that sodium sulfate contains:
The subscript numbers refer to the element before them.
Sometimes a formula includes brackets. The atoms inside the brackets are multiplied by the number outside the brackets.
Aluminium sulfate’s formula is Al2(SO4)3. It contains: