Your percentages don't add up to exactly 100 %, but they are within the limits of experimental error.

Assume that you have 100 g of the compound.

Then you have 62.1 g of #"C"#, 5.21 g of #"H"#, 12.1 g of #"N"#, and 20.7 g of #"O"#.

Our job is to calculate the ratio of the moles of each element.

#"Moles of C" = 62.1color(red)(cancel(color(black)("g C"))) × "1 mol C"/(12.01 color(red)(cancel(color(black)("g C")))) = "5.171 mol C"#

#"Moles of H" = 5.21 color(red)(cancel(color(black)("g H"))) × "1 mol H"/(1.008 color(red)(cancel(color(black)("g H")))) = "5.169 mol H"#

#"Moles of N" = 12.1 color(red)(cancel(color(black)("g N"))) × "1 mol N"/(14.01 color(red)(cancel(color(black)("g N")))) = "0.8637 mol N"#

#"Moles of O" = 20.7 color(red)(cancel(color(black)("g O"))) × "1 mol O"/(16.00 color(red)(cancel(color(black)("g O")))) = "1.294 mol O"#

To get the molar ratio, we divide each number of moles by the smallest number

(#"0.8637"#).

From here on, I like to summarize the calculations in a table.

#"Element"color(white)(X) "Mass/g"color(white)(X) "Moles"color(white)(Xll) "Ratio" color(white)(m)×2color(white)(mll)"Integers"#

#stackrel(—————————————————-——)(color(white)(ll)"C" color(white)(XXXX)62.1 color(white)(Xmll)"5.171"
color(white)(Xll)5.987color(white)(m) 11.97color(white)(Xmm)12#

#color(white)(ll)"H" color(white)(XXXXll)5.21 color(white)(mm)"5.169" color(white)(Xll)5.985color(white)(m)11.97 color(white)(XXX)12#

#color(white)(ll)"N" color(white)(XXXml)12.1 color(white)(mml)"0.8637" color(white)(Xl)1color(white)(mmml)2 color(white)(XXXmlll)2#

#color(white)(ll)"O" color(white)(XXXXl)20.7 color(white)(mml)"1.294" color(white)(Xll)1.498color(white)(mll)2.998 color(white)(XXX)3#

The empirical formula is #"C"_12"H"_12"NO"_3#.