Assuming 1 mole of caffeine, therefore the mass is 194.19 grams.
C = 0.4948 * 194.19 grams * (1 mol / 12 grams) = 8
H = 0.0519 * 194.19 grams * (1 mol / 1 grams) = 10
N = 0.2885 * 194.19 grams * (1 mol / 14 grams) = 4
O = 0.1648 * 194.19 grams * (1 mol / 16 grams) = 2
So the molecular formula is:
C8H10N4O2