The number of atoms of each element present in the compound is shown by the formula in the form of simplest whole number is known as empirical formula.
Mass of sample = 15.58 g (given)
Mass of potassium in sample = 4.97 g (given)
Mass of chlorine in sample = 4.51 g (given)
Mass of oxygen in sample = (Mass of sample) - (Mass of potassium in sample + Mass of chlorine in sample)
Mass of oxygen in sample = 
Calculating the number of moles of each element in the sample by using formula:

The number of moles of each element in the sample:
- Potassium,

Atomic mass of potassium = 39.098 u
Number of moles of Potassium,
= 
- Chlorine,

Atomic mass of chlorine = 35.453 u
Number of moles of Chlorine,
= 
- Oxygen,

Atomic mass of chlorine = 15.99 u
Number of moles of Oxygen,
= 
To determine the mole ratio, will divide with the smallest mole number.


Hence, the empirical formula is
.