A molecular formula represents the exact number of atoms present for each element in the compound.
For carbon atom:
=
( as molar mass of carbon is 12 g/mol)
Now, 6 carbon atoms are present and rest are hydrogen atoms i.e. 6
Thus, formula becomes
(
Now, check for unsaturation:
Degree of unsaturation =

Substitute the value of x and y,
Degree of unsaturation =

=

=
implies one ring and three double bonds.
Thus, formula comes out to be
i.e. benzene ring.