J.R. S. answered 01/13/21
Ph.D. University Professor with 10+ years Tutoring Experience
You left out units for the numbers you presented. We will assume these are percentage by mass.
Assume you have 100 g
C = 40% = 40.00 g C x 1 mol C / 12 = 3.33 moles C
H = 6.71% = 6.71 g H x 1 mo Hl / 1 g = 6.71 moles H
O = 53.29% = 53.29 g O x 1 mol O / 16 g = 3.33 moles O
The ratio of moles of C : H : O = 3.33 : 6.6 : 3.33 which is the same as 1 : 2 : 1
Empirical formula = CH2O