A compound is found to contain 50.05 % sulfur and 49.95 % oxygen by mass. What is the simplest (empirical) formula for this compound?

They said to assume that it is 100 grams. I found the molar mass.
S- 32.06
0-16.00
But now I don't know what to do. Please help. Thank you!

There is nothing wrong with Steve's answer but here is a systematic way to solve the problem in case the percentages are not the same.

Take 100 g sample, that gives you
50.05 g S and
49.95 g O.

Convert to mols
mols S = 50.05/32.06 = 1.561
mols O = 49.95/16 = 3.121

Now find the ratio of the two elements to each other with the smaller being no less than 1.00. The easy way to do that is to divide the smaller number by itself (thus making sure it is 1.000); then divide the other number by the smaller number.
1.561/1.561 = 1.000
3.121/1.561 = 1.999 which rounds to 2 so
empirical formula is SO2.
By the way, I would like to point out that the molar mass of S and O are not what you listed; those numbers are the atomic mass and not molar masses.

The total masses of S and O are approximately equal, so since O has half the mass/mole of S, that means the empirical formula is probably

SO2

S02

To determine the empirical formula, we need to determine the ratio of atoms present in the compound.

Step 1: Convert the given mass percentages into masses of sulfur and oxygen in 100 grams of the compound.

Given:
Mass of sulfur = 50.05 grams
Mass of oxygen = 49.95 grams

Step 2: Convert the masses of sulfur and oxygen into moles.

To convert the mass to moles, we need to divide the given mass by the molar mass (atomic mass) of each element.

Molar mass of sulfur (S) = 32.06 g/mol
Molar mass of oxygen (O) = 16.00 g/mol

Moles of sulfur = 50.05 g / 32.06 g/mol ≈ 1.56 mol
Moles of oxygen = 49.95 g / 16.00 g/mol ≈ 3.12 mol

Step 3: Determine the simplest whole number ratio of sulfur to oxygen.

Divide both moles of sulfur and oxygen by the smaller value to get the ratio:

Moles of Sulfur ≈ 1.56 mol ≈ 1
Moles of Oxygen ≈ 3.12 mol ≈ 2

The empirical formula for the compound, based on the given mass percentages, is SO2.

IT IS STIL GOING TO BE THE SAME

Ok I got O1S1 but I don't think that it is right and I am really confused.