The empirical formula gives the most reduced ratio of the elements in a compound, and the molecular formula gives the actual number of elements in a compound. The empirical formula and the molecular formula can be the same if the ratio of the actual number of elements in that compound is a reduced fraction. For example, the molecular and empirical formulas of water are both $H_2O$.
Work Step by Step
Concept explained in-depth in textbook.